4
$\begingroup$

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.enter image description here

$\endgroup$

1 Answer 1

6
$\begingroup$

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.

enter image description here

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:

enter image description here

PS: It would be important to mention that you must use the nodes Realize Instances and Set Material in both cases.

$\endgroup$
3
  • $\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$
    – Valentyn
    Jun 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$
    – Valentyn
    Jun 26 at 11:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.