This is my first real project using Geometry Nodes. I’m working on animating pieces of a grid made from the company logo, using proximity, wave noise, etc.
I’ve been facing an issue for a few days:
How can I select instances from a Collection Info node based on their own center point?
As you can see in the screenshot, each point on the grid distributes one piece from a set of five folders. I’ve used raycast to select either a green or a gold material, similar to an on/off switch.
I’ve managed to translate instances based on their own centers, but the raycast instance index selection uses the grid point instead of the child instance center.
Am I on the right track?
I’m a bit lost and tried using “Realize Instances,” but then I wasn’t able to select the entire mesh in one go.
If you want use index selection from instances centers, you would need to offset grid points from instances location for each raycast node source position (you would need to use 5 raycast nodes)
The method using “Set Material Index” seems easier to implement. However, I noticed that the instances hit by the icosphere don’t move smoothly—they just jump straight to the point. Should I be using proximity for this?
Also, how would you recommend selecting instances using a black-and-white input, like with “Wave Texture”?
Lastly, I have three materials, and I tried to randomize the material index input. It seems to work, but only on faces due to the “Realize Instances” node. Is there a way to capture the attribute at the instance level to fully apply the material to the entire instance after realized?
You can simply use wave texture for the translation, but for selecting material I am not sure. I think it would be better to use the color mask instead of material to get different materials like in this case:
For the randomize material capture instance index and use it in Random Value ID socket. Or Store Named Attribute random value on instances and use it in shader editor just like example above.