How to scale joints?

Started by Geee, June 16, 2011, 07:33:24 PM

Previous topic - Next topic

Geee

Hey, I just started experimenting with jPCT and bones. I would like to make some parts of the model bigger or longer by scaling the joints. Is this possible somehow?

raft

you mean programatically? yes possible. have a look at JointChannel, it accepts scales array in its constructor.

a JointChannel is animation data for a single joint, many JointChannel's together compose SkinClip. create a SkinClipSequence, add SkinClip to it than assign it to an Animated3D or AnimatedGroup.

Geee

#2
Thanks, I'll take a look into JointChannels. However, I'd like to just deform the model initially and not animate it. I'm not sure if it makes a difference. I tried to modify the joint's local matrices, but there doesn't seem to be a way to scale it by a vector. I guess I could make a scaling matrix and multiply?

raft

yes, that should work too. you need to call Animtated3D or AnimatedGroup applySkeletonPose and applyAnimation after this.

doesnt make a difference, animation methods do the same thing behind the scenes.

Geee