XSIforum.com

Problemas con Tutoriales Stretch

0 Usuarios y 1 Visitante están viendo este tema.

Problemas con Tutoriales Stretch
« en: 15 Noviembre 2008, 08:56:52 »
Hola a todos, me encontré este tutorial en la red para lograr entre otras cosas hacer el stretch de un brazo, he seguido la primera parte pero tengo problemas, quizás con las expresiones o algo que no estoy haciendo bien, para salir de dudas por favor verifiquen si siguiendo estos pasos se logra el objetivo deseado y de ser negativo me pudieran decir bien claro y paso por paso como puedo hacer para lograr el mencionado objetivo. Gracias


STRETCH
1. Create a 2-bone chain in the right viewport and name the root “r_arm”, the bones “b_upArm” and “b_loArm”, and the effector “e_arm”. This naming convention makes it easy to follow this tutorial and allows for quick selection from XSIs’ MCP, using “b_*” etc.
2. In the ppg of each bone, set the length of the upper arm to “3” and the lower arm to “4”, to be able to work with round numbers (but be able to distinguish between them).
When moving the effector, those lengths always remain the same, until the arm is stretched and the effector cannot be moved away from the root any further.
By changing those length values, the arm can be stretched – and again returned to its original length. These changes will be dependent on the effectors’ position, or better: the distance from the effector to the chain root.
This distance can be measured via an expression and further be used on the length parameters of the bones.
To keep a better overview, it might be helpful to create a separate object that keeps track of this distance measuring.
3. create a null (name it “dist”) to measure and at the same time display the distance between the eff and root.
4. Set an expression on the local y translation of the null (kine.local.posy), enter the following
expression ctr_dist( r_arm.kine.global.pos, e_arm.kine.global.pos ) and hit apply.
When moving the effector now, the null will move along its y-axis (you can move it a bit to the side in z) to the same value as the distance between the root and effector.
5. Apply an expression on the length of the upper arm, telling it that when the distance from the effector to the chain root is bigger than the sum of both original bone lengths (hence, a stretched arm), the bone will gradually be stretched (to meet the effector). The sum of the original bone lengths (3+4 =7) will be referred to as straight arm distance.
Cond(dist.kine.local.posy > 7, 3 + (dist.kine.local.posy – 7) / 2, 3)
This means: When ( the distance is > bigger than the straight arm distance (3+4), THEN set the bone length to it’s original value (3) + HALF of the difference (as it’s 2 bones) between the actual distance (dist) and the straight arm distance (dist – (3+4)).
6. Apply the same expression to the lower arm, taking into account that its original length was 4, not 3 Cond(dist.kine.local.posy > 7, 4 + (dist.kine.local.posy – 7) / 2, 4)
Now the effector can be pulled from the root as far as you like, and the bones will stretch accordingly and also compress back to their original lengths and behave normally.