Take the 2-minute tour ×
Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. It's 100% free, no registration required.

It's possible to animate a change noise texture by animating the texture coordinates with a mapping node or by animating the texture space, however this only works on one axis at a time (on the other axes the texture will appear to be sliding across the object's surface).

For example, the top face has the desired effect but the other faces appear to be moving/sliding upwards:

Even with all three axes location and rotation animated it still appears to be sliding rather than statically changing.

enter image description here

Is there some way to make each face appear like the top face in the first gif but still be seamlessly blended with the other faces? This should work for other shapes as well.

In other words, I'm looking for a way to animate the "seed" of the texture.

share|improve this question

2 Answers 2

up vote 12 down vote accepted

You can not animate the seed of a 3D gradient noise texture because it´s usually all fixed in a permutation table. What you are basically looking for are 4D gradient noise textures.

Why do 3D gradient noise textures not work? Imagine a 3D procedural texture as a continuous grid in space containing colour or intensity values at any node. Also imagine your mesh inside this grid. For simplicity imagine that every point on the surface of the mesh gets the colour of the nearest point of the grid assigned to it. Now imagine moving the grid or the manifold mesh. Eventually the points will move along the normal of a few faces but they can usually not move along the normals of all faces at a given time. And if they don´t move perfectly along a normal they will slide along the surface.

To overcome this limitation we need to add a dimension which we can then animate.

So how can we do this in blender/cycles?

We can program it ourselves in OSL(Open Shading Language). First we need the code for our 4D texture shader (e.g. a very simple one):

#include "stdosl.h"

shader simple_noise_texture4d(
float Scale = 1.0,
float Time = 0.0,
output color Color = 0.0
)
{
    Color = noise( "uperlin", P * Scale, Time );
}

Use the internal text editor and name the above text block e.g. noise.osl. We use the builtin noise function with 4D unsigned perlin noise. The 4th component named Time will be used to animate the texture. Scale is used to scale the texture as usual. The output is named Color. For more information see the OSL specification osl-languagespec.pdf.

Edit: By the way, there already exists a script template "Noise" in the text editor called noise.osl. I didn´t know this by the time I posted this answer. It provides some more 4D noise algorithms.

Important: In the render tab of the properties panel enable "Open Shading Language". Then add a material to the object as usual and add a script node and set the shader script to "noise.osl". Click the "Update shader.." button next to the shader name input. Use the output colour e.g. as input colour for a Diffuse BSDF shader.

enter image description here

Now Time can be animated as usual.

enter image description here

For more complex noise just edit the OSL code accordingly.

share|improve this answer
    
Excellent answer! +1 for OSL exposure ;-) –  Matt Apr 1 at 21:11

If using the objects UV's is not a firm requirement you can use the following setup to animate noise. Conceptually, this is like placing the object 'within' the 3D texture and then moving that texture. It's seamless across the faces. Using the i shortcut to set keyframes for Location, Rotation, and Scale is quick and works well. enter image description here

EDIT:here's the animated .gif enter image description here

share|improve this answer
    
Could you upload a gif of how this looks? The second gif in my answer is made by animating the location and rotation, but you can still tell the texture is sliding.. –  gandalf3 Mar 29 at 19:04
    
Unfortunately this seems to have the same problem as the second gif in my question, where the texture seems to "slide" across the surface of the object. –  gandalf3 Apr 1 at 20:10
    
yeah, I know. I did not understand your question properly. The other answer given is really nice. I didn't know that could be done. I almost deleted this answer but decided to leave it since several people seem to think it's also useful to them. I prefer the other solution as well. –  MarcClintDion Apr 1 at 20:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.