matrix scale

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Display Modes
  10 October 2012
matrix scale

i'm wanting to scale an object using matrix transform rather than the scale tool. Not sure how this works on a bone object however. A fragment of code might help. thnx in advance
  10 October 2012
is the .scale property not enough for your purposes? or even the scale function?
what do you need to do exactly?
  10 October 2012
Want to scale up a set of bones using bonesys. I know its not recmmened but I simply want to establish the bones in relative positions so the user can then manipulate them. trouble is , when I use the scale technique, it messes up the bones in that the parent stretchy bone loses it property to be moved around in all axes by the child bone, so that it has the strecthy effect but not able to be moved around except along central axis. Don't know why. IF I apply xform gizmo sacle everything is fine, but I really dont want the extra modifeie and orange gizmo there. I thought using matrix 3 scale would work but same prob perists. I'd like to know why this behviour exists, but I guess I can live with it. But like to now my scale doesnt presrve all stretchy bone properties.
  10 October 2012
what you are trying to do with bones is completely wrong. it sounds like you only need that is to stretch the bone (not scale it in bone's direction).
what actually the bone stretching is? it's moving a child bone in its parent's direction. for bones it's position x value.

 delete objects
 p = boneSys.createBone [0,0,0] [10,0,0] [0,0,1] = "parent_bone"
 b = boneSys.createBone [10,0,0] [20,0,0] [0,0,1] = "child_bone"
 b.parent = p
 p.boneFreezeLength = off
 -- stretch the parent bone by moving child:
 b.pos.controller[1].value += 10

or do you really want to scale a bone?
  10 October 2012
Yes I already tried exactly what you describe and it works Ok but actually I want to scale up a set of bones on click and drag, like the way the biped model is drawn out in max, only for a simple set of face bones. I mean...couple of approaches work well enough I suppose already,(I don't like the xform modifier solution as it leaves that orange gizmo on the bone...) - just looking for a better solution. Thought scaling matrix might work but it screwed up the child bone movement for some reason I can't quite fathom, since some aspects of the bone were , yeah, i want to scale up a set of bones.

Oh by the way, I did try this: use xform to scale, then scaled each bone at the end of the drag by using bone.scale*=bone.mod[1].gizmo.scale.value then deleting the xform mod...(pseudocode),but after this operation, the bones didnt behave quite right either.

Last edited by DannyBoy3 : 10 October 2012 at 02:30 AM.
  10 October 2012
yeah, just parent the rig to a helper object and it inherits the scaling. You were all right to ignore me. Simple..
  10 October 2012
Never scale rigs! Unless you have a really good reason to do so. Your reason is not a good one.

Moving the bones and having them stretch is the way that you want to do it. I have the tools that you all ready describe I click and drag out body parts. When I store the positions of the bones I store them as a normalized rig, meaning it is all just one unit in length then when I click and drag I can multiply the positions by the distance the mouse has traveled plus the innitial click position. Call the reset bones functions as you go and it looks like the bones are scaling but they are not.
Paul Neale
  10 October 2012
Ok thnx for that Paul. Do you mean that you store start and end positions of each bone and multiply those by the scaling fcator? be great to see some code but I know you're busy.
I know never scale rigs but I'm actually scaling only the bones, not the rig with ctrl objects that still bad?

Last edited by DannyBoy3 : 10 October 2012 at 12:25 PM.
  10 October 2012
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 08:35 PM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.