Want to know more about 4D textures.

This is in relation to spikeyxxx post to frikkr question here: https://cgcookie.com/questions/11559-how-to-loop-a-water-surface-animation


I want to learn more about 4D textures and procedural effects. Is this available in 2.82 release? Any good videos I should be on the lookout to learn.

I’m more of a shader noob than frikkr  

  • spikeyxxx replied

    Hi Shawn, here you can find a very good introduction to nodes (as well as some free shaders and stuff...):

    http://www.blenderinsight.com/knowledge-base-nodes/

    As for 4D Textures, they exist in 2.82. The 3 noise textures in Blender: Musgrave, Noise and Voronoi can now be set to 4D (default is 3D, 1D and 2D are also possible). (Now do not try and visualize a texture in 4 dimensional space, that is too hard!)

    If you have a simple setup like this:

    You can change the X Location of the texture in the Mapping Node and you will see the texture moving in the X direction, a bit like clouds moving in the sky (note that I have changed the mapping Type to Texture, so that if you increase the X value, the texture moves to the right...). The same goes for the Y and Z Locations, But in the noise texture node itself, there is a W value and if you change that, the texture changes/morphs, but not in a visible direction. This can be used for instance as a time factor to animate a texture.

    That is what I used to loop a noise texture; by connecting the out come of a sine function (which starts at zero and comes back to zero) to the W of a noise texture you automatically get a loop. But a sine function changes fast in the beginning and then slows down and speeds up again (it has to do this, because it has to change direction in order to get back to zero). So I introduced some noise; multiplying it, so that the zero would still be zero (otherwise it would destroy the loop) and that, where the sine is flattest, the effect of the noise would be the strongest

    That is the basic and of course many variations of this are possible.

  • Parker Bourassa(pfbourassa) replied

    To give a really simple answer:
    People used to animate textures by changing one of the numbers in the mapping node, maybe rotating the texture in a way that isn't too noticeable. But on a 3D object a viewer could often tell which way the pattern was moving, and that's not always good.

    This new W number lets you change the number, and therefore the pattern of a texture uniformly across the whole object. So it won't look like it's drifting up-and-to-the-left for example.