PDA

View Full Version : expression challenge



Abigor
11-24-2010, 10:07 AM
so here is my problem...

i have a tube that is being morphed/extruded down a bone chain, so the tube starts short, and the morph extrudes it along the length of the chain, like in William's video tutorials.

im using PLG Curve Bone to control the shape of the bone chain. when you move around the controllers, the bones dont stretch to compensate for the change in the overall length needed to make them complete the chain at the GOAL object where the IK ends. to put this another way, the more you spread apart the objects controlling the curve, the more the tip of the chain pulls away from the GOAL. conversely, if you bunched up the controllers, the bone chain would extend PASSED the GOAL.

so, is there a way you can tell the bones to stretch/compress (bone rest length?) based on the overall length of the curve? basically say 'make sure you are always long enough to touch the goal'?

i know stretchy bone chains are possible in maya, but i have no idea if its something that can be done in LW. i also have no idea how to write expressions beyond simple channel following, so some insight/help/examples/working expressions would be greatly appreciated.

thanks!

RebelHill
11-24-2010, 10:29 AM
cant be done as there's no way to get length parameters for the curve that PLGcurvebone is drawing internally based on the null positions.

the closest you can get is to use the vMag command to get the linear distances between each null in the control group, add those values together, and then divide it by the number of bones in the chain to get an approximate value of how far to move each bone on its Zaxis... but since this is the linear distances, the result will always come a lil short of the goal still.

Abigor
11-24-2010, 10:32 AM
well thats not the answer i was hoping for!

is there anything that could be done to function like PLG Curve Bone, but still make the bone chain reach the goal? like building a bone chain and just using IK goals, instead of PCB control objects? ... though i think that would lead to less curve chains and more hard corners.

RebelHill
11-24-2010, 10:50 AM
again, nope.

there's a few ways to do multigoal IK style chains, with either IK, or expressions, or other tools like multi targeting, but for bones (or anything else) to follow along a curve/spline, curve bone is all there is.

Abigor
11-24-2010, 10:51 AM
well currently im just manualy keying the morph amount so the end of the tube stays close to the goal. i was hoping there would be a way to automate it, but i guess im SOL.

thanks for the info!

Nangleator
11-29-2010, 01:07 PM
Can you reverse the direction of the bones in the chain so the base is where your goal was? That way, the problem is at the front, and not at the end. Make sense?

Abigor
11-30-2010, 07:12 AM
does make sense, but i was just told i hafta scrap the last 3 weeks of work i put into this and build it all again in maya, from scratch, in a day.

Nangleator
11-30-2010, 08:04 AM
Hmm. Maybe some day, when they're building my house, I can tell them to stop all work, scrap what's been done, and rebuild the house using gold hammers.

Abigor
11-30-2010, 08:04 AM
ya no sh1t, eh.