Procedural textures and applying scale

Apologies if this has been asked before. I have done a lot of searching for the answer and can’t find it.

If I create a procedural texture is there any way to get it to go across the image and show up in the same way, no matter what the dimensions are? For instance, if you look at this, there are two resized cubes with magic texture on them.


I know I can get the magic image to look as if it isn’t stretched because the one at the back is like that. I used a vector mapping node. I would like to be able to stretch an image and to get more procedural texture added rather than stretching the existing texture and it without having to use a vector mapping node. In the above image having to map the texture isn’t a problem because all the sides are rectangular but if I add a simple difference, such as in the image below, you can see stretching in both images on the face which isn’t vertical or horizontal.


If the image is more complex, then it is impossible not to have a procedural texture stretched. If I were using an image texture I could box map it and that would do away with the stretching (it could cause other problems but not that one) but if you can do that with a procedural texture I haven’t found out how.

Is there a way of doing this or is this where the limitations of Blender (and possibly other 3D software) show up? I thought applying scale might do it but it didn’t and so far in my learning process I haven’t done anything complicated enough to see the difference between applying scale and not.

Apologies if this has been answered elsewhere but if it has, please point me in that direction.

Thanks.

You could try this setup:


I didn’t really test it out though (like with animating the object), just threw this together. Maybe play around with it. Also, there’s no reason why I used “Point” instead of “texture” for mapping. Maybe use “Texture”.

This might be close to your setup come to think of it. In any case, it is probably better however, to do UV unwrapping and use a UV map for coordinates for complex models. You have more control over the mapping that way, and can get it looking better than this.

Thanks. I got an easy answer today because Kent Trammell asked a very similar question on Twitter. He got the following response.

                                         [<b>Cody Winchester</b>     ‏@<b>CodyWinch</b>](https://twitter.com/CodyWinch)                                       

@khtrammell If you turn off auto texture space and reset it to 1, 1, 1 you don’t get stretching.

I don’t know if I know how to turn off auto texture space but I found a way that works, though I don’t know if it is what Cody Winchester meant.

I started with the default cube. Added a voronoi texture to it. Then I hit Shift+T, scaled the cube a bit and then applied scale with Ctrl+A.

From then on no matter what distortion of the object I do, scaling parts of it, extruding parts of it, the voronoi texture stays unstretched. I am actually rather pleased that I wasn’t asking a simple question and I am even more pleased that I found an answer, thanks in no small measure to other Blender users.

While waiting for an earlier response to be moderated, I found exactly what was being recommended to Kent Trammell on Twitter. Go to the Object Data (the triangle to the right of the modifiers icon) and open the Texture Space area by clicking on the little black triangle if all of its fields aren’t already showing. Uncheck the “Auto Texture Space” checkbox and set all the sizes to 1.

That way you don’t need to make sure you apply the scale really early on and it also means you can procedurally texture a ready made objects such as the Blender Cookie shader totem and still get an unstretched texture on it.

1 Like