Making animation libraries

Blitz3D Forums/Blitz3D Programming/Making animation libraries

Ash(Posted 2004) [#1]
I was just wondering: is it possible to build a library of animations (bones-only), and then be able to apply the same animations to several different models at once, without having to store the animations within the model files? (Obviously, this has to assume that all the models that will use the animations, will have the same bone structure and layout as the animation library uses.)

But how would I go about this, if indeed it can be done? What programs could I use to do this, and what commands would I use in Blitz to apply pre-built animations to models?


aCiD2(Posted 2004) [#2]
The LoadAnimSeq function?


Ash(Posted 2004) [#3]
I'm really talking about appending stuff here, since I want models and animations to be kept separate. So animations are in their own files, and models are also in their own separate files, and I just plaster the animations onto the models, so basically I have a load of models that can be animated using a common library.

Does the LoadAnimSeq support appending of animations to a model? I don't necessarily want to have to copy and paste the frames of every single animation I want to have, into every single model I want to use. That would take way too much time, and I'd probably be spending more time doing that than coding.


Danny(Posted 2004) [#4]
I just started on something similar myself (want tokamak ragdoll physics with procedural animations), but still trying to figure out bones in general ;-)

I think in this case you've got store the 'animation data' yourself and then apply that data to the bones. With some default character setup and naming convention on the bones I think this should be possible.

Possible, but far from easy I guess because it would mean you need to be able to 'blend' one animation into another, keep feet on the ground, without dropping the gun, etc. etc.

0.02
:Danny


Techlord(Posted 2004) [#5]
Ash,

I've been planning to do something similar for my MMORPG, but, I can see the technique being used for many genres. I have been considering many different ways to achieve this. I pondering over 3 methods: 1) one base model + attachments + modifiers upon load, 2) segmented meshes attached to a skeleton, animation applied to skeleton, 3) multiple character meshes, animation set applied to all.

In either case, LoadAnimSeq will do the trick assuming the models use the same bone hiearchy (entitynames). LoadAnimSeq specifically appends an animation sequence from a file to an entity, returns the animation sequence number added.

If you have more then one animation sequence per file you will have to use the ExtractAnimSeq commands and apply them to the model by first frame and last frame. I assume you have one animation per file.

As mentioned earlier, LoadAnimSeq will return a sequence number. If animations are appended to the models in a different sequence order, you will need some sort of tracking. From an game engine perspective, the "run" animation should always be sequence 1, "jump" sequence 2, etc, although the sequence number for a specific model differs.

This could be easily managed with one array to store the Engine Animation Sequence File List and an array per model to match the models sequence to the engine's animation sequence.
;Engine Animation Sequence List (example)
Dim EngineAnimSeqFile$(MAX_ANIMATIONS%)
EngineAnimSeqFile$(1)="RunNormal.b3d"
EngineAnimSeqFile$(2)="Still.b3d"
EngineAnimSeqFile$(3)="StillFire.b3d"
EngineAnimSeqFile$(4)="TakeHit.b3d"
EngineAnimSeqFile$(5)="RunFire.b3d"
EngineAnimSeqFile$(6)="Dying1.b3d"
EngineAnimSeqFile$(7)="Dying2.b3d"
EngineAnimSeqFile$(8)="Idle.b3d"

Model Animation Sequence List
Dim ModelAnimSeq(MAX_MODEL_ID%,MAX_ANIMATIONS%)

To use:

ModelAnimSeq(new_model_id%,ENGINE_ANIM_SEQ%)=LoadAnimSeq(new_model_handle%,EngineAnimSeqFile$(ENGINE_ANIM_SEQ%))


Keep in mind, this is theory, but, either way I'm quite sure this can be achieve in Blitz3D.


JoshK(Posted 2004) [#6]
Wait 1 week:



AntonyWells(Posted 2004) [#7]
While we're pimping, you can do it in code with vividGL.
And have control of the resulting animation on a per limb basis.
i.e you can have the lower torso running while the upper torso is playing a gun fire anim etc.

but as for your question using b3d,
You can do it in blitz3d now anyway...create anim sequences, manually play the anim you want to copy and copy it's limb position and rotation(On the closet matching limb. i.e arm for arm ec)...should work ok.


TroM(Posted 2004) [#8]
the Loadanimseq will append to an existing animated entity


Techlord(Posted 2004) [#9]
Halo, lookin good!


RemiD(Posted 2017) [#10]

is it possible to build a library of animations (bones-only), and then be able to apply the same animations to several different models


yes, if the b3d file which has the skeleton (joints/bones) and the animations and the b3d file which has the rigged skinned mesh have the same skeleton (joints/bones)...


dna(Posted 2017) [#11]
DO you know the link to the vividgl3d engine?


Matty(Posted 2017) [#12]
I doubt it was ever completed...the author has a history of producing vapourware and hasn't been seen around here for a decade or more.