Recycle .B3D animations
Blitz3D Forums/Blitz3D Programming/Recycle .B3D animations
| ||
I have heard that you can reuse the .b3d animations (the animated skeleton) on multiple characters. How does that work? Does someone have a working example? Does it lower memory usage? |
| ||
Simply use AddanimSeq. The skeleton of all chars must be the same tho. |
| ||
Can you expand on this please? Does it work with bones or joints? Do the skeletons need need the same Joint/bone names? Do the skeletons need to have the exact same length of bones? Can i transfer an animation to a skeleton that has the same skeleton plus additional bones/joints which will not be affected? |
| ||
The command jfk means is LoadAnimSeq(mesh,filname$) Does it work with bones or joints? They are both the same - some people say joints - some bones - in reality both are virtual but have their pivot point at the point you would expect a joint to be ! Do the skeletons need need the same Joint/bone names? Yes - only the joints/bones that are identically named will get the loaded animation keys added. Do the skeletons need to have the exact same length of bones? No - but if the difference is a lot then the animation will be affected in some way or behave differently. Can i transfer an animation to a skeleton that has the same skeleton plus additional bones/joints which will not be affected? Yes - only the bones that are named exactly the same as the bones in the file you are loading from will get additional animation keys. Other existing bones with non corresponding names will not be affected. For models with very different structures or proportions it would be better to use a specialised tool to assist. Sharing Skeletons and Animation Sequences in PaceMaker. http://www.pacemakeranimation.net/tutorials/update134_1.wmv |
| ||
Thanks Ricky, in my world a bone has a defined length whereas a joint wont have that. Thats why i asked. Could i load different animsequences for different sets of bones/joints of one mesh? Say i have 3 sets of arm movements and 5 sets of leg movements - could i mix them at my leasure? greetings North |
| ||
you could write your own function which will read the values of an animations rotations and positions and add them to another anim mesh, even with different bone names. |
| ||
Can someone make a small example of this? At least code. The way I think of it is probably wrong... mesh1 = loadanimmesh("basic.b3d") mesh2 = loadanimmesh("basic2.b3d") walk = loadanimseq(mesh1,"anim_walk.b3d") How can I share that same "walk" animation with mesh2? Do I have to do loadanimseq again? |
| ||
Make a function that does a recursive check on children and if it has a specific name eg if a bone is called Bip01_larm and the arm is larm in your mesh do a addanimseq then rotate each bone in relation to each bone on the anim mesh which you want to add for each frame. Might sound bit confusing but im not so sober :-) EDIT - do the addanimseq at the begginig, you do't want a new anim for each bone :-) |
| ||
is this a speedup? e.g. i'll have 16 players running around (all using the same animations) - would it be faster to share the animsequences? |
| ||
hey sinu didn't you have a cool little mario example using this method? could you give a download link? |
| ||
i just used one set of animations and loaded them to each mesh and had offsets for parts like arms where if the arms cut into the torso(on fatter characters) id modify the anim so the arms were a bit further out. link http://www.blitzbasic.com/Community/posts.php?topic=58384#710228 ps id post a new one but i don't have access to my old computer(had a bad moveout from my old home b4 xmas and can't get to it right now) |