Skip to main content
gamedev.net
🔒 Locked

Texture Animation

Started by yanuart Dec 15, 2001 at 11:57 PM 1 replies 350+ views
Original Post
yanuart
yanuart
I want to know some good ways or rule of thumbs to do a texture animation in Direct3D or can saomebody can give me a good suggestion on how people usually changed/animate textures in their meshes ?? thx
Ride the thrill of your life
Play Motorama
S1CA
S1CA
METHOD1: Have a separate texture per frame of animation and simply change which texture you use when you call SetTexture. This is the easiest to implement, but can negatively impact performance if you have too many animating textures (because you need to upload to the card more).

METHOD2: Have multiple frames in a single texture and use a texture transformation matrix with a translation to change between frames. The only real disadvantage is you can''t use things like texture repeat and mirror.

--
Simon O''''Connor
Creative Asylum Ltd
www.creative-asylum.com
Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site
ipso
ipso
It is possible to lock the texture and change the actual pixels.

I may be wrong, but I think the bigger the locked object, the slower the lock. (The copy in system memory is altered and it has to transfer back across the bus before it can be rendered?)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.