Geometry nodes randomize by position

Hi,

If I make rock generator its possible connect this generator to instance input another geonodes? (randomize rock by position)

Geometry to instance may help you here.

Hope that helps

I mean something like this to make every rock diferent shape

So you can either connect more rockgens to geo to instance,

Or alter them as a realised instance after the instancing.

No you not understand I just give example with rocks

Ok.

Goodluck finding what you want, but it wont be the way you are trying because instancing doesn’t work like that.

1 Like

So its not possible even new Blender 3.5?

Yes I would think that way may work, for the seed as you need a loop really.

I’ll have a go…

ok thanks :wink:

Old thread but I managed to solve this. Planet_yo was very close.

In fact I’d tried exactly what they had before I found this thread. The idea is very similar to what you can do in Unreal Engine where you use world space position as an effectively unique value which you can then use to randomize other attributes (instance ID, color, etc)

But it doesn’t look like Position works that way.

However if you use an Object Info node and use Self Object as the input, the approach does work!

Right now I’m adding my X, Y, and Z position together that way I can get randomization in any direction. This will give you a new seed for every 1m (total) of movement. If you have smaller objects just multiply the distance by some value. For instance x10 would give you a new seed every 10cm.

I had found another solution where you use a hash of the object ID (or name) to set a driver for your seed via a little bit of python (“hash(self.id_data.name)%10000”) and that works too. But you need to have that same driver in every single copy you make, which I didn’t like.

By using Object Info you can just copy your object and a new instance will be selected as you move. No changing seeds manually.

3 Likes

Here it is working. Hopefully this helps someone else looking for the same solution.

There are better solutions for doing large quantities of objects, but in my case I still want to place my objects by hand. I just didn’t want to be burdened by selecting unique instances/seeds each time I placed a new object.

random_by_position