Anim Seq's - Any way to set up anim libraries

Blitz3D Forums/Blitz3D Programming/Anim Seq's - Any way to set up anim libraries

GrumpyOldMan(Posted 2004) [#1]
Hi

I've been looking at doing a large scale RTS but a major stumbling block is that each boned animated unit has to drag all its anim seq's with it rather than using a central library. It's seems a waste of resources (think hundreds or thousands of units) and maybe has come from the need to merge the boned animations with the frame based animations and their commands. What I suppose I need is for anim seq's to be set up as entities.

Having said that is there any way that we can get directly into the loaded b3d and anim seq's to make better use of them. Even a pointer in the right direction would be better than being frustrated.

Cheers

GrumpyOldMan


kalimon(Posted 2004) [#2]
Pooling you mean.

Pooling animaitons is a strange concept. But DO this.


Make each animation an Entity. Each X number of frames free all Entity of soldiers and reload them of the aniamtion you wish.

if you divide that refresh itno X segments, then It affect less the frame rate.


GrumpyOldMan(Posted 2004) [#3]
Hi Kalimon

Thanks for the reply. It's firstly a matter of arithmetic. I've stored some very simple biped animations but they still take up 16 to 30k each in a b3d file. Each unit will have to carry around say 150k in animations to cover all the animations. So if I have a regiment of 100 figures they would carry collectively around 1.5M of animations. If I have 32 regiments they have to carry around 48M of individual animations. If the animations were stored entities rather than flags within an entity then those 3200 units (all using the same skeleton) could use 150k of animations rather than 48M.

Thanks for the idea on copied entities but I'm using individually animated units within a single b3d and copying an entity does strange things because of vertex assignments, etc.

I'd still be pleased to hear from anybody with any ideas on how to set up animation libraries.

Cheers

GrumpyOldMan


Danny(Posted 2004) [#4]
Hi GrumpyOldDude,

I'm just about trying to set up something that sounds similar to you what you need. But in stead of using pre-animated bones/skeletons. I want to use an animation library based on inverse kinematics (more 'procedural' type animation so I can apply a walk cycle to any character but create different behaviour by tweaking certain parameters, like more swing in the hips, smaller steps, etc..).

I've got documents and sample source code on how to do IK in C, but so far (still trying) the maths is way over my head (too many trigo, vector stuff, etc) to be able to convert this to Blitz. So should you know anyone or be interested in this I'll be happy to forward / share this....

my 2 cents..
Danny.


Beaker(Posted 2004) [#5]
I don't see why you can't load one animated soldier, and one static (but boned) soldier. Then animate the one soldier and copy the positions/rotations of all his bones to all the other static soldiers.

Then you are saving loads of memory.

You may find the FindChild() commands useful, and also the NextChild() function I wrote on the code archives.


GrumpyOldMan(Posted 2004) [#6]
Hi Danny and Beaker

Thanks for the replies.I've been playing around to see what can be done. The main problem is that we can't directly overwrite the information in the animation sequences and keys (the tyranny of the B3D loader). It's possible to overwrite the keys by laboriously copying position and rotation information and setting new animation keys but with hundreds or thousands of units this is impractical. You'd have to set up your animations so that the same animation keys were used in every animation (key 2, key 4, key 6, etc) and then change the position and rotation of the figure (while animating) and set new keys before setting a new animation sequence.

Anybody have any ideas on how to plug information directly into loaded sequences and/or keys?????

Cheers

GrumpyOldMan