CGTalk > Software > Autodesk 3ds max > 3dsMax SDK and MaxScript
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 10-02-2012, 05:06 AM   #1
DannyBoy3
Frequenter
portfolio
Daniel Coleman
Sydney, Australia
 
Join Date: Nov 2011
Posts: 220
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
 
Old 10-02-2012, 12:21 PM   #2
Gravey
3D Dude
Joel Hewitt
Sydney, Australia
 
Join Date: Dec 2005
Posts: 880
is the .scale property not enough for your purposes? or even the scale function?
what do you need to do exactly?
 
Old 10-02-2012, 01:25 PM   #3
DannyBoy3
Frequenter
portfolio
Daniel Coleman
Sydney, Australia
 
Join Date: Nov 2011
Posts: 220
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.
 
Old 10-02-2012, 02:15 PM   #4
denisT
MAX Doctor
 
denisT's Avatar
portfolio
Denis Trofimov
CA, USA
 
Join Date: Jul 2009
Posts: 9,420
Send a message via ICQ to denisT
@DannyBoy3
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.
Code:
delete objects p = boneSys.createBone [0,0,0] [10,0,0] [0,0,1] p.name = "parent_bone" b = boneSys.createBone [10,0,0] [20,0,0] [0,0,1] b.name = "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?
 
Old 10-03-2012, 02:22 AM   #5
DannyBoy3
Frequenter
portfolio
Daniel Coleman
Sydney, Australia
 
Join Date: Nov 2011
Posts: 220
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 retained....so , 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-03-2012 at 02:30 AM.
 
Old 10-03-2012, 09:34 PM   #6
DannyBoy3
Frequenter
portfolio
Daniel Coleman
Sydney, Australia
 
Join Date: Nov 2011
Posts: 220
yeah, just parent the rig to a helper object and it inherits the scaling. You were all right to ignore me. Simple..
 
Old 10-04-2012, 12:12 PM   #7
PEN
R&D/Technical Director
 
PEN's Avatar
portfolio
Paul Neale
PEN Productions
Canada
 
Join Date: Jun 2002
Posts: 7,416
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
http://paulneale.com
 
Old 10-05-2012, 12:23 PM   #8
DannyBoy3
Frequenter
portfolio
Daniel Coleman
Sydney, Australia
 
Join Date: Nov 2011
Posts: 220
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 ...is that still bad?

Last edited by DannyBoy3 : 10-05-2012 at 12:25 PM.
 
Old 10-05-2012, 12:23 PM   #9
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,481
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
CGSociety
Society of Digital Artists
www.cgsociety.org

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

All times are GMT. The time now is 02:53 AM.


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