HowTo:Make Animated Textures

From VsWiki
Revision as of 20:08, 21 May 2006 by Halleck (talk | contribs) (new article with all the information I know about animations.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
arrow_left.png Tips for realistic-looking textures arrow_up.png HowTos Editing BFXM files (format spec) arrow_right.png

Using animated textures on a model is similar to using regular textures. Instead of (or in addition to) setting the texture element in the xmesh, you must set the animation element as well. For example:

<Mesh scale="1.0" ... blend="ONE ONE" animation="whitelight.ani">

would create a blinking white light.

Animations are fairly simple. Each animation is made up of a folder containing several individual pictures. It also contains an .ani file that tells the game what frames to display and in what order. Here is an example of an .ani file:

-10 10
40 .035
blink0000.png
blink0001.png
blink0002.png
blink0003.png
blink0004.png

FIXME - I don't know what the numbers at the top mean.

After the numbers, there is a list of frames to be used in the animation. You may reference each frame as many times as you like. For instance:

blink0009.png
blink0010.png
blink0010.png
blink0010.png
blink0010.png

will display frame nine briefly, and frame ten for a longer period. This is especially useful for blinking animations, where you want to display the black frame for a long period of time to control the interval between blinks.

The standard running light animations are redlight.ani, bluelight.ani, greenlight.ani, and whitelight.ani. Other special light animations exist, such as blink.ani for the Llama and streak.ani for the Ariston.

You can find all the .ani files used by the game in the "animations" folder.