I don't know if this has been requested. I think there should be a way to reuse skeletal (bones) animations, or to store animations separatedly in a way that these scenes can be used by more than one model.

The easiest way I imagine this to be implemented (just a suggestion), is simply to have this function:

ent_animate(ENTITY* entity,STRING* scene,var percent,var mode)

to have an overdriven version as:

ent_animate(ENTITY* entity, ENTITY* source_ent, STRING* scene,var percent,var mode)

In the later case, the animated scene would be 'borrowed' from the second "source_ent" entity. So, I could create, say, a new enemy soldier, with the same skeleton, but no animations - and animate it using scenes from an already animated model, or simply from a model called 'soldier_animations', given it is loaded as an entity.

I think this would not mess current 3dgs programming structure, but would allow to animate lots of models with the same skeleton. Of course it implies that the target entity shares the same skeleton as the source_ent entity, but that would be up to the user. Bones that share the same name would be rotated, scaled etc. exactly as in the source_ent, and the other bones would be ignored.

The uses for this are obvious. Yet let me tell you:

1) I often find myself animating the same scenes again, even if I am making one more pirate, soldier, or zombie model variation. It would be far easier if I could use the animation stored in a single model.

2) If I decide to tweak some common scene like attack or walk cycle, I would not need to edit every single model for this.

3) Model files could be smaller (?)


Of course it doesn't apply to all cases. But, in many scenarios, you would probably have lots of different models with the same phisycal structure and skeleton!

I don't know the drawbacks - if it would be slow or something. I was thinking on creating a _dll plugin for this, but not only it would be a lot of work (practically rewriting ent_animate in c++) but also it wouldn't take so many parameters.


Regards,