LucasForums (
-   Tutorials: Skinning and Modeling (
-   -   Animated Textures (

LSaberDuelist 10-07-2005 12:56 PM

Animated Textures
Original Thread Link

I tried to add some animated textures to the mask I am working on(, but I ran into difficulties... The only information I have on the animated textures is from, but this article is not very detailed. Does anyone know a better source of information?

What I was trying to do is to make the eye glow with animated textures. I had a look at some animated textures from the game like fx_baodur and so on...
I appears to me these animated textures are like gifs and that they store the frames of animation. Animation type and animation parameters are declared in the corresponding *.txi file.(?) But I couldn't figure out how to control the animation exactely. What I did so far:
-define a 1024x1024 fx_texture to store 16 frames of animation each frame is a 256x256 block in the texture(I guessed...)
-apply the fx_texture to the eye
-map the eye to first frame(the 256x256 block in the upper left corner)
-In the txi file I declared proceduretype cycle, numx 4 numy 4 and fps 1

There is some a cycle of different frames, but not the ones I wanted...

Does anyone know how to do this or a better source of information on the animated textures?

oldflash 10-07-2005 06:17 PM

Ok, lets get started.

Here is "template" txi which I use

envmaptexture cm_baremetal
proceduretype cycle
#defaultwidth 128
#defaultheight 128
numx 3
numy 1
fps 15
#blending additive

So, "envmaptexture" is give you that chrome efect in game
Proceduretype is how will be animation, Here is something strange. For example if you have 3x3 animated texture the steps will be:
1 2 3
7 8 9
4 5 6
Defaultwidth and defaultheight seems to be useless because even if I put comment sign (chr #) or I modify values does not affect animation, so no need for those 2.
Important is numx and numy which define how many textures are horizontal and vertical.
FPS is how many frames /sec (NOT complete cycle).
Blend aditive I use sometimes to make transparent channel black

How to use this
First, when you make mapping use some sample tga and do all thing for static texture. After exporting model you will need to edit that texture.

Example. Here is a custom lightsaber hilt which I made-it for MdKnightR and is a good example:

Sorry for my bad english
I someone want to "translate" what I write will be welcome.

ps You can use animated definition for cm_baremetal or another custom texture used for chrome effect. In that way you can use 2 animations for your textures. :D In short time I will post some new models with multiple animated textures. (

LSaberDuelist 10-07-2005 08:11 PM

first of all thanks for the help so far, but I still got a problem. As long as I do not animate the texture everthing appears fine, here is a screenshot:
the txi file used here is simply envmaptexture cm_bright
here is what happens if I want to animate:
It is a little bit hard to see, but what happens is that the eye texture is no longer properly located.
this is my eye texture:
The txi file I use is:

envmaptexture cm_bright
proceduretype cycle
#defaultwidth 256
#defaultheight 256
numx 4
numy 4
fps  20
#blending additive
#decal 1

In the animation texture I mapped the eye to the upper left eye.

Any idea how this could happen and how to correct it?

oldflash 10-08-2005 02:47 AM

I got some pic. I use my lightsaber for example. In that way you can see how it works (last lightsaber from here:
This was my steps:
1. I map the hilt using a single texture 128x128
and done with uvw unwrap
2. Export model and test in TSL to see how it looks
3. In photoeditor
- I load original texture
- create new file with custom size 384x384 (3*128) for using at 9 frames animation (pic called "untitled - 4")
- fill the new pic with original texture until I get 9 objects 128x128 ("w_shortsbr_009-anim.tga"
note: on w_shortsbr_009-anim.tga red mark and numbers are only to show you the animation order for proceduretype cycle
- I edit every object to gibe some "glow" effect in animation
- Save final texture overwriting the one which I use for mapping and create the txi file
to contain this

envmaptexture cm_baremetal
proceduretype cycle
defaultwidth 128
defaultheight 128
numx 3
numy 3
fps 15
#blending additive
#decal 1

In your case:
Load model in 3deditor, unwrap uvw, select all verticles and make resize to fit with texture. NOT first frame, not second. Use all texture size.

Or more simple, convert w_shortsbr_009.mdl to ascii and look how is mapped.

note: all animations thing are photoeditor job. not 3deditor.
In txi file: lines which start with # are ignored and can be deleted

You have done something like this:
but if you do mapping like this it will be ok

One suggestion:
In your texture the cycle order is
1 2 3 4
13 14 15 16
9 10 11 12
5 6 7 8
You can use 2048x512 texture and the order is
1- 2 - 3 - 4 - 5 - 6 -7 -8

All times are GMT -4. The time now is 11:55 AM.

Powered by vBulletin®
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.
LFNetwork, LLC ©2002-2015 - All rights reserved.