Same Animation, Different Skeleton SIZES

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
interfiction
Posts: 4
Joined: Tue Aug 11, 2009 11:54 pm
Location: Australia

Same Animation, Different Skeleton SIZES

Post by interfiction »

Hi good irrlicht folks, thanks for a good looking engine.

I'm past using the engine with your demos and am investigating how I can alter bone scales of bipeds when skeletal animations are re-used amongst my 3D players; all the human players will look different but have the same basic animations.

Hence, I have a number of questions to make sure I'm on the right track:
  • - Do all the bone lengths of the target skeleton have to be the same lengths as the animated source skeleton?
    - In part relation to the first question, is it even possible to manually change the length of a imported model's bones&mesh in irrlicht?
    - If so, how, and would this break either the target skinned mesh model or the target's use of the source skeletal animation?
Not quite sure and I'm still learning 3D, so answers to any of the questions, any opinions, code tutorials, different ideas, etc. would be greatly appreciated. As there is no official documentation for Irrlicht's skinned animation, I've listed below what I've gleamed from hours of reading this forum... extra clothing or weapons for an animated character seems to be a very FAQ.

Cheers All,

Interfiction


______________________________________
Forum help for skeletal/skinned animation beginners:

Using skinned mesh animations (Luke)
Skinned Mesh Class heirarchy (Luke)
Attaching meshes together (eg. hair to head)
updateAbsolutePosition of attached node
Cloning animated meshes
Merging skinned meshes
Manually moving joints during animation
Manual animations of skeletons (xray's code)
Added clothes need a skeleton too
Clothing cache
r2d2
Posts: 211
Joined: Mon Nov 24, 2003 5:22 pm

Post by r2d2 »

What exactly do you mean when you talk about the length of a bone? The relative offset to the parent bone (= the distance between the bone and its parent)? Or do you mean something else?

If you are talking about the relative offset, then the first point depends on whether you clone the animation or whether you just hand over one animation pointer. I am not sure what the current skinned mesh scene node does, i think it will just give you a pointer to the animation and not clone it, so if you change the distance between two bones you will change it for every model which uses this animation. And btw you have to change the distance for every single frame, afaik.

Yes it is possible to modify the model's skelleton.

If the Irrlicht devs will approve my new implementation of the skinnedMesh, then i will provide some docs for it but first of all, i have to get it finished ^^
R2D2's Irrlicht Mods
Messed up with my database so the page is not working at the moment -.-
CPU: Core 2 Quad Q6700RAM: 4096 mb Graphics: Radeon 4850 512mb Sound: on board InternetConnection: DSL
interfiction
Posts: 4
Joined: Tue Aug 11, 2009 11:54 pm
Location: Australia

Post by interfiction »

Thanks alot for the reply r2d2;
r2d2 wrote:What exactly do you mean when you talk about the length of a bone? The relative offset to the parent bone (= the distance between the bone and its parent)? Or do you mean something else?
Unless I've misunderstood how 3D skeletons work, something else. I'm specifically referring to the length of each bone itself and not and distance between each bone. I.e. the distance between joints.

To give more information, I'm hoping to have a non-animated base-skeleton that then, for each new character instance (clone of this base), has modified bone-lengths. The important point is whether an animation of another skeleton, similar to the base skeleton, when applied to these altered-bone-sized skeletons, will work for any of them. That is, I'd alter bone sizes of a skeleton but then use animations from another skeleton. In pseudo-code that'd be

Code: Select all

base-skeleton

// export 2 base skeletons from my 3d modeler
skineleton = base-skeleton + skin
animeleton = base-skeleton + animations

// in irrlicht
character = new skineleton
common-animations = load animeleton
alter character's proportions ...eg. leg length
character->useAnimationFrom(common-animations);
r2d2 wrote:Yes it is possible to modify the model's skelleton.
Does this mean that the skinned mesh would stretch? Annoyingly I'm hoping to modify a characters proportions to fit clothing, rather than the other way around :twisted:
r2d2 wrote:If the Irrlicht devs will approve my new implementation of the skinnedMesh, then i will provide some docs for it but first of all, i have to get it finished ^^
Cool, is there a link somewhere to what your ideas are?
r2d2
Posts: 211
Joined: Mon Nov 24, 2003 5:22 pm

Post by r2d2 »

Oh now i understand what you mean with bone lengths ^^ i normally make no difference between the two words joints and bone, but you are right, there is certainly a difference.

The relative position of a joint to its parent joint equals the bone length. You can alter these positions and scale the static model that way. But you will run into troubles when trying to alter the animated skeletons, at least when using my skinnedMeshScene node (not sure about the current Irrlicht implementation, cause i have accidentially completely replaced it ^^). My implementation is just exchanging pointers to the animation data. If you alter a bone length in the animation data you will alter it for every single model which uses this animation. Every single animation frame got its "own skeleton". It got the same number of joints but they are at different positions. You would have to alter the bone lengths for every single Frame of every single animation to accomplish your task.

But one could think about altering the new implementation so you could alter each bone length individually, without having to alter it for every frame, just the baseframe. (Perhaps that's already possible in the old implementation but i'm not sure)

Why don't you use "simple" scaling? Or split up the model into several parts and scale these ones? But that doesn't look as good as having one mesh, that's for sure.

Oh and yeah you can find the thread here
R2D2's Irrlicht Mods
Messed up with my database so the page is not working at the moment -.-
CPU: Core 2 Quad Q6700RAM: 4096 mb Graphics: Radeon 4850 512mb Sound: on board InternetConnection: DSL
interfiction
Posts: 4
Joined: Tue Aug 11, 2009 11:54 pm
Location: Australia

Post by interfiction »

Aha! Good work; now we're in sync.

As I'm making my first foray into 3D, it seems a wise move for me to try the simple scaling/stretching of different parts first. It seems a bit odd to continually alter every bone for every animation and I guess I'd have to sort out a baseframe. I'll head onto working with the skeleton animation alterations later, once I have more experience.

Thanks for the help.
Post Reply