example to animate a rigged skinned mesh with specific frames (without animate()

Started by RemiD, March 25, 2018, 14:13:24

Previous topic - Next topic

RemiD

Hello,

I repost this here because this is very useful and there are not any good example about this (that i am aware of) :

This is to animate a rigged skinned mesh by setting the specific frame of the animation (between startframe and endframe), instead of using the animate() function.



The advantages are :
->you can load the same rigged skinned mesh, several times, so that it will have its own surface(s), and you don't need to extract all animations for each loaded mesh ... (useful for lighting shading with vertices colors)
->you can set the current anim frame of each mesh with an offset so that they will all animate differently (even if they are animating with the same animation)
->you can start / stop an animation exactly when you want, and start another, according to the "actionstate" of the entity
->you don't need to update the animated surfaces which are not in view and not visible...
->this simplifies the code because there are less things to check...

http://rd-stuff.fr/blitz3d/rigged-skinned-mesh-animation-using-setanimframe-201803251445.7z