Setting material for Geometry nodes

I have made a knitted mask in Blender using geometry nodes, I am trying to add some red colours to the edges of the mouth and stars but cant work out how?

Is there a way to get the geometry nodes to use the base colour from the original mask that the geometry nodes are referencing?

Thanks, Luke




Maybe with using a Sample Nearest Surface node set to Vector and using a UV-Map attribute for the value? That should give you the closest position on the UV Map from the original mesh

How do I get a UV map attribute and I assume that gets connected into the “Set Material” selection?

Sry, i haven’t been on the PC when i wrote that reply.

I assume, that you made a UV map for the original mesh to use as a Texture Coordinate in your material, right? You can find this UV map and its name in the Object Data Properties:
UV_Map
To access the UV map in Geometry Nodes, simply create a Named Attribute node with a Vector data type and write the name of the UV map in it like so:
Named_Attribute
After that, you want to use the Sample Nearest Surface node, to find out where your new geometry would be on the original UV map and store this information with a Store Named Attribute node. In the material of your new geometry, you can access this with an Attribute node and use it as the texture coordinate.

In the following example, i scattered some points on the surface of a cube. As you can see, depending on where the points are, they change the color according to what the color of the cube is:

Hope that makes sense!

1 Like