Expression issue when animating

Issues concerning rigging & Face Robot...
Post Reply
supaworst
Posts: 7
Joined: 10 Jan 2013, 10:16

Expression issue when animating

Post by supaworst » 28 Feb 2013, 18:06

Hello, i'm getting troubles with expressions and animation. I've set up a very simple squash and stretch rig on three nulls (null distance value divided by center distance from null to null). Appearently it works perfectly but, when i try to animate the position of the whole model, the scaling value of each null change randomly even if i haven't set any key on them.

Is a matter of stack?

Thanks in advance

Take care

EricTRocks
Moderator
Posts: 754
Joined: 25 Nov 2009, 01:41
Contact:

Re: Expression issue when animating

Post by EricTRocks » 28 Feb 2013, 18:07

What do you mean by animate the whole model? Please post the expression as well.
Eric Thivierge
Lead Kraken Developer, Fabric Engine
http://fabric-engine.github.io/Kraken

supaworst
Posts: 7
Joined: 10 Jan 2013, 10:16

Re: Expression issue when animating

Post by supaworst » 04 Mar 2013, 10:31

Sorry for the other post; i've realized that was really unclear. Anyway, i've attached an image with my rig and with the expressions.
It's really a basic squash and stratch expression.
The first expression (on the left-bottom of the image) is related to the master_ctrl, the one i use to traslate and transform the model. I've created it to scale properly the rig.
The second expression is related to the nulls that i used to envelope the model. Basically, this expression scale the nulls in a way that mantains the volumes.

The problem i get is that when i move the rig all works fine but, when i animate it, the nulls scale randomly and without any keyframe setted.
This happen also when i just translate the Master_ctrl without scaling or deform anything.

Any suggetsions?

I hope i made myself clear.

Take care
Attachments
expressionSample.jpg

EricTRocks
Moderator
Posts: 754
Joined: 25 Nov 2009, 01:41
Contact:

Re: Expression issue when animating

Post by EricTRocks » 04 Mar 2013, 16:45

Hey,

I think there may be an evaluation issue with having a custom param which has an expression driving another expression. Could you just skip having the expression on the master control and put it's expression inside the other one as well?

Code: Select all


Tram.master_Ctrl.kine.local.scly * 9.825 / ctr_dist(Tram.Front_Null., Tram.Rear_Null.)

Also pay attention as I haven't use the "Front_Null.kine.global.pos" but simply "Tram.Front_Null." which is the format it should take:
http://download.autodesk.com/global/doc ... d30e479122

It'd help to see the hierarchy of the rig as well as there may be a more elegant way to setup the rig to get the scaling to work. Generally in my rigs I only scale 1 object that is the parent of the deformer hierarchy that is scale constrained to the control. Then compensate distances with the center distance divided by the scale of the control as the center distance returns the distance between the two objects regardless of their scaling.
Eric Thivierge
Lead Kraken Developer, Fabric Engine
http://fabric-engine.github.io/Kraken

supaworst
Posts: 7
Joined: 10 Jan 2013, 10:16

Re: Expression issue when animating

Post by supaworst » 04 Mar 2013, 17:59

Thanks for the fast reply!
I've just tried your suggestions but i'm getting the same result...i don't understand why but, when i animate the translation of the master control, the scaling of the nulls go crazy and change its value randomly.

I'm attaching the hierarchy as you request...maybe is just a matter of a stupid mistake on it

Take care
Attachments
Hierarchy.jpg

EricTRocks
Moderator
Posts: 754
Joined: 25 Nov 2009, 01:41
Contact:

Re: Expression issue when animating

Post by EricTRocks » 04 Mar 2013, 18:15

Why are there still expressions linked to the Master_Ctrl object?

Edit: Scratch that. Can you post a file to check out?
Eric Thivierge
Lead Kraken Developer, Fabric Engine
http://fabric-engine.github.io/Kraken

supaworst
Posts: 7
Joined: 10 Jan 2013, 10:16

Re: Expression issue when animating

Post by supaworst » 05 Mar 2013, 10:59

Hi! I'm posting a EMDL file with my rig. Unfortunately, i can't post the texture but i think you don't need them.

Thanks a lot for your patience!

Take care
Attachments
Car.zip
(26.68 KiB) Downloaded 58 times

EricTRocks
Moderator
Posts: 754
Joined: 25 Nov 2009, 01:41
Contact:

Re: Expression issue when animating

Post by EricTRocks » 05 Mar 2013, 16:06

OK so I think I found the issues.

1. You still have "Car.Front_Null.kine.global.pos" instead of "Car.Front_Null.kine.global.pos". Should just be formatted as I said previously to "Car.Front_Null."
2. There is an evaluation issue since you are reading the position of the Null objects while driving their scaling values from them. Instead use the controls in your expressions and it should work fine.

Expressions should be:
Car.Master_Ctrl.kine.local.scly * 6.067 / ctr_dist( Car.Front_Ctrl, Car.Rear_Ctrl )
Eric Thivierge
Lead Kraken Developer, Fabric Engine
http://fabric-engine.github.io/Kraken

supaworst
Posts: 7
Joined: 10 Jan 2013, 10:16

Re: Expression issue when animating

Post by supaworst » 05 Mar 2013, 17:50

Thanks a lot!! it seems that using the distance between the controllers instead of the distance between the nulls is the way!!
Just to satisfy my curiosity, are you really one of the men behind the exocortex species project?
I've found it really amazing and powerfull!

Thanks again for your big help!

EricTRocks
Moderator
Posts: 754
Joined: 25 Nov 2009, 01:41
Contact:

Re: Expression issue when animating

Post by EricTRocks » 05 Mar 2013, 17:56

Glad it is working out for you.

Yes I'm the co-developer of Species along with Chris Covelli.
Eric Thivierge
Lead Kraken Developer, Fabric Engine
http://fabric-engine.github.io/Kraken

Post Reply

Who is online

Users browsing this forum: No registered users and 20 guests