Archived

This topic is now archived and is closed to further replies.

yanuart

Texture Animation

Recommended Posts

yanuart    162
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

Share this post


Link to post
Share on other sites
S1CA    1418
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

Share this post


Link to post
Share on other sites
ipso    122
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?)

Share this post


Link to post
Share on other sites