How to control the size of a voronoi texture using a greyscale image

Hi, I would like to make a voronoi texture whose scale is controlled by a greyscale image. I tried making a greyscale image and just plugging it into the scale of the voronoi texture, but that didn’t work. How can I make it so the scale is adjusted by the image? Thanks!

It looks like it doesn’t work because the image you input lives in the range of 0-1.
You must remap it with actual min-max values.

3 Likes

Thank you so much! But the Map Range node isn’t there. How can I get it?

It’s a 2.81+ feature.
Add > Converter > Map Range

1 Like

Should be under Converter/Map Range. If not, you need to upgrade Blender.
However, I don’t think you’re going to get the results you expect. Scale can’t be driven as you might think, it will only distort the coordinate system.

2 Likes

Ok. I’m using 2.81+ and it is working now. Thanks!

Oh I see. It works with the checker pattern but when using the painted texture the voronoi texture is warped. How can I get what I want?

What do you want?

I want it so the warped part between the two sizes isn’t warped.

I suspect to know what you’re tryin to achieve, but…
The only way you can “use” this thing is with 2 tones maps (for example black and white), you won’t achieve a pleasing scale interpolation for middle values (in the above example, all the grey shades in between black and white).
So I guess you won’t go far with this method in case my guess on your goal is correct.

“Quick and dirty” :smiley:

1 Like

scaling texture shifts its coordinates, so they will never match.

perhaps, the simplest way to keep continousity is just to manually squash uvmap for larger spots.

p.s. also, you could try to put center of the texture inside the object, using “object” tex coords.

Thanks! This is exactly what I want! But how do I edit the voronoi loop? I searched for a while but couldn’t really find how.

The link has the OSL code for a ‘new voronoi’. You need to be in Cycles with the OSL option turned on, and use that code in a Script node.

Ahh Thanks. I was trying to run the script using eevee. I used cycles like you said and it worked! Thank you so much!