1
$\begingroup$

I have a reduced node set for the purpose of this question. In the node group a grid is initialised with 10 by 10 verts (100 points). I am then instancing subdivided cubes onto these points but displacing the mesh with 'set position' connected to a noise texture. The goal is to use the index of each point to drive the 'seed' or 'W' value of the noise texture so each instance has a different displacement. As detailed I am using the 'store named attribute' node, which I believe to be similar in this 'use case' as the 'capture attribute' node (which I tried to no avail either). I have also added a viewer node and it looks as if the index information is being transferred yet the viewport does not show any variation in the instances. I will continue to dig until I resolve but any help would be greatly appreciated. Thanksenter image description here

$\endgroup$
0

2 Answers 2

2
$\begingroup$

You are interested in using the index of an instance/point to influence different inputs of Noise Texture.

You can achieve this as follows:

enter image description here

Use Capture Attribute instead of Store Named Attribute. If you use Store Named Attributes, you will add additional values to each element that are already present. Namely the index of the instance/point. In this case, this would only be additional ballast, which ultimately affects the performance.

If you capture the index directly after Instance on Points with Capture Attribute in the domain Instances, you can apply this value to every single point of the objects uniformly, even if you append the node Realize Instances afterwards.

And this is actually the problem the other poster is causing with his "solution": Without Realize Instances you can't move any points individually here at all!

Therefore you have to solve it this way, no matter if you use Noise Texture or Random Value.

$\endgroup$
2
$\begingroup$

The usual approach for this is to put a Set Position after the Instances on Points node and randomize the offset. Where you have the Set Position there is only one object to position, and its position doesn't matter because the instance position comes from the points, not the source. Here's a simplified version of an approach that leaves the X and Y coordinates alone but randomizes Z:

randomizing Z coordinates

You can replace the Random Value/CombineXYZ node pair with another combination that will randomize in whatever fashion you would like. Here's one that randomizes all three coordinates:

randomizing all coordinates

Note that you don't need a Noise texture unless you want a specific noise pattern and the Randomize node doesn't need a driver.

$\endgroup$
2
  • $\begingroup$ Ah ha, thanks, set position after instancing makes sense now you mention it. I'll give it a try. Cheers again $\endgroup$ Jun 12, 2022 at 20:20
  • $\begingroup$ @IanMasters Since you're apparently a new user to Blender StackExchange, you might want to read What should I do when someone answers my question? and perhaps upvote or accept my answer $\endgroup$ Jun 12, 2022 at 23:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .