1
$\begingroup$

I want a part of my mesh to be covered in Voronoi cells surrounded by a plain texture (see image).

enter image description here

Note that the natural border of the "grains" should be the transition to the "no texture" area.

Is there any way to achive this effect?

$\endgroup$
3
  • $\begingroup$ You need a mask to use as the Fac input in a Mix Shader. I tried to get a Gradient Node on Spherical to make lighter colored Voronoi cells in the center and darker farther out, which a Color Ramp on Constant interpolation would make into such a mask, but that hasn't worked. $\endgroup$
    – KickAir8p
    Apr 25, 2022 at 1:43
  • 1
    $\begingroup$ Use the 'Position' output to give you per-cell distance information.. see the last part of this answer $\endgroup$
    – Robin Betts
    Apr 25, 2022 at 7:35
  • 1
    $\begingroup$ @RobinBetts yeah, that's what I was missing, thx! $\endgroup$
    – KickAir8p
    Apr 25, 2022 at 17:52

2 Answers 2

1
$\begingroup$

After some trial and error I noticed the Color output of the voronoi texture. This can be used to single out cells close to a specific area on the mesh.

enter image description here

$\endgroup$
1
$\begingroup$

With thanks to Robin Betts comment above!

enter image description here

The mask for the Fac input of the Mix Shader uses the Position output of the same Voronoi Texture Node that the Distance output from makes the cells for the shader, so the mask's patch will match the outline of the cells. The mask's position for the patch is controlled by the Combine XYZ node, and the size of the patch is controlled by the Threshold of the Math Node (Less Than).

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .