0 registered members (),
984
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Reusable animation scenes between entities
#82141
07/19/06 05:57
07/19/06 05:57
|
Joined: Jul 2005
Posts: 366
eleroux
OP
Senior Member
|
OP
Senior Member
Joined: Jul 2005
Posts: 366
|
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,
|
|
|
Re: Reusable animation scenes between entities
[Re: eleroux]
#82142
07/19/06 08:23
07/19/06 08:23
|
Joined: Jul 2001
Posts: 6,904
HeelX
Senior Expert
|
Senior Expert
Joined: Jul 2001
Posts: 6,904
|
Although sometimes you can't avoid to re-animate characters, its pretty useful if you have one-size-fits-all characters so that you practically need only one animation set - and because you have multiple characters with the same proportions, its easy. Oblivion does this also, though, the characters are assembled meshes. Nevertheless they apply the same boneset to every character, or let us say character class, an org or an elve are a bit different than humans in movement, of course. Technically, it is somehow complicated, because when you use another skeleton, the skeleton information in your model file has to 100% to the skeleton you are referencing to. That means: bone names, bone amount, etc.pp. So it would be better if you have an animated skeleton file which the model is referencing to, and in the model, the vertex assignement have to stored in a new chunk extra for this bone referencing. This would require, though, very much work I think. Regarding speed issues I could imagine that using one referenced model with this technique could be as slow/fast as that model with inherited bone set. Though, I could imagine that when the screen is flooded with one dozen or more characters that are using one skeleton, it could be faster, of course. Nevertheless, I would like that, too.
|
|
|
Re: Reusable animation scenes between entities
[Re: HeelX]
#82143
07/19/06 13:23
07/19/06 13:23
|
Joined: Jul 2005
Posts: 366
eleroux
OP
Senior Member
|
OP
Senior Member
Joined: Jul 2005
Posts: 366
|
You reminded me of another situation, which is character clothes! If I have a character and a set of armor, if I add a new animation scene to the character, I have to add it to all the armors too!
Well, I don't know the "inners" of 3dgs, and the mdl7 format isn't public, but, as in most model formats, I would think that bones animation frames are simply values for rotation, translation and scaling of named bones. So, as easy as it would be to have models with 100% the same structure, I don't see the need for that. If a model has a 'head' bone, this bone will follow the frame values from the source 'head' bone. If either source or target entities have an extra 'nose' and 'hair' bones, they would be ignored.
And isn't the vertex assignment a specific model chunk already? I could have a source entity that is a simple skeleton with no geometry, or another meshed entity with geometry and assignments. The vertex assignments on the source model don't matter, as they would hardly be the same as the target entity.
Well, that's all speculation, since I am no expert. Anyway, my hopes is that this would not be a lot of work really, and is interesting enough to be implemented in future versions..
Cheers,
|Emilio|
|
|
|
Re: Reusable animation scenes between entities
[Re: jcl]
#82150
07/25/06 15:39
07/25/06 15:39
|
Joined: Jul 2005
Posts: 366
eleroux
OP
Senior Member
|
OP
Senior Member
Joined: Jul 2005
Posts: 366
|
Quote:
You can use the same animation for all your models. Just save and load the bones across models.
In the meantime, I could use any help to make this easier. How can I accomplish the line above? Save Bones... Load bones..
My target models are already rigged - with a skeleton - I only need the animation frames from another model.
|
|
|
|