PDA

View Full Version : how to tell a none its lenght to another object?


pelos
07-11-2011, 07:32 PM
i want to do a small script.

i need a bone effector to be where a null is and the bone to be the length on the distance between that null.

any recommendation on how to get something like that?

i did a curve and make it a tail, but i need the tip of a bone to be at the end of the curve.

Thanks.

ShaderOp
07-11-2011, 08:04 PM
Do you want to do this just once, i.e. because your posing the bones, or do you want this to be a constraint where the effector always follows the null and the bone always changes length so the tip touches the null?

pelos
07-11-2011, 10:30 PM
i have a curve with 4 Vertex,

i want the bone IK be driven by the position of the last point.

so i can do cluster with center on that vertex and will give me the null.
but if i parent the effector and move them around the Bone doesn't move. want to be like an aim constrain i guess.

i need to do it just 4 times. i think i can manually do it.

pelos
07-12-2011, 03:51 AM
this is a picture,

i need to match the place of the null. the same way you could press control+J and move the tip and effector to the null location.

Thanks.

geoath
07-12-2011, 09:01 AM
so i can do cluster with center on that vertex and will give me the null.
but if i parent the effector and move them around the Bone doesn't move.

from the manual, about parenting effector to an object outside of it's own chain:

"If the effector is the child of an object outside of its own chain (that is, you have parented it to a different object), it will behave as if it is still in the chain until you animate its translation. At that point, the effector is locked in the local space of its parent and you won't be able to control it by manipulating its parent. The parent acts as an "anchor" for any animation on the effector, but it can't create IK behavior (that is, it can't solve the chain). The only way to invoke IK is by directly manipulating or keying the effector, or by using the Force IK option."

you can also try instead of parenting a position constraint, and control the bone length with a distance expression maybe?

pelos
07-13-2011, 05:00 AM
more less got it with 2 ways.

A) as you mention, parent the effector to the null and "Force IK", this way the null will drive the IK, but doesnt aim at it, its like with children or constrain compensation.

B)select the Bone and to orient constrain to aim it at the null.

i know i dont need the lengt of the bone when i do the envelope but for vizualitation, how could i make the length the distance from the parent null of the bone to the driver?

mmm.... ICE.... how can i "get distance" from null A to null B? (i dont have Soft in this computer,) i will try some distance to something and see what i get.

Thanks.

mattmos
07-13-2011, 12:32 PM
You need a simple expression on the length of the bone, using dist(object 1, object 2) - or something like that, check the distance functions in the expression editor.

pelos
07-13-2011, 04:46 PM
Expressions__????
ok got to my pc and and did some Ice ice baby.

conected the global position of the root, same thing for the Target null
and there is a node call distance from object.
and i set that distance into the length of the bone, and vuala.....


after that i can delete the Ice tree if needed.....

conclusion
Aim constrain the bone to the target.
delete the constrain.
ice to get the length
delete Ice tree.


thanks for bouncing ideas.

CGTalk Moderation
07-13-2011, 04:46 PM
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.