Sign in to follow this  

Creating texture animations



Hello everyone.
In this tutorial I will explain how texture animations work. It's based in WotLK but it's exactly the same for Cata and beyond.
We will add a basic texture animation to this test model:
(you can download it in the Tools section)

This method is quite useful to simulate waterfalls, energy beams, fire and much more.
If you want to add an advanced opacity mask, check my other tutorial.

-My test model.

Take in mind that it can be done in 010editor as well, but it's a little more complex. Once you know how texture animations work with PyModelEditor, feel free to explore it a little further creating multiple animation layers with different renderflags or adding them with 010editor.

Run PyModelEditor and open the test model (TexAnimPlaneTest.m2).
1- Go to GlobalSequences.
2- Write "1500" (without the quotation marks) and click on "OK". This is the ammount of time our animation will take. 1500 milliseconds is 1,5 seconds. The more milliseconds, the slower the animation will be.
3- Go to Edit UV Animations.
4- Click on "Add" to create a new texture animation.
5- Once the new texture animation is created, go to "Edit Translation".
6- A new window will open. Go to "Add AnimSub".
7- Change the Interpolation to "Linear".
8- Apply the global sequence you just created.
9- Paste this line:

0:{ 0.0 , 0.0 , 0.0 }
1500:{ 0.0 , 1.0 , 0.0 }

Now, click on Ok on all the windows you have open to apply the changes.

10- Go to Edit Materials.
11- Select the material of the mesh you want to add the texture animation (in this case, the test model only has one) and assign the texture animation you just created.


You can now save your model. If you test the model in-game, you will notice that the texture animation works fine, but there is some kind of dragging bug and it doesn't loop correctly:

This happens when the texture is not tiled. To tile the texture, open the model with PyModelEditor, go to Edit Textures and check both "X-Wrap" and "Y-Wrap":


This should fix the problem! (you can also do it in 010editor by changing the TextureFlag to "3").


Now that you managed to make your own texture animation, you may be wondering how to reverse the animation, or move it sidewards instead of upwards.
The key is in the animation line we added in PyModelEditor:


As you can see, each line has 4 segments: time frame, horizontal movement, vertical movement and an unused stack of data that we will never touch.
In frame 0, your texture stays on its default pose (0, 0, 0), but in frame 1500 it moves vertically (0, 1, 0) and goes back to where it started (it loops).
"1.0" is the ammount of times the texture loops. If you change it to "0.5", the texture will start moving but will return to its defult state when it has traveled half the texture. If you replace "1.0" with "-1.0", the texture will go downwards instead of upwards.
So, basically, "1500:{ 0.0 , 1.0 , 0.0 }" means that in 1.5 seconds your texture will loop vertically once. Another example: "3000:{ 0.0 , -1.0 , 0.0 }" means that in 3 seconds the texture will loop vertically once (but downwards).


If you put "1.0" in the horizontal segment instead of the vertical segment, you'll see something like this:

And if you want it to move to the corners, you simply need to put "1.0" (or -1.0 if you want it to go to the opposite direction) in both the horizontal and the vertical segment:

Texture animation is quite easy once you know how the numbers work. You just need some practice and experimentation to master it.
If your model has many .skin files, PyModelEditor won't manage the texture animations so well. The best tool for those cases is 010editor. I recommend you to start with small models first.
This tutorial was requested many times. Hope you find it useful.

  • Like 1

Recommended Comments

I'll try it on my legion bloodelf skeleton ethereal and show you the results when I can. I wasn't missing much in the process big thanks. If you want anything from me (3d skills etc) ask !

Share this comment

Link to comment
Share on other sites

Very simple, well written tutorial. Producing m2s with UV animation can get very useful! I love it.

Share this comment

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now