# Randomizing Normal Displacement for Asteroid Instances in Geometry Nodes

I’ve got a geometry nodes setup for an asteroid where the displacement of the vertices is based on multiplying the normal vectors by a 4D noise map. Now, I want to construct an asteroid field (using Mesh to Volume → Distribute Points in Volume → Instance on Points → Realize Instances) where each asteroid has a different W value being passed to its 4D noise map.

I’ve tried several things, but nothing’s worked: passing a Random Value node to W seems to use a per-vertex instead of per-instance value, capturing the position attribute between Distribute Points in Volume and Instance on Points doesn’t seem to do anything, and capturing the ID attribute between Instance on Points and Realize Instances shows up as invalid. Is there something I’m missing?

Hi Tohron,
maybe you just used the wrong Domain on the Capture Attribute node?

If you put it after the Instance on Points node for example, you may want to set the domain to Instance to capture a Random Value per Instance. But you definetly want to capture the random value before realizing the instances

2 Likes

I guess it’s my fault for not mentioning that I also wanted to have the asteroids animated as spinning in space, which is a bit of a problem when the noise displacement is applied after everything has been joined together (and therefore does not rotate when you animate the Rotation parameters of Instance on Points).

The Capture Attribute approach does work when passed in after Realize Instances (though it seems it’s not strictly necessary - the asteroids are still random without it), but passing it into geometry being used as the instance for Instance on Points still leads to all the asteroids looking the same.

Thanks for the suggestions though!

This is a common misunderstanding… A instance has to have the same geometry or it is no longer an instance.

If you want to make lots of different instances use a Repeat Zone with a Geometry to Instance going into a Join node.

Something like this:

Good luck.

2 Likes

Thanks, for both the solution and the clarification! That’s a few more nodes to add to my repertoire!