2
$\begingroup$

I am sampling a texture based on the position attribute. I am storing the result into a variable named "textureValue". I would like to use this value as an input to seed a subsequent Point Distribute node.

Blender Attribute sample texture node connecting to a point distribute node

The Point distribute node doesn't seem to give the option to use an attribute as a seed. I can set another value as the seed but I'm not sure how to get the "textureValue" attribute I created in there.

My use case is that I have an object which I want to be spawned many times into a scene with a different seed each time, so that each instance of the object looks a bit different. The general problem is I want per instance randomness. If you had a different suggestion as to how to achieve this use case, that could also resolve my question.

$\endgroup$
2
$\begingroup$

I don't think it's a good idea to randomize the seed value based on the geometry. The distribution is randomized, but in an "organic" way. Especially if you're using the Poisson Distribution, the minimal distance would be really hard to maintain.

AFAIK there is no way in 2.93 to do what you are looking for (randomise GN properties per object). One work around would be to use drivers based on world position and a noise generator, then tweak the output as desired in the node tree.

For instance, to randomize the scale of your objects :

enter image description here

Add a driver to the modifier's input :

enter image description here

enter image description here

You'll be prompted to know if you want to execute custom python scripts, say yes or enable globally in the preferences (don't forget to disable it if you work with files downloaded from unknown sources)

enter image description here

Result, duplicating objects on the 3D world :

enter image description here

More to your point, to instance a random number of objects, of a random size, on a random position, on each instance :

enter image description here

Result :

enter image description here

$\endgroup$
1
  • 1
    $\begingroup$ Thanks for your help. I combined your approach with this answer to solve my problem: blender.stackexchange.com/questions/220721/… I implemented the driver as suggested and then duplicated the object into a collection and set a different location for each object in the collection. Then I used this collection as the source for Point Instance. For example if you have 10 different locations in the collection you get 10 different seeds. It's a bit clunky but it works for my purposes. $\endgroup$
    – dps
    Jun 14 at 11:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.