View Full Version : I want my bones to stretch
minimi13 01-16-2003, 06:11 PM Hello,
i setup a leg with bones and have already the linking...
and know i want my leg bones to stretch when i'm moving the helper...like the IKJoe from www.pepeland.com
I unchecked freeze lenght in the bonetools for the 2 bones that i want to be stretched but nothing happens no stretching.
can someone tell me what the hell i'm doing wrong?
maybe step by step for an idiot like me...
Thanks
minimi13
|
|
gaggle
01-17-2003, 11:52 AM
Actually I think the IK-link-that-stretches is a somewhat complicated process to set up. I'm not entirely sure, nor have I ever done any conclusive testing, but I belive it involves the normal IK bones (let's say "upper" and "lower"), then attaching several smaller segments of bones along the lenght of, say, the upper bone. These smaller segments are just ordinary FK bones, linked to the upper bone, with expressions driving their movements to follow the basic movement of the upper bone, but stretching to match the location of the IK goal of the IK chain.
Makes sense? Even a tiny bit? :)
Anyway, my suggestion: download Autorig from Michael Comet's (http://www.comet-cartoons.com) site, and enable Stretching and let it do the magic. You can reverse-engineer your way to a home-cooked solution from there. Hopefully.
minimi13
01-17-2003, 12:15 PM
thanks for your answer, i will check the stuff on http://www.comet-cartoons.com/
here is a picture of what i want my bones to do (stretch!):
maybe someone knows a simple solution:
Thanks
minimi13
Hi there,
I pulled this rig appart myself once and it was A bit of a head f#@k. I cant remember exactly how it goes but you have to make script controllers for the length of the bones... So if you are trying to reverse engineer this rig look for script controllers on the bones......
I hope that gets you close to the solution? I know they use a very handy piece of scripting in their controller called "depends on" this will allow you to have a scrip controller update interacively........
I've used it before to interacively update the distance between two points.
Script controllers seem scarey at first but they are actually pretty usefull. I sometimes use them to store values that other objects will react to....
minimi13
01-17-2003, 01:28 PM
Sfinktinator:
Thanks for your answer.
then i have to learn some Scripting i guess, because i know nothing about it (because i do mainly modeling and texturing).
thanks
minimi13
CarlosA
01-18-2003, 10:57 AM
no need to fear Carlos is here!!!!
you need to add a script controler to the x position of the wrist bone and the fore arm bone. and use this simple script.
dependsOn $Boped_help_R_HAND $BOPED_R_arm_Clavique $BOPED_CENTER;
d = distance $Boped_Chain_R_arm.pos $BOPED_R_arm_upper.pos;
st = (d - 46.6674);
orig = 23.7947
if (st < 0) then st = 0;
m = $BOPED_CENTER.custom_attributes.arm_R_S;
if (st > m) then st = m;
st = st + $BOPED_CENTER.custom_attributes.arm_R_E;
p = orig + (st/2);
"of course you will have to change the object names to the ones in your scene and change a few numbers"
late me atempt to brake it down for you.
basicaly we are going to fake the stretch by moving the bones on their x adis based on the distance between the ik goal and the shoulder after the arm has been fully extended.
lets try to translate the script shall we?
dependsOn $hand_controler goes here $Clavique_bone name goes here $object that holds the amount of stretch attribute goes here;
---the "dependsOn" line basicaly tells max what objects are involved in the script.
d = distance $name of the ik chain of your arm.pos $name of the ---upper arm bone.pos;
-this line basicaly creates a variable. that tells max what the distance between the shoulder and the ik chain is at all times.
st = (d - distance of arm fully stretched);
--this variable subtracts the d (distance between the ik chain and the shoulder) formdistacne between the shoulder and the ik chain when the arm is at full extension to find out what the distance is when the arm is a at full extension just pose the arm
so it's fully extended while steel keeping the ik chain as close to the rist pivot as posible and type this line in the listener
distance $name of ik chain here.pos $name of upper arm bone here.pos;
orig = 23.7947
-- this is just the original position of the bone.
--when you first apply the script controler you will find this value on the lefthand corner of the script controler properites window.so writte it down so you can replace it on the script.
this value will change from bone to bone.
if (st < 0) then st = 0;
if (st > m) then st = m;
p = orig + (st/2);
---this three line are where the magic happens.
this "if" statemetns basicaly make two choices. one, when does the stratching start to happen and two how much stretch will happen!
m = $name of object that has the stretchy attibute spinners.custom_attributes.arm_R_S;
st = st + $name of object that has the stretchy attibute spinners.custom_attributes.arm_R_E
and finaly this lines hook up the the amount of stretch to spinner attributes on an object. allowing you to animate and control the amount of stretching that takes place.
ah few notes when you replace the names of objects on the script for names of object on your rigg, use underscores instead of spaces.
well i don't know if i have broke it down enough for you guys, but maybe some one can get something out of this quick explenation of the "stretchy limbs" script by daniel maritnez lara.
i also recomend the spine rigg tutorial that comes with max5. it shows a similar way to achive stretchy spine in spline ik.
it may be an esier intro to this type of controls.
lets see maya do that baby!!!!
not realy i love maya too.
Carlos.
come on people get rigging!!!
Mahlon
01-18-2003, 11:22 AM
CarlosA, you RULE:beer: What a great explanation of what's going on there!! Makes me want to set up some stretchy bones 'cause now I understand what's happening.
Thanks,
Mahlon
minimi13
01-18-2003, 11:23 AM
CarlosA:
Thank you very much...
That's was exactly what i am looking for.
I think i understand how the script works, but i know that it sounds stupid, but how do I add a script controler to the x position of the bone.
Do i have to select the bone and then go to maxscript then to listener and to new script and write it down ...save it..and run it.
or how do i start...
Sorry but i never worked with scripts.
(how can you see the script of the .max file for IKJoe from daniel maritnez lara)
It would be great if you could give me the answer to this last question.
Thanks again
minimi13
CarlosA
01-18-2003, 11:35 AM
by no means my friend,
onder the motion pannel tab (the one with the spinning wheel).
in the "assign controler" roll out there is a window that list all your controlers.
under FK Sub-Control.
look for positon, highlight and press assign controller button (top left corner of the window)
a new window opens check position xyz and press ok.
three more choices should apper under position
one of them being "x position" highlight it press the assign controler button and choose "float script" and press ok.
a window should upon where you can add this script.
remember you must add this script to the wrist and the fore arm.
good luck bud.
minimi13
01-18-2003, 12:11 PM
Thank you very much for this good step by step instruction, now i know how to start.
thanks
bye
minimi13:bounce:
CarlosA
01-18-2003, 12:14 PM
i'm just glad i could help guys!
Mahlon
01-18-2003, 06:32 PM
Originally posted by minimi13
CarlosA:
(how can you see the script of the .max file for IKJoe from daniel maritnez lara)
Thanks again
minimi13
Also, minimi13, (are there really 13 of you now? it's a plague) If you want to see scripting on martinez lara's rig, you can select his bones and, in the same 'motion panel/assign controller' right click on the x channel (just where CarlosA said to put yours) and click properties. Sorry, I know that's kind of obvious, but I didn't know about doing that 'properties' under right click until someone told me about it.
Mahlon:beer:
minimi13
01-18-2003, 06:50 PM
Mahlon:
thanks, but after CarlosA had told me where and how i have to put in the script, it was obvious that i have to look there,
But thank you anyway for telling me how to do it.
P.S.: i don't know if there are 12 other minimis, but i think one my kind is enough for the world. Because i'm so stupid...
bye
minimi13
CGTalk Moderation
01-14-2006, 04:02 AM
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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.