3
$\begingroup$

I've been playing around with the new Geometry Nodes features in the 2.92 version of blender, using it to distribute objects on another mesh. The way I have it set up is that when an empty gets close, they scale up, and when the empty moves further away they scale down to 0 making them "disappear".

It works for the most part, but I feel like I could make it a bit more efficient and performant if I had the density of the points influenced by the empty as well. Since even though the object is scaled down to 0, it's still technically "in" the scene. The fix would be having the density change based on distance. That way the computer isn't factoring the objects that are scaled to 0 into scene calculations and such. So that areas of the mesh far from the empty don't have points at all, while areas of the mesh close to the empty can be denser without any real performance cost compared to if I had just turned the density up by a flat value.

I've been fumbling along well enough figuring things as I go along with the new nodes, but I can't seem to figure out how to do this or what to plug into the density attribute of the "Point Distribute" node to have its value influenced by the distance of the controlling empty. I'd rather not use a particle system for this, as the idea is to learn more about the new Geometry Nodes and what I can do with them.

$\endgroup$

1 Answer 1

4
$\begingroup$

Answering my own question after figuring something out on my own.

If you add a vertex group (named whatever you want, but in my case "proximity", and set the vert weight for all verts in the object to 1.0, you can add a "Vertex Weight Proximity" modifier BEFORE the "Geometry Nodes" modifier to use as a weight influence. By setting the Proximity mode to Geometry, and setting the high value to 0 and your low value to whatever you want, you can influence the range of the effect. You can edit the falloff by going into weight paint mode, and adjusting the minimum value of the Weight Proximity modifier and seeing the weight change on your object (it might have to be subdivided first a few times).

Controlling the density is as easy as adding the name of your vertex group to the "Density Attribute" section of the "Point Distribute" node in the Geometry Nodes, since Vertex Groups apply as attributes.

$\endgroup$

You must log in to answer this question.

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