PDA

View Full Version : Stretchy arm with free elbow


gloupi
02-01-2008, 03:26 PM
Hello,

Is anyone have seen an ik arm ik with a free elbow ?

I mean :
- an arm with a classical ik
- but you can freely move the elbow while arm and forearm stretch and rotate to conserve ik end position.

We are using 3ds max but i am looking for any workflow on any software that works in that way.

Thanks to the happy sharers who know how to do such a rig ?

shinyprem
02-01-2008, 03:46 PM
HI..!

If the Stretchy for an arm is done by translating the Tx of the elbow and wrist joint... Then try having an attr tht drives the TX of the Elbow can have the effect what you are asking for..

Rgds,

eek
02-01-2008, 03:51 PM
That can be a little tricky, I've got stretch and blending to the elbow to work. But moving the elbow to set the length of the chain and it following along with the end effector movement is tricky.


Firstly it has to be the ik pole vector, this we can easily setup and assume.
Secondly it has to follow with the system.
These are both possible, and can be really treated as a non-flip system. The way this works in max is by using a custom ik system, that uses a pole-vector 90 degrees adjacent to the flip axis. The control bound to the knee, uses back transformations in the form or a script controller to resolve its rotation doubling ego:

A being driven by B parented to A would cause B to 'double' its transformation and so you need to add a a back transform therefore :

A being driven by (B + -A) parented to A.

Now to move the knee control which inturn adjusts the length of the chain, but is also being driven would cause a dependancy loop. You would have to assume the length of the chain from the knee control, to then inturn control the knee control, and these lengths would need to be stored in some sort of variable.

Essentially the control would need to 'appear' to be following the system, but allow indepence for length adjustment.

EDIT:

I think i may know a way, but its current form is in my head - and thats already throwing up errors. I'll just assume that your'll need to back transform the control.

Loolarge
02-01-2008, 05:04 PM
There is a tutorial from Christoph Schinko that involves that feature for XSI:

http://www.christoph-schinko.com/tutorials/schinko_arm_en.pdf

Not sure if that helps for other apps though.

gloupi
02-04-2008, 02:24 PM
Loolarge : Thanks for the doc but it is only an offset elbow on another chain.
It doesn't change the length of the ik bones. If you raise that length via the elbow and pull up your end effector you will reach the limit of the original/unmodified bones length, and you cannot pull that ik enough to reach your new bones length.

eek : Thanks, but i cannot really understand your process.

shinyprem : Thanks, I used your path.

Result :
--------
I can freely move the elbow. The new elbow position update ik length.
I can use my classical ik.


Here is a description of the process to a "Free Elbow Ik".
------------------------------------------------------

Create 3 bones (b01,b02,b03) with an ik limb, and one point.

Unfreeze length of the bones.

Use the point as swivel angle.

Add float list controller on the x position of the 2 last bones, with :
- a float script calculating distance from point to b01 for b02
- a float script calculating distance from b02 to point for b03
- a float bezier as second slot for b02 and b03

Add float script to the float list weight controller (to avoid animation).

Now we need some change handlers :
-----------------------------------------

clearlistener()
gc()

deleteAllChangeHandlers id:#ElbowIk_Sel

when select #($'Point01',$'IK Chain01') changes id:#ElbowIk_Sel handleAt:#redrawViews obj do
(
if selection[1] == $'Point01' then
(
Farm = $'Bone02'.controller.FK_Sub_Control.position.controller.x_position.controller
Wrist = $'Bone03'.controller.FK_Sub_Control.position.controller.x_position.controller

Farm[2].value = Farm[1].value
Wrist[2].value = Wrist[1].value
Farm.weight[1].controller.script = "1.0"
Farm.weight[2].controller.script = "0.0"
Wrist.weight[1].controller.script = "1.0"
Wrist.weight[2].controller.script = "0.0"
print "Point Select"
)
if selection[1] == $'IK Chain04' then
(
Farm = $'Bone02'.controller.FK_Sub_Control.position.controller.x_position.controller
Wrist = $'Bone03'.controller.FK_Sub_Control.position.controller.x_position.controller

Farm[2].value = Farm[1].value
Wrist[2].value = Wrist[1].value

Farm.weight[1].controller.script = "0.0"
Farm.weight[2].controller.script = "1.0"
Wrist.weight[1].controller.script = "0.0"
Wrist.weight[2].controller.script = "1.0"
print "ik Chain Select"
)
)

deleteAllChangeHandlers id:#Ik01

when transform $'IK Chain01' changes id:#Ik01 handleAt:#redrawViews do
(
$'Point01'.pos = $'Bone02'.pos
)

deleteAllChangeHandlers id:#Elbow01

when transform $'Point01' changes id:#Elbow01 handleAt:#redrawViews do
(
Farm = $'Bone02'.controller.FK_Sub_Control.position.controller.x_position.controller
Wrist = $'Bone03'.controller.FK_Sub_Control.position.controller.x_position.controller

Farm[2].value = Farm[1].value
Wrist[2].value = Wrist[1].value
)

Feel free to try and comment.
If needed i can post an example file.

gloupi
02-04-2008, 03:54 PM
Here is the example file (or http://rapidshare.com/files/89116957/Elbow_ik_04.rar.html (http://rapidshare.com/files/89116957/Elbow_ik_04.rar.html))

load and test

Hope you find it nice

gloupi
02-04-2008, 03:54 PM
double post

shalabology
02-08-2008, 04:28 PM
gloupi (http://forums.cgsociety.org/member.php?u=34953) , happy u solved it but the file u uploaded doesnt seem to work u mind if reupload it really want to haqve a look on it!

wamo
02-08-2008, 05:48 PM
Hey hey really thanks gloupi (http://forums.cgsociety.org/member.php?u=34953) ,
it's sweet that somebody like you share his researches,
it was inpiring for me,then i'll use it in my rigs.

gloupi
02-12-2008, 01:35 PM
Thanks for interest

here is a working file.

I am also working on simple handler to switch between modes, and more.
I will upload new stuff asap.

labbejason
02-12-2008, 05:57 PM
file is corrupted!

gloupi
02-12-2008, 10:54 PM
i download it at home from previous post and it worked fine, except a question about disabling gamma LUT.

I used winrar to compress that file.

Can you explain the isue ?

prettyh8machine
02-13-2008, 09:13 PM
Hey I'm a maya user and I don't have max so can't test out the file but the zip downloads and extracts fine. Can someone port a version of this stretchy arm in maya? I was thinking about it but somehow it didn't seem like a problem that can avoid cyclic dependency. Haven't tried it though so can't say for sure.

Cheers

harishanim
02-16-2008, 06:29 AM
hi every one i am harish here and i have some problem in rigging


Actually i have rigg one character in maya 2008 and now i am trying to make it there stretchy bone in every controlet i am not talking only for spline ik or ik , i am just trying to make in every controller .i am expain you in detail .

i whant to strech my body from chest controller and also want to squash it .

i also use multiplydevide utilities and someny thing but i have use two chain of bone for back spline ,i think this is make me confuse ,


if anybody can help me i am waiting from loger to make it fast ,

CGTalk Moderation
02-16-2008, 06:29 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.