Periodic Precedural Shaders
When mapping a procedural texture onto a cylinder-style periodic mesh, it would be desirable to have control over the alignment of the texture on the mesh and no discontinuities at the seams. I believe to achieve that, the generated textures need to be made periodic.
So it looks with when using UV coordinates. Note that the UV map is perfectly aligned from 0 to 1 in tangential direction, but it doesn't help, because the texture is not periodic.
It seems the the best on can do currently is using Generated or Object Coordinates, but this will not produce the desired result of the waves going in the same diagonal direction all around the cylinder, but will bend around and reverse:
That's the shader which I'm using in the example:
7 Comments
That's a good idea but you should change your example, as this situation can easily be fixed with some nodes :
Nice trick, but yes, of course, as you are saying, too, that works only for that particular texture. I guess increasing the distortion parameters for the wave texture would already be sufficient to be unable to reproduce it in this way.
@ybyt4t: yes, that's why I used noise rather than distortion. But I guess they both do the same thing.
It probably would even be useful to allow toggling tileability for both UV coordinates separately.
Of course it should not be the only option. Definitely toggleable. I understand that for many use cases other than this specific one, infinitely non-repetitive textures are a great thing.
Are you suggesting that this should be the default behavior, or a toggleable option? I definitely would not want it to be the default as tiled textures can be much less flexible than truly procedural ones.
Workflow-wise, it seems to me that if you've already gone through the effort of unwrapping, you'd be better suited just using an actual image texture.
@Jason van Gumster: I've been struggling with that same thing when I've wanted to generate image textures from Cycles to be used later in some other programs or in Blender later. I would love a checkbox thing to toggle the texture in a periodic mode.