- Joined
- Apr 7, 2008
- Messages
- 1,621
Introduction
Hello, and welcome to my short tutorial, about how to add animated textures easily by yourself!
There is already a tutorial, but only with notepad, and I found it a bit complicated.
So I thought that I make another one, where you only need some tools, and a bit work.
This is not a very hard tutorial, but you should have some basic knowledge of textures/models.
(It’s also not needed, but recommended!)
You only need free tools for this tutorial.
I hope you learn something from it, and have fun while learning .
Tools needed
These are the tools, which are needed to make animated textures:
(Tools marked with an *, are not needed, but you can make the custom models/textures with them.)
- Notepad
- War3 Model Editor
- MDLX Converter
- Milkshape 3D * (not free)
- Gimp *
Textures
So, we will practice with a water texture. And which model do we know, has an animated
water texture? Yes, the ‘Water Elemental’ .
Now open Magos Model Editor, and open the attached model file.
The model already has the texture ‘Textures\Lords0000.blp’, but it needs more, to create an animated texture.
So click the toolbar button ‘Windows -> MPQ Browser’.
Now a new window pops up. There you click on ‘File -> War3.mpq’, to open the wc3 mpq.
There are all files for warcraft 3 saved.
Now search the folder ‘Textures’ and open it.
In that folder are many *.blp files. But we are searching the water texture. So press ‘L’, and the
Marker should jump to the ‘LavaLump.blp’. Now scroll a bit down, until you can see
‘Lords0000.blp’ and the other ones.
It should look now like that:
The model already uses the ‘Lords0000.blp’ texture, so we don’t have to add it.
Now add the other 7 textures (‘Lords0001.blp’ – ‘Lords0007.blp’).
You can easily do that with right click on the texture, and then ‘Use as texture’.
Our model uses now all 8 water textures!
Animated Texture
Now we will make the animated texture.
Open Magos Model Editor, if you closed it, or minimized it, and click at the toolbar
on ‘Windows -> Material Manager’. A new window pops up:
For this model, there is only one Material. It’s something called like ‘Material 04474770’.
(The numbers after the material are always random, so it might be, that it's not exact this number)
Double click this material to open a new window. There double click again on the MaterialLayer.
Another window should open:
You see, that it uses one texture at the moment: ‘Textures\Lords0000’.
To ‘animate’ it, check the box ‘Animated’ and click on the button ‘Texture ID’.
Now this window should open:
This looks a bit confusing at the beginning, but it’s easier than it looks like.
The ‘0’ before the ‘:’ shows the keyframe, where something happens.
The ‘0’ after the ‘:’ shows the texture ID.
To understand the keyframes better, go back to the main window of magos, and click
on ‘Windows -> Sequence Manager’. There should be an animation called ‘Stand’.
This is the normal stand animation.
Double click on it, and a new window opens. We need only the ‘Interval’ for this tutorial.
You see, the interval starts at 0, and goes to 1050. That means that the animation finishes,
when the interval reaches 1050.
Back to the texture animations.
You have 8 textures, and it should look fluently, so we make 8 parts. We have 1050 keyframes, and
we have to add 8 textures, so one texture every 150 keyframes.
It should look like this:
Code:
0: 0
150: 1
300: 2
450: 3
600: 4
750: 5
900: 6
1050: 7
Now go to the Animation Controller (‘Windows -> Animation Controller’), and play the stand animation.
It should look like this:
Voilà!
Moving Textures
After we learned how to make an animated texture with more than one texture, you will learn now,
how to make a moving texture, with only 1 texture, which saves space.
At first, download the attached ‘Stone.mdx’ model, and open it with
Magos Model Editor. Now click the Window button at the toolbar, and then on MPQ Browser, to
search our texture. In this example, we will use the ‘Textures\grad2b.blp’.
Open the ‘War3.mpq’, open the ‘Textures’ folder,
and search the ‘grad2b.blp’. When you found it, right click on it, and click on
‘Use as texture’.
Now we have to attach the texture to the model.
Click the window button in the toolbar, and click on Material ‘Manager’, and
double click on the Material. Now a new window should pop up, and there you right click on the
white background, and click ‘Create New’.
Now another window appears, and there, you check the ‘Unshaded’,
make the Filter Mode to ‘Additive’, and give it your texture.
It should look like that:
If you look at your model preview screen, you can see now, that the stone has a white thing
at its top. Well, let’s continue the work.
Again, click the window button in the toolbar, and select the ‘Texture Animation Manager’
and right click at the white background, and select ‘Create New’.
A new window pops up, with 3 different options:
Translation, Rotation and Scaling.
We need the Translation one, so check the ‘Animated’ box, under the
Translation category. Now we can click the Translation button.
A new window pops up.
At first, you can see at the bottom, a small field with the name ‘Interpolation Type’.
Set this to ‘Linear’, so the animation looks flowing.
Now to the second part of the translation window.
Code:
0: { 0, 0, 0 }
But I can tell you: the first number is for the keyframe.
So our model’s animation goes from 100 to 500.
Change the first 0 to 100.
Code:
100: { 0, 0, 0 }
Code:
100: { 0, 0, 0 }
100: { 0, 0, 0 }
100: { 0, 0, 0 }
100: { 0, 0, 0 }
It should look like that:
Code:
100: { 0, 0, 0 }
250: { 0, 0, 0 }
251: { 0, 0, 0 }
500: { 0, 0, 0 }
0.8, and the second 0 of the third keyframe to -0.8, so it looks nice, later on.
That’s how it should look like:
Code:
100: { 0, 0, 0 }
250: { 0, 0.8, 0 }
251: { 0, -0.8, 0 }
500: { 0, 0, 0 }
Now to the next step:
Open the Material Manager again, and double click on the material.
Now open the second material, with the animated texture.
There should be a small box, with the header: ‘Animated Texture ID’.
There, select the animated texture, we made.
Now click okay, and return to the preview screen.
Open the ‘Animation Manager’, and play the stand animation:
(Sorry about the quality, but it's a fast animation, and hard to record.
Now there is a problem with magos: It can't save the animated texture
(That's an odd magos bug, but there is a way to fix it).
Open now MdlxConverter, and convert the rock.mdx to rock.mdl.
Now open the rock.mdl file with notepad. Scroll down, until you reach the
the Materials.
Here a screenshot, how it should be changed:
If you haven't understand this, just look at this:
Code:
Materials 1 {
Material {
Layer {
FilterMode None,
static TextureID 0,
}
Layer {
FilterMode Additive,
Unshaded,
}
}
}
have to change the second layer.
Code:
Layer {
FilterMode Additive,
Unshaded,
}
Only add this:
Code:
static TextureID 1,
TVertexAnimId 0,
Code:
Layer {
FilterMode Additive,
Unshaded,
static TextureID 1,
TVertexAnimId 0,
}
to convert it back to rock.mdx, and watch it in Magos!
(Thanks to DonDustin, for the explanation how to fix the magos bug!)
Voilà!
Examples
Now I want to list some example models, which use animated/moving
textures. If you search in the model section under DC (Directors Cut),
you will find those well-done models.
Addendum
If the model shows up correctly in the model editor, but not in game (e.g. the rest of the texture is animated when yo don't want it to be), try following this guide to get the animated portion onto a separate material:
Putting what you learned about Animated Textures into action
Attachments
-
TutorialWaterSphere.mdx4.8 KB · Views: 709
-
TutorialWaterSphereFINISHED.mdx6.7 KB · Views: 595
-
Stone.mdx4.9 KB · Views: 581
-
LEExample.gif191.3 KB · Views: 7,950
-
PMExample.gif546.4 KB · Views: 10,749
-
LKExample.gif826.2 KB · Views: 13,326
-
StoneFINISHED.mdx5.2 KB · Views: 609
-
HowToMakeAnimatedTexturesWork.jpg65.4 KB · Views: 9,541
Last edited by a moderator: