Animated Textures 3DStudio Max

Hi all ~

We’ve been playing with a test scene in Unity 3D and are essentially trying to re-create everything exactly as we had it in Max.

There is a river that is an animated texture but we cannot seem to get it to play. Is there a way to get this non-keyframed based animation to import?

We’re new to Unity so it is taking us some time to get feel for the workflow and what can and can’t be achieved.

If we need to re-create the animated texture in Unity, please send steps. Thanks for the help in advance!

Generally its a really bad idea to use an actual animated texture with frames because its unnecessary and takes up a lot of vram. Instead, you should scroll the river’s uv coordinates to make the texture move. Heres how:

var scrollSpeed = Vector2(0, 0);
private var scrolled = Vector2(0, 0);

function Update()
{
    scrolled += scrollSpeed * Time.deltaTime;
    renderer.material.SetTextureOffset("_MainTex", scrolled);
}

Hi there,

Thanks for the reply. Apparently the artist that created it did what you are saying but through Max:

“The texture is just a .jpg or .tga. It is not animated. The texture is UV’ed onto the water surface and then the UV’s were animated in order to look as if the water was flowing.”

Does that make a difference or should we still use the method you are suggesting?

Material UV animations are not automatically imported from 3dsMax (or other software packages). You’ll have to animate texture scale and/or offset (in your case, probably only offset) yourself somehow. Doing it like Yoggy suggested is probably easiest - a small script like that, attach it to the object you want to have a scrolling texture, and setup the scrolling speed in the inspector.