LoadAnimSeq

Blitz3D Forums/Blitz3D Programming/LoadAnimSeq

Jeroen(Posted 2003) [#1]
Hey there!

I have a question on LoadAnimSeq...How does it exactly work?
I'd like to extract the animation from 1.b3d to 2.b3d, 3.b3d, 4.b3d, etc... because they consume much memory.

So does this mean I need to load ALL entities as animated meshes, but not include the actual animation in 2.b3d, 3.b3d etc...? And if so, how can I attach the animation?

Thanks.


jfk EO-11110(Posted 2003) [#2]
afaik: no crossmesh animation usage yet, byside extractanim, but it isn't so much memory since loadanimseq is storing only animation frames of bones and/or hierarchy.


Ricky Smith(Posted 2003) [#3]
You can use the LoadAnimSeq() command to append an animation sequence from one mesh to another - as long as the bone hierarchy and the bone names are the same this should work.
You can for example load the main (animated) mesh with LoadAnimMesh()( doesn't need to necesarily have any animation keys itself but it must have a skeleton) and then append sequences to this mesh using the LoadAnimSeq() command.
Personally I find it easier just to have the whole animation in one .b3d file - splitting the animation into different files doesn't save memory and just makes your code a bit more complicated.


Gabriel(Posted 2003) [#4]
splitting the animation into different files doesn't save memory and just makes your code a bit more complicated.


It does if you have several characters who share a set of animations.


Ricky Smith(Posted 2003) [#5]

It does if you have several characters who share a set of animations.





I suppose it depends on how Blitz stores those animation frames in memory and whether it stores a seperate set of frames for each entity, which is what I suspect, or not.

If it does then it doesn't really matter how you load/append the frames/sequences it will occupy the same amount of memory which in any case isn't a tremendous amount and shouldn't really be of great concern unless you are using many tens of thousands of animation keys.


Dirk Krause(Posted 2003) [#6]
I did some tests with the Payne Characters sometime ago.
What works well is the following: you can havwe for example Max and Boris extraced with Milkshape (tutorials on the Milkshape site); use a small animation ('walk'). Then you extract all other animations (that's a lot of work) each in single B3D files with one character (any of them, pick the smallest).

Here comes the interesting part: after loading the AnimMesh you can assign any animation to any character with LoadAnimSeq. It's like you have N character files that can have M possible animations. I don't know if there is a way to include them all in one file, but I guess it isn't worth the effort, because the poly overhead shouldn't be that much if you take a stickman.

I could provide the code if someone wanted it, but it's really easy to do.

I just tested it with a few animations, but it seems to work. I just refrained from doing it up to now, but having all payne1 characters with all animations should give an excellent headstart into game development. Of course one has to exchange them when it comes to launch the game - but this point has to be reached first ;-).


Jeroen(Posted 2003) [#7]
Thanks for the answers. I have 8 characters with quite a lot frames, around 1200 per character. I notice that they take like 3.0 mb in disk space (but don't know how much internal memory when used in Blitz). I think it's worth a try.


aCiD2(Posted 2003) [#8]
for interal memory you could use that example in the code archive that shows how much memory is used, dont knwo if thats what you need but it may help

aCiD2


Dirk Krause(Posted 2003) [#9]
But after all: if you can't combine some of the movements the characters make (i.e. do they really all walk differently?) then being able to move any character at any time with any animation will consume these 3 MB - nothing you can do about it.

Regards,
Dirk