Morpher Issue?

Started by AGP, September 24, 2014, 08:42:30 AM

Previous topic - Next topic

AGP

Raft, please check this (http://www.jpct.net/forum2/index.php/topic,4127.0.html) thread out. I went with the path of greater resistance but indeed greater results (Egon's second option). But in doing so, I think that I may have exposed a bug in bones.

The model has been re-rigged and exported as a two-part model (submesh0 for everything opaque and submesh1 for the furry parts). It looks phenomenal. But it had three morph targets in Max. Of those, I only used one (which is properly listed in OgreMax both for the fur and for the body--same names all around (fur has an "Idle" for Skin, body has an Idle for Skin, etc.)) in my idle animation. I'm fairly certain that as I execute the following code, only AnimatedGroup.get(0)'s morph is being used.

model.animateSkin(frame, currentAnimation);
model.applyAnimation();
if (poseClipSequence != null)
     model.animatePose(frame, currentPoseAnimation);//IT'S NOT NULL, AND THE MODEL IS BLINKING, BUT I DON'T THINK THAT THE FUR'S animatePose() IS BEING CALLED
model.applySkeletonPose();
model.applyAnimation();

raft

looking at the AnimationBlendSample, the correct order of calls should be:

animatedGroup.animatePose(..)
animatedGroup.animatePose(..)
..
animatedGroup.animateSkin(..)

animatedGroup.applyAnimation()


does that help you?

AGP

No, I think that I got around that by calling applyAnimation() between animateSkin() and animatePose(). My problem is that only sub object 0's pose seems to be getting animated.

raft

not really. you cannot workaround it. pose animation will clear skin animation of relevant polygons if applied after skin animation

AGP

But it's not. The character is moving just fine. I'll flip the order, but I don't think that will solve the morpher thing, do you?

raft

not sure but possible. i correct my self. pose animation does not clear skin animation but its direction is effected by it. for example if there is a pose anim making nose taller and you rotate the head 90 degrees by skin animation, nose will distorted to side instead of to front.

AGP

Oh, that makes more sense. Thanks. I'll post my result soon.

AGP

I tried several combinations of the following code, but the only way in which he blinks is with the above (and following) code:

model.animateSkin(animationPosition, currentAnimation);
// model.applyAnimation();//ACTUALLY THIS ONE IS NOT NEEDED
if (poseClipSequence != null)
     model.animatePose(animationPosition, currentPoseAnimation);
model.applySkeletonPose();
model.applyAnimation();

raft

well thats not the way. i'm not sure whats going on there. please have a look at AnimationBlendSample. you can also try your model there