View Full Version : Animated Textures
10-07-2005, 01:56 PM
Original Thread Link (http://www.lucasforums.com/showthread.php?t=153462)
I tried to add some animated textures to the mask I am working on(http://www.lucasforums.com/showthread.php?t=153253), but I ran into difficulties... The only information I have on the animated textures is from http://ccg.dladventures.com/index.php?title=Textures&printable=yes, 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?
10-07-2005, 07:17 PM
Ok, lets get started.
Here is "template" txi which I use
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: http://www.pcgamemods.com/mod/16451.html
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. (http://q-net.netfirms.com/wip/017.html)
10-07-2005, 09: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:
In the animation texture I mapped the eye to the upper left eye.
Any idea how this could happen and how to correct it?
10-08-2005, 03: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: http://www.pcgamemods.com/mod/16370.html)
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 http://oldflash.batcave.net/anim/3.html
- 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
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: http://oldflash.batcave.net/anim/01.html
but if you do mapping like this http://oldflash.batcave.net/anim/02.html it will be ok
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
vBulletin®, Copyright ©2000-2013, Jelsoft Enterprises Ltd.