PDA

View Full Version : Stretch bone problem

walfridson
11-06-2005, 03:14 PM
Doing some stretching using the expression method. Ran into problems... The childbones gets stretched as well..
higher distance between bone and target = increased Z scale

Are there any way to have the stretching but limiting it to that specific bone?
I want the hand intact but stretching going on in the arm

Save my day boys :)

Dodgy
11-06-2005, 04:22 PM
Check my web page :)

walfridson
11-07-2005, 02:16 AM
Dodgy, will you marry me? :)

evenflcw
11-08-2005, 06:27 AM
Make it a threesome?*

Unless you figured it out all ready, the idea is to place "buffer bones" inbetween each scaling bone. The buffer bone is used to cancel out the scaling so it isn't transfered down the hierarchy. The math is pretty simple to. Add the expression "1 / ParentBone.scale(Time).z" to the child bones scale.z and it should cancel out all the parents scaling so it isn't transfered to the bones following the child/buffer bone.

Parent scale = 1; Child scale = 1/Parent scale = 1;
Parent scale = 0.5; Child Scale = 1/Parent scale = 2; 2*0.5=1!
Parent scale = 4; Child Scale = 1/Parent scale = 0.25; 4*0.25=1!
Parent scale = 0; Child scale = 1/Parent scale = Illegal :)

With the resulting scale always ending up at 1, subsequent item in the hierarchy remain at their fixed size.

*I'm so kidding!

walfridson
11-08-2005, 07:47 AM
Thanks evenflcw :)
Tried typing 'bla.scale.z = 1' directly into expression but that didn't work... No error, just didn't take.

evenflcw
11-08-2005, 08:44 AM
Sorry, that part was just a my poor way of demonstrating how the expression works - how parent and child scale will/should always equal 1 for this to work. Also, you typically won't have equal signs (=) anywhere in an expression. So, the expression to apply to the child/buffer bones Z scale channel is :

1 / [ParentBoneName].scale(Time).z

I attached a simple scene. Check the Motion Options for the stretch_end bone.

Dodgy do you know if lscript modifiers possibly evaluate faster than expressions?

Dodgy
11-08-2005, 09:34 AM
I have no idea :P