How can I use Geometric Nodes to make the cubes glow smoothly as the sphere approaches the cubes? The closer the sphere, the brighter the cubes glow.
1 Answer
You would only have to capture the Distance, which you get from the node Geometry Proximity
, as an attribute, and pass this to the shader.
In Blender 3.2 there are Named Attributes, with which you can give an attribute a name, which you can use with this in the shader without detours.
If you are using a lower version of Blender, you would have to take the detour via Group Outputs.
If you want to use a uniform color instead of the individual points of the cubes, then you would simply have to hook the node Store Named Attributes
in a different place, and apply it to the domain Instance:
PS: It would be important to mention that you must use the nodes Realize Instances
and Set Material
in both cases.
-
$\begingroup$ Thank you, that's a good method. But I need each cube to start glowing completely, not just half a cube. imgur.com/a/4nQfn4q $\endgroup$– ValentynJun 26 at 11:12
-
$\begingroup$ @Valentyn All right, I've updated the answer accordingly. $\endgroup$ Jun 26 at 11:20
-
$\begingroup$ Yes, that's exactly what I need. Thank you very much. $\endgroup$– ValentynJun 26 at 11:28