manual joint linking [solved]

Hiho,
Hope I caught the right subforum to ask this.

I have a humanoid model with separate geometries for the eyes.
(I want to blend between animations as well as manipulate the headjoint.)

So if I blend between animations the eyes get separate interpolated as well, causing them literally to jump out of his head.

My first idea to fix this was:
to expose the headjoint and
controlJoint(headjoint,“modelRoot”,“LeftEye”)
in Order to fix its position to the headjoint.
It did work to some degree, the eyes did transformat according to the headjoints values when I turned the head…but the eyes position was horrible messed up.
flowing around 3feet above his head.
(imho it looked like it keeped a position vector and simply exchanged the world root for the headjointpos) but I didn’t find a solution to fix its position.

so my second idea was to :
to expose the headjoint,
controlJoint the eyejoints, (with eyes=…controlJoint(none,“modelRoot”,“LeftEye”)
and eyes.reparentTo(headjoint) them.

It seems to work just fine, no more eye jumping during animation blending ;
until I take control(joint) of the headjoint in order turn the Actors head left and right (with setH).

Then the head will turn as intended , but the eyes will be stuck in place.
Like the looney toon Coyote’s eyes that keep blinking at you while he is already falling of the cliff
:smiley:

Therefore I think that the Solution lies somewhere in between. But I can’t put my finger on it. :blush:

I’m not sure I understand why the reparenting trick didn’t work. I’m also not sure why the eyes should jump out of your model’s head when you blend between animations, unless the eyes were already out of his head in one of the animations–blending should only move the eyes from their position in one animation to their position in the other animation.

But anyway, here’s a better answer: create a “subpart” of your model, that includes all the joints except for the eyes. Create another subpart that includes only the eye joints. (See the Actor Animations page of the manual, under “Half-body animation”.) Now play your two different animations on the subpart that doesn’t include the eyes, and play whatever stable animation you like on the subpart that does.

David

Yeah,maybe I didn’t explaint it to well.
They eye position during animation A and Animation B is correct.
but during the transition from A to B or vice versa the path dosn’t match with the head’s.
and if I controle the headjoint they don’t get effected at all.

So I was under the imression that the eye joints aren’t part of the models joint hierarchy and just have a position over time that is in sinc with the heads.

The subparts are an interesting Idea but I’m afraid they don’t tackle the problem.
I did give it a try but,
the eyes are still unaffected by any manipulation of the headjoint and will stick in the place animation A or B wanted them to be.
Playing animation A for Subpart “Eyes”
and animation A for subpart “everything but the eyes”
at the same time ,
has the same effect as if I wouldn’t use subparts at all.

If i exlude the eyes from all anymations or keep the eyes in animation A and blend the rest to Animation B their position willbe/is “wrong” even after the transition is over.
So it would actually make things worse.

I think its really about getting their Position attached to the head without messinging up their position somehow. :confused:

Oh, I see. Right, all of this technology, including blending in general, requires that your model’s skeleton is structured in a sensible way, so that parts that should be logically connected are in fact connected in the skeleton.

If it is not the case that your eyes are attached to your head in the skeleton–and it does sound like this is not the case–then you will need to correct this first.

The best place to correct this is in the modeling/animation tool that created the skeleton in the first place. But if you can’t do it there, for some reason, then you can do it with egg-optchar, using the -p command-line option. Just be sure you apply the same change to your model and all animation files on the same command-line pass to ensure that they get corrected together.

David

Will this help:
1,2:change anim
3,4:setblend
sourceforge.net/projects/mer/fi … p/download

If you have your eyes as separate geoms/model, then just reparent them to the controlled joints, leye and reye.

Edit:
Sry forgot to set the cam to right place, just zoom out by holding the right mouse button, or ‘mouse3’ for fancy mouse owners.

Thanks for the help.

An in case someone ever has a similar problem and stumbles upon this thread:

egg-optchar’s -p option solved the problem that they didn’t rotate with the head ,
and made eye.reparentTo(headyjoint) the solution to the jumping eyes during the blending transition.