Expression issue when animating
Expression issue when animating
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
Is a matter of stack?
Thanks in advance
Take care
-
- Moderator
- Posts: 754
- Joined: 25 Nov 2009, 01:41
- Contact:
Re: Expression issue when animating
What do you mean by animate the whole model? Please post the expression as well.
Re: Expression issue when animating
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
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
-
- Moderator
- Posts: 754
- Joined: 25 Nov 2009, 01:41
- Contact:
Re: Expression issue when animating
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?
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.
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.)
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.
Re: Expression issue when animating
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
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
-
- Moderator
- Posts: 754
- Joined: 25 Nov 2009, 01:41
- Contact:
Re: Expression issue when animating
Why are there still expressions linked to the Master_Ctrl object?
Edit: Scratch that. Can you post a file to check out?
Edit: Scratch that. Can you post a file to check out?
Re: Expression issue when animating
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
Thanks a lot for your patience!
Take care
- Attachments
-
- Car.zip
- (26.68 KiB) Downloaded 58 times
-
- Moderator
- Posts: 754
- Joined: 25 Nov 2009, 01:41
- Contact:
Re: Expression issue when animating
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 )
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 )
Re: Expression issue when animating
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!
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!
-
- Moderator
- Posts: 754
- Joined: 25 Nov 2009, 01:41
- Contact:
Re: Expression issue when animating
Glad it is working out for you.
Yes I'm the co-developer of Species along with Chris Covelli.
Yes I'm the co-developer of Species along with Chris Covelli.
Who is online
Users browsing this forum: No registered users and 20 guests