Author Topic: How to scale joints?  (Read 17838 times)

Offline Geee

  • byte
  • *
  • Posts: 3
    • View Profile
How to scale joints?
« on: June 16, 2011, 07:33:24 pm »
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?

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: How to scale joints?
« Reply #1 on: June 16, 2011, 07:59:52 pm »
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.

Offline Geee

  • byte
  • *
  • Posts: 3
    • View Profile
Re: How to scale joints?
« Reply #2 on: June 16, 2011, 09:41:18 pm »
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?
« Last Edit: June 16, 2011, 09:50:02 pm by Geee »

Offline raft

  • Moderator
  • quad
  • *****
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: How to scale joints?
« Reply #3 on: June 16, 2011, 10:03:42 pm »
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.

Offline Geee

  • byte
  • *
  • Posts: 3
    • View Profile
Re: How to scale joints?
« Reply #4 on: June 17, 2011, 12:15:41 am »
Ok, thanks.