PDA

View Full Version : Can Animated Gifs be used as textures?



dabeav
10-30-2001, 06:55 AM
Ok, I have seen animated textures in quake 3, now are those gifs, or what? And if they are how the heck would you load one? any one have any suggestions?

Bob
10-30-2001, 07:09 AM
There are a few ways to animate a texture.
Create several textures, each texture containing a frame in the animation, and bind different textures over time.
Create one texture, and update this texture dynamically over time.
Create one 3D texture, and put each frame in different "heights" inside this 3D texture. This allows you to fade from one frame to another, but is practically useless unless you have a hardware that supports them.

A texture in OpenGL does not support animations, so you must fake it.

Omaha
10-31-2001, 05:52 PM
Actually the "animated" textures in Quake 3 are one of Carmack's little toys, shaders.

I think typically animated textures are just polygons drawn with a different texture each frame.

Gavin
11-01-2001, 12:12 AM
Have a look a nehe's site where he shows how to play an avi. Isn't there a better way to do it with some of the new (ish) nvidia extensions?