animated textures howto ?

Blitz3D Forums/Blitz3D Beginners Area/animated textures howto ?

StOrM3(Posted 2004) [#1]
Okay heres a good one.. I have a model, that I want to be able to animate the textures on a specific face, how do I do this ? Load the anim texture as an animated texture then apply it to a certain face, I am doing the textures as just certain parts are colored, and the rest is black for transparency, so I want to be able to clear one texture, then apply the next and so on, during the sequence.. Also I want to do this in a function, so I can time the animation, like every 3 seconds, have it update the texture. I will call the function like animateobject and call it from main game loop, so i guess in the main loop I could check for how much time has passed since last call to it, and if greater than 3 secs, then call the function, and reset timer. I just need to know how to do the animated texture part.

Any example code would help greatly, especially showing how to apply a certain texture to a specific face.


jhocking(Posted 2004) [#2]
I kind of understand why Blitz does this, but the way animated textures are handled is kind of a pain. You have to keep the handle of the brush applied to the surface, call BrushTexture whenever you want to change the frame of the texture, and call PaintSurface to actually see the changed frame. While this gives you a lot of control over the animated texture, I would love a default animated texture where you can define an optional framerate in LoadAnimTexture and the texture will simply loop at that framerate.


StOrM3(Posted 2004) [#3]
so, does anyone have example code showing how to use this ? The order to call the various functions etc. ??