PDA

View Full Version : custom parameter problem


seb4d
09-24-2004, 10:41 AM
Hi !
I want to create a custom parameters set that controls fingers poses of my character.
I have created one custom parameter that closes the hand by using "link with" on all the fingers' rotations, so that I can animate the slider and the hand is slowly closed. Now I want to create another parameter that does another pose with the fingers, but the "link with" option is no longer available since I used it already.
How do you create several poses with "link with" on the same axis ?

Eraq
09-24-2004, 11:14 AM
I dont think its possible. (correct me if im wrong). A way to achieve what you want is to make clips of the different poses you have, and store them in the mixer.

Erik

seb4d
09-24-2004, 11:21 AM
Ok this seems a good solution too !
Is it possible then to use this clips with sliders in a custom parameters set ? Just like with shapes ?

foxco
09-24-2004, 05:31 PM
If you want I can show you how to create a hand custom param set that will give you:
-inidividual finger bone curl
-finger chain curl
-4 fingers curl
-all fingers curl
-individual finger spread(side to side for whole finger)
-4 finger spread
-and all fingers spread

With a regualar 5 finger hand and 3 bones a finger it works out to 29 sliders for 110% control IMO

its very useful and its not done with links but just math and conditions in expressions

i will post again later how to do this, im currently at work and my breaks over :)
Cheeeers:beer:

Fox

seb4d
09-24-2004, 07:33 PM
Indeed I am very interested in a demonstration XsifoX !
Thank you for this offer, take your time.
:beer:

foxco
09-25-2004, 09:31 AM
For this Example Create a new scene and start a hand with a 1 Bone chain For the hand itself and 5, 3 bone chains for the fingers.

-name the Hand bone >"Hand_Bone" :) and name the fingers accordingly

-Make the Fingers Children of the Hand_Bone

-Branch Select the "Hand_Bone" and Create>Custom param Set Named "Finger_Sliders" with the branch slected This will allow you to select the param set on any of the objects in the branch selection, But the True param Set will be located under the "Hand_Bone"

in the param set of the "Hand_Bone" you will create 29 params(for 5 finger, 3 bone per finger hand)Each with 0-1 Range

params:

thumb_bone1
thumb_bone2
thumb_bone3
thumb_curl
thumb_spread
""Repeat for all fingers then add the last 4 params""
_4Fingers_curl
_4Fingers_spread
All_curl
All_spread

i will explain the IndexFinger for this example as the thumb will not include "4fingers_curl and spread" in their expressions

Generaly the best Rotations for fingers are going to be 'Y-Spread-side to side' and 'Z-Curl or close' with the order of operations set to 'XZY' < Set this on the First bone of the chain

select the first Index Bone, Open Kinimatics(ctrl+k)>Right-click on Rotation "Y">Set Expression

The Key to the Expressions is to know The MIN and MAX of the Rotation you are goign to place an expression on
"Index_Bone1" roty
Ymin=-30
Ymax=10 -- "note the Difference is 40"

in the expression editor you will write a conditional expression
__________________________________
( cond( ( ( Hand_Bone.Finger_Sliders.Index_spread*-40 ) +
( Hand_Bone.Finger_Sliders._4fingers_spread*-40 ) +
( Hand_Bone.Finger_Sliders.All_spread*-40 ) ) >-40 ,
( Hand_Bone.Finger_Sliders.Index_spread*-40 ) +
( Hand_Bone.Finger_Sliders._4fingers_spread*-40 ) +
( Hand_Bone.Finger_Sliders.All_spread*-40 ) , -40 ) ) +10
__________________________________
Apply it!

NOW the Explaination.. ( cond( "a" >-40 , "b" , "c" ) ) "+10"

"a"- the condition > ((...Index_spread*-40)+(..._4fingers_spread*-40)+(...All_spread*40)) >-40 is basicaly saying when= ((0 to 1*-40) + (0 to 1*-40) + (0 to 1*-40)) is greater than -40, then the condition is "true" which means the rotationY is extracting its value from section "b"

so the condition is true until any number of the sliders, or all of the sliders values add up
to =1
index_spread(.5) + _4fingers_spread(.2) + all_spread(.3) =1 (sliders)
((.5*-40) + (.2*-40) + (.3*-40)) =-40


"b"- if the condition is true then extract the value of this section for the rotation until it reaches a value -40

"c"- if the condition reaches -40 then extract the value from this section for the rotation

"+10" changes any value that comes out of the condition to be added by 10 to compansate the rotation so it can reach its -30 Min and 10 max, instead of 0 to -40
================================================
Now for the Z rotation of "index_bone1"
we'll make
Min=-90
Max=15
right-click on the Z rotation of the "index_bone1" kinematics and open expression editor again
Set this expression:
___________________________________
( cond( ( ( Hand_Bone.Finger_Sliders.Index_bone1*-105 ) +
( Hand_Bone.Finger_Sliders.Index_curl*-105 ) +
( Hand_Bone.Finger_Sliders._4fingers_curl*-105 ) +
( Hand_Bone.Finger_Sliders.All_curl*-105 ) ) >-105 ,
( Hand_Bone.Finger_Sliders.Index_Bone1*-105 ) +
( Hand_Bone.Finger_Sliders.Index_curl*-105 ) +
( Hand_Bone.Finger_Sliders._4fingers_curl*-105 ) +
( Hand_Bone.Finger_Sliders.All_curl*-105 ) , -105 ) ) +15
___________________________________
================================================
For "Index_Bone2" rotation Z
Min=-110
Max=5
___________________________________
( cond( ( ( Hand_Bone.Finger_Sliders.Index_bone2*-115 ) +
( Hand_Bone.Finger_Sliders.Index_curl*-115 ) +
( Hand_Bone.Finger_Sliders._4fingers_curl*-115 ) +
( Hand_Bone.Finger_Sliders.All_curl*-115 ) ) >-115 ,
( Hand_Bone.Finger_Sliders.Index_Bone2*-115 ) +
( Hand_Bone.Finger_Sliders.Index_curl*-115 ) +
( Hand_Bone.Finger_Sliders._4fingers_curl*-115 ) +
( Hand_Bone.Finger_Sliders.All_curl*-115 ) , -115 ) ) +5
___________________________________
================================================
For "Index_Bone3" rotation Z
Min=-80
Max=5
___________________________________
( cond( ( ( Hand_Bone.Finger_Sliders.Index_bone3*-85) +
( Hand_Bone.Finger_Sliders.Index_curl*-85) +
( Hand_Bone.Finger_Sliders._4fingers_curl*-85) +
( Hand_Bone.Finger_Sliders.All_curl*-85) ) >-85,
( Hand_Bone.Finger_Sliders.Index_Bone3*-85) +
( Hand_Bone.Finger_Sliders.Index_curl*-85) +
( Hand_Bone.Finger_Sliders._4fingers_curl*-85) +
( Hand_Bone.Finger_Sliders.All_curl*-85) , -85) ) +5
___________________________________
================================================

repeat this process for each finger and when you do the thumb, remove the (4fingers_curl and spread) lines from the expressions so that you can have control to close all the fingers but not effect the thumb

if you need to change the range of min and max for any bone then alter that expression accordingly for ex. if the range was -90 to 10 then the values in the expression will be(...*100) and +10 at the end. the math should be self explainatory

Cheeeeeers

Chad Fox

and if your wondering why theres an underscore infront of _4finger... custom params wont allow you to have a number to start

seb4d
09-25-2004, 04:06 PM
Wow thank you for this tutorial !
One thing though I don't understand is the cond function. How does it interpolate values between the sliders and the bones' rotations ?
Could you explain in detail the way cond works please ?

foxco
09-25-2004, 06:22 PM
cool i can elaborate

condition = cond( <The condition> , <If condition is true do this>, <if false do this>)

So "for index spread example"

( cond( "a" >-40 , "b" , "c" ) ) "+10"

"a"=the condition

"a"= ( ( Hand_Bone.Finger_Sliders.Index_spread*-40 ) +
( Hand_Bone.Finger_Sliders._4fingers_spread*-40 ) +
( Hand_Bone.Finger_Sliders.All_spread*-40 ) ) >-40

So

the condition is: IF( (Index_spread's slider value*-40 ) +
(4fingers_spread's slider value*-40 ) +
(All_spread's slider value*-40 ) ) is greater than -40
Then the condition is true

if the condition is true then the bones rotationY is whatever this adds up to in section "b"
"b"=( (Index_spread's slider value*-40 ) +
(4fingers_spread's slider value*-40 ) +
(All_spread's slider value*-40 ) )

if all your spread sliders that affect this value were at 0 then your going to have
((0*-40) + (0*-40) + (0*-40)) = 0 so the rotationY value would be 0

if index_spread slider is at .5, 4 fingers_spread is at .2 and all_spread is at 0 your going to have
((.5*-40) + (.2*-40) + (0*-40)) = -28 so the rotationY value would be -28

========================

NOW if the Condition - "a" value reaches -40 or less the condition becomes false and then the expression outputs "c" as your rotation value which in the spread example is currently just -40, this value will continue to be the bones RotationY until the condition becomes "true" again

hope this helps

Fox

seb4d
09-25-2004, 07:42 PM
Ok thanks it becomes clearer, although it's still a bit complicated for me :p

I thought of doing that with "link with mutliple..." but I can't make it work. When I set relative values it does nothing.

pierre
09-25-2004, 09:23 PM
seb4d

..for drive different pose from a single CP....

you can create a CPSet and add a CP with (for example) a range from 1 to 7...
selects all the "bone" of the fingers and create a marking set for rotation "kine.local.ori"...
from the timeline "animation" key --> "animation link with" and select the CP as target..
since you have a range that goes from 1 to 7 you can set different pose for your hand and fingers... like hand open, closed and fingers curl pose.....
make the closed pose for your hand , set the CPP to a valeu of 2 and always from timeline --> animation set relative values....

for single fingers slider it's more easy to use the mixer.. you can do drag and drop from the mixer to the CPS and create proxy parameters..and you can use new CP to drive this proxy parameter together something like as explain before...


cya! pierre

foxco
09-26-2004, 12:47 AM
Sorry if it is a bit difficult to understand, but theres almost no way to just simply explain it :) but if you like i will create a working model for you if you cant get it workin


/fox

seb4d
09-27-2004, 09:11 AM
Thanks Pierre it seems a good solution too !

XsifoX it's ok I've tried what you explained to me and it works fine, it's a little more complicated than "link with" to set up but it works ! No need to create a scene for me, thank you.

By the way, any of you ever used "link with mutliple..." ? Like I said it does nothing at all when I set relative values... actually it works for objects but not for bones.

:)

foxco
09-27-2004, 11:20 PM
actualy no i have not used the link with multiple or just link with command before, ive always manualy typed my links into the expression editor so im not sure what it does to be honest

Fox

pierre
09-28-2004, 01:24 PM
"By the way, any of you ever used "link with mutliple..."

...when you use "link with mutliple", your output it's generated from an interpolation of the values that you chose as target

...you can only modify the falloff of the influence ..not the type of interpolation...

look on the manual for better explanation.....


cya! pierre

seb4d
09-28-2004, 02:41 PM
Hi Pierre,
yes I know how "link with multiple" works, but I found that it didn't work with bones and I wanted to know if it was normal ? Because "link with" works fine.

CGTalk Moderation
01-19-2006, 08:00 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.