About Store Forum Documentation Contact
Donations:
309$/mo



Post Reply 
Animation with changing body offset
Author Message
olej Offline
Member

Post: #1
Animation with changing body offset
Hi, my team recently got hands on Kinect and captured several animations. As an example, let's take an animation of drunk guy trying to walk. In opposition to all (pardon me if I'm wrong) standard Esenthel animations handled by Chr class, this one has a changing offset between body and (0,0,0) and due to that fact standard treatment (we're using classes derving from Chr)
Code:
T.cskel.animate()
doesn't suffice. Despite mesh and bones moving correctly, the physical body remains in the same place and mesh returns to this place after animation is done. As you can expect, this drunk guy doesn't really walk straight so I cannot replace walk/run animation and modify the speed of movement.

What is the correct/advised way to deal with this kind of situations? Should I somehow manually correct the pos of the Chr/it's actor using i.e.:
Code:
cskel.findBone("Body")->pos
(T.cskel.pos() doesn't change during animation)
or in similliar way? To be honest, I've been trying some of those manual corrections and didn't really figured out anything, instead I've got more and more confused.

Or maybe I should change the animation so that the skeleton stays in (0,0,0), get the path on which the drunk guy was initially supposed to walk on and manually change his actor position according to current time of animation?

Any suggestions? Thanks in advance
05-15-2011 12:17 AM
Find all posts by this user Quote this message in a reply
llynx Offline
Member

Post: #2
RE: Animation with changing body offset
(05-15-2011 12:17 AM)olej Wrote:  Or maybe I should change the animation so that the skeleton stays in (0,0,0), get the path on which the drunk guy was initially supposed to walk on and manually change his actor position according to current time of animation?

This is the way I've done it in the past and I'm not sure of another way around this with equal control over the anim/mesh.

You could always track the position the guy and at the end of the animation cycle then move the character to that point but thats not very elegant for a controlled character, but useful for quickly making animated cinematic/npc characters.
(This post was last modified: 05-15-2011 06:02 AM by llynx.)
05-15-2011 06:02 AM
Find all posts by this user Quote this message in a reply
olej Offline
Member

Post: #3
RE: Animation with changing body offset
One thing more I noticed: I thought I could easily get to work standard (i.e. walk/run) animations, but methods like chr.ActionMoveDir() work correctly only if the character is dynamic (if it is kinematic, they only play walk/run animation staying in the same pos), but I had to disable it (overrding chr.enable() so the chr stays kinematic no matter the distance from center of action) because dynamic NPCs can be pushed like billard balls. Therefore now I have to choose between rewriting all animation system or collision handling. Honestly, I don't understand why would Chr class allow such a silly collision when it was probably supposed to handle things like NPCs.
I guess it won't be as simple as I thought it to be. If anyone have any suggestions please share wink
05-18-2011 05:39 PM
Find all posts by this user Quote this message in a reply
Post Reply