# How to influence the material with Geometry Proximity?

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.

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.

• 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 Jun 26 at 11:12
• @Valentyn All right, I've updated the answer accordingly. Jun 26 at 11:20
• Yes, that's exactly what I need. Thank you very much. Jun 26 at 11:28