Use new "Sample UV Surface Node" for shader mixing


I just saw the new Sample UV Surface Node and got an idea.

In theory, this node allows us to use a mesh for masking/mixing textures.

Example: Everywhere where the sphere hits Suzanne I want another color.

Unfortunately, Sample UV Surface Node is geo-node only, but we can transfer the result via attributes to the shader.

I tried to set up such a geo-node which gives me a map where the sphere hits the mesh but totally failed to find a working solution.

Btw… in Blender 3.5 we will get also a blur geo-node, so we could also smooth the result :smiley:

My question to the geo-nodes geeks, any idea how to do this?

You can use raycast to check if geometry inside the volume.
Also you can blur attribute by interpolating domains Point>Edge>Point>Edge and so on

Edit: Use Greater Then 0 instead of Minimum


thank you, that was super helpful.

Unfortunately with your blur solution the blur depends on the base mesh density.

But I just tested out the new blur node (3.5), which fixes this issue. The blur is now independent from the base mesh, which is super useful!

1 Like