Geometry nodes: Random per object
Geometry nodes are amazing BUT one thing annoys me. When multiple objects share the same node tree there is no easy way to randomize numbers between them. Fells like that is something that you need if you want a fully procedural workflow.
12 Comments
Since there is already an Object Info node available in geometry nodes, all it needs is an output for the Object ID that we can use. I'm actually baffled why it isn't already there. It's a very commonly used and extremely useful little piece of data. Used all the time in the shader editor for material variations per object. In fact I think randomization should be available anywhere and everywhere. In nature, everything is randomized and different, so when shooting for realism, it's imperative.
With the addition of the Repeat Zone in 4.0, it's really apparent how poorly the Random Value node works in its current form. If you put a Random Value node in a Repeat Zone it will just spit out the same result on every iteration, requiring putting another value input on the repeat zone that gets incremented with every iteration that goes into either the ID or the Seed to actually get a random value each time.
And if you're nesting Repeat Zones it gets even more unwieldy because you have to do the same incrementing value setup and pipe it down through every sub-zone, which in turn increment that value within themselves.
I think there needs to be a setting to have the Random Value node work in either a 'Fixed Seed' mode (basically the way it works currently) or an 'Unseeded/Random Per Evaluation' mode where it's using system time in nanoseconds or something as the seed so we don't have to do a bunch of additional manual setup that clutters up the node graph to truly randomize what we're getting.
Would love to see this implemented! It would so much randomisation power!
Absolutely, In a perfect world there should be an option to set the default value, when you plug the node tree into the group input, as a random value, the same as the Random value node, with a maximum and a minimum, and then it choses a seed for every time you plug the node tree into a different object. Just like the Object Info node's Random output already does for the Shader node tree.
Absolutely need this. I want to be able to create nodetree setups for things like randomising the rotation of components on mechanical objects, so that I don't need to manually by hand give each one a random seed value. When you have just 2 or 3 that's fine, but when you have 50 or 1000 and need a random rotation for each, that's just extremely annoying.
you probably shouldn't duplicate the node tree, that loses most of the advantages of having a reusable node tree. But you could add an input for 'seed', or take it from something like object name or location
Agree 100%.
Yes there is. Just connect your seeds to the group input and edit them from there.
Let's say you have a scene with 100 sugar coated gummy worms for example. And you want a different seed for the sugar density of each.... Do you really want to have to go through each and every gummy worm and change the exposed number of the seed manually 100 times...? Lol nope. We definitely need a way to automatically have a random seed per object. (Key word = automatically). Like the Object Info node in the shader editor has with that convenient little Object ID output that can be linked. Instant quality of life upgrade for any artist.
I just tried GN for the first time not knowing anything about it, but managed to have the per object randomization by simply duplicating the node tree, and I'm sure there are already better ways to do it, for example using object location possibly. Correct me if I don't get the problem or wrong about solution
* @Yegor R * Duplicating the node tree means changes on the basic setup would need to be copied by hand into all node trees copies. Annoying on one copy but devastating cumbersome on hundreds of objects.
* @vangel * Ah, so you mean a way to randomize seeds automatically on duplication?