This forum has been permanently closed and archived; you can still access all content but can't post anymore.

Of course, you can still join us in other places!
To get support and talk about RxLaboratory and with the team, come here: https://rainboxlab.org/support/

Independent stretch and scale Duik rig

Locked
JoseF

Independent stretch and scale Duik rig

Post by JoseF » Thu Oct 13, 2016 2:15 pm

Hi guys!

First of all, thank you for providing this amazing piece of software.
I've been trying to find an easy and fast solution for rigging in AE, and Duik is really a step above over other options!


That said, I was hoping you could help me out with what I'm trying to achieve right now:
I'm trying a full stretch and independent scalable limbs rig, adapted from a basic duik rig.
And keeping away from puppet Pins. The artwork is all cut-outs, e.g. instead of a full arm, I have an Upper Arm + Lower Arm + Hand.

I'm not a programmer, but when I saw the code that Dan Ebberts posted responding to the problem of Chad Zichterman "Scaling and Rotating a Shape between two points",

Code: Select all

// rotation

a = thisComp.layer("Point A").position;
b = thisComp.layer("Point B").position;
v = b-a;
radiansToDegrees(Math.atan2(v[1],v[0]))

// scale

a = thisComp.layer("Point A").position;
b = thisComp.layer("Point B").position;
d = length(a,b);
s =( d/width)*100;
[s,s]

// position

a = thisComp.layer("Point A").position;
b = thisComp.layer("Point B").position;
v = (b - a)/2;
(a+b)/2 + [v[1],-v[0]]
I thought I could adapt it to stretch the individuals pieces of the arm in the Duik rigged Arm. And it works.
I can now move the Duik Hand Controller, and it stretches the artwork elements (Arm + Forearm), from the shoulder.

So far this is great for the stretch, now my new goal was to have a way to control the scale of an individual arm dispite the scale of the whole rig. For example if i have a character that in a certain situation has an arm that grows to double the size and i still want to be able to use ik to rotate this double size arm.
I achieved something like that by importing the arm rig into a new comp with the duik import rig feature and using the master control to scale the arm. It almost works, I can now scale the arm individually still keeping the stretch. What happens is that it scales the whole imported comp, so the effect is not exactly what I want. Here the arm scales as a whole so it becomes thick. What I can not achieve is for the arm to scale without losing it's initial thickness.

I would like to have the option to rotate using IK the scaled stretchable arm.

I share with you guys my test .aep project file + .ai. Inside you'll find two pre-comps, one with the stretchy limb, other with scalable stretchy limb! hoping that it will help you and/or anyone that is seeking the same results..

https://we.tl/5Cn7as8PwI

Thank you in advance!
jose

Duduf
Posts: 915
Joined: Mon Jun 20, 2016 2:59 pm

Re: Independent stretch and scale Duik rig

Post by Duduf » Sat Oct 15, 2016 11:07 am

Hi JoseF!

Nice way to stretch limbs!
I've been thinking of something like that for some time, but I'd like to find a simple way to make it work even if the X axis of a layer is not oriented to the anchor point of its child. I think a workaround will be using some bone structures like in 3D Softwares, which will be included in Duik 16.
Anyway, what you just posted here can help us, thanks!

As for stretching the limb, the setup you built is compatible with the stretch in the effect of the IK created by Duik, just go to the effects of the controller and adjust the stretch value as you need ;)
The only little bug is that the wrist won't stick to the controller, so when the arm is stretched the controller is a bit away from the wrist. But it works very well anyway ;)

You may try to use the "auto-shrink" value too, it works well in this setup, and the result can be very helpful when bending the arm to have some kind of perspective ;)

Locked