View Full Version : Expressions for Characters . . .

10 October 2002, 11:52 PM
Hello All

I am very new to expressions and am making my first practises on a character of mine.

I was trying to setup up some simple expressions for the character to shift his weight when he does certain things, such as lift his leg, he moves to the right slightly to shift his weight to the other leg. etc.

I created an expression so that when he moves his foot forward, that value divided by 2 is how much the root of the skeleton should move, and it worked but it created some what of a problem:

When it calculated that expression it moved the character back some, and I wasn't sure why but then I realized it calcualted my expression (when he moves his foot forward, that value divided by 2 is how much the root of the skeleton should move) and there was already a value for the root and he moved back.

My question is how can I reset the Values to 0 so that the character wont move back but will move forward when I move his leg?

I also have more questio but I'm away from home, and can't remember them ,and will be back to post them later.

but this is it so far.


10 October 2002, 12:15 AM
if i understand your question..

assuming forward is Z.
if your root value for translate Z is say 5 at the default position just slap that value into the expression to accomodate for it. ie. = ((( + /2)) - 5);

hope this helps..

ps. this will take a lot of control away from the animator and may be more trouble than its worth.. might pay to make this "automation" something the animator can turn ON/OFF.

10 October 2002, 12:17 AM
oops, an extra ")"
should be = ((( + /2) - 5);

10 October 2002, 01:11 AM
after getting alot of feedback about expressions from animators, I would advise you not to use them...however, for what you requested....this is what I do:

if(LtAnkle.translateY>RtAnkle.translateY) UpperBody.translateX=0+ (abs(LtAnkle.translateY-RtAnkle.translateY))/5;
else UpperBody.translateX=0- (abs(LtAnkle.translateY-RtAnkle.translateY))/5;

if(LtAnkle.translateY>RtAnkle.translateY) UpperBody.translateX=0+ (abs(LtAnkle.translateY-RtAnkle.translateY))/5;
else UpperBody.translateX=0- (abs(LtAnkle.translateY-RtAnkle.translateY))/5;

Broken Down:

If my left ankle's translation in Y(up/down) is greater than my right ankle's translation in Y, then the UpperBody control object controlling the back translation in Y(side to side) is going to equal it's current value, being 0, minus the absolute (meaning it returns the absolute value of its argument) of my left ankle translation minus my right ankle translation divided by an appropriate number to determine the "weight shift" of the UpperBody to compensate the foot being lifted off the ground.

Hope this helps...




10 October 2002, 01:37 AM
aren't you talking too much control away from the animator this way?

I'm all for expressions, but sometimes they can work against you... if you are trying to be too clever, they can take away control from you and that's not fun!! :)



10 October 2002, 08:27 AM
I think I'm going to post this every time I see a question about an auto-balance expression for a creature until it's never done again.


please. for the love of god. do not add an expression to handle something that the animator should be handling. You will only create a headache for the animator when doing this. there is NO way of creating an automatic balancing system that can react to every situation out there. what if the character is walking up hill? what if they do a flip? what if they're pulling a heavy object? what if somebody is pushing on their hips? what if they're drunk? what if one leg is shorter than the other? it's just nasty. nasty nasty nasty.

expressions are GREAT for things that can use them.. finger controls.. maybe an automatic eye dilate control if you want to get that added realism for having the eye automatically adjust after the eyelids open and close.. you know.. stuff like that. But not for controling a character's hips.. that's just silly. :)

sorry.. I feel better now. :)


10 October 2002, 09:06 AM
see...told you it was a bad idea... :rolleyes:

but hey, you DID ask :)

10 October 2002, 05:45 PM

WOw I first of all Would like to thank you all for responding and from what you guys have suggested that will help me greatly ins setting up expressions to ease some of the animation process I'm going through.

All your responce was pure genius:buttrock:

I was surprises to see the idea of expressions for animating frowned upon when it comes to cetain scenes especially by jschleifere because you inspired me the most to learn expression when I was watching your robotrigg movie ( I hope that was you and I don't have people confused)

That robot was amazing and with the expressions it will help the animation process greatly. but I understand you guys perspective, cause when I was laying down to sleep last night I thought to myself what it you just wanted your character to point his foot, with the expression it would move him forward and if didn't want him to move forward, then the expression will mess you up. But then I though when you could always make a coopy of the scene file, and delete the expression but you guys are right because in the end it will cause more work, but the it will tkae away.

SO I guess it would have to be used in moderation, I guess is you had a scene where the was a lot of walking the expressions would help.

Thanks again:D

10 October 2002, 05:51 PM
Jason has spoken!!!


Actually Jason, interesting what you say about the pupils, I don't remember what I was watching recently and I noticed how the pupils changed constantly.. but I never thought of having an expression drive it... of course it makes sense now!!


10 October 2002, 08:46 PM

hmm.. robot expression.. might have been mine from a long time ago when I was doing marketing material for alias|wavefront.. heh. See, expressions were a great way of showing how you could get maya to do really complicated stuff really easily.. so I used to do stuff like that. Then I tried to animate with it and went "AAAARRGGH!!" so ever since then I've been preachin the "do not use expressions on anything that the animator should be controling" gospel. :)

goosh, the pupil thing is kinda interesting, eh? I'm thinking of giving it a shot.. trying to determine when an eyelid is closed, then when it opens, have the pupils bigger for 2 frames, shrink down past where the animator has them set for a frame or two, then back to where they're set 2 frames later. might be interesting..

Another thing that would be cool would be to automatically adjust the pupil size based on the lighting.. quite often you're animating w/out knowing what the lights in the scene are really doing.. and if you pass through a dark spot, the pupil should get bigger.. then drop down again and re-adjust once you get into the light.. so somehow measuring the light at the pupil and then run a post process on the pupil size.. might indeed be a neat thing to try! As long as you base all the fluctuations on what the animator has already done. :)


10 October 2002, 09:23 PM
Hmm.. the light measure thingy could be good, but don't you think again it could be too complicated for such a simple thing?

I know we often forget about the pupil dilation, and don't animate it at all..

I guess as long as you can over-right it and have control on top of it, there is no harm.. and it Could be pretty cool.

How the heck do you meassure the light intensity at a given point thought (I guess it should be ok since isn't that what the renderer is doing?)

Too complicated for my 3 neurons! :)


10 October 2002, 12:58 AM
Hmm.. just did a quick test on the expressions for the iris thing.. does indeed add an interesting appeal to the character!

My test was just keyframing an offset.. didn't actually do the expression itself, but it's kinda cool. I'll try and see if I can put together a movie, anyone know of a linux program that can do an animated gif?


10 October 2002, 01:35 AM
Here's a quick gif of what it looks like.. please ignore the colour and the shape of the eyes and such.. just a test..

10 October 2002, 03:35 AM
Ahh! it's all my fault peace :) that was my robotrig you were looking at.....and's got TONS of expressions....but at the time I did not know better. They look cool and are fun to play with, but as you watch the animator bury his head in his hands you realize what kind of misery you've just caused....not good :bounce:




11 November 2002, 08:57 AM
Cool Jason

I finally got a chance to see this. (I can't at work for some reason)

That works great... I think with a little bit of fine tuning the expression it would look awesome..


11 November 2002, 08:15 PM
Heya goosh,
yeah, it's a bit robotic.. but you could make it adjust and do pretty much anything. What I was thinking was that you could make maybe 3 or 4 animation curves representing the iris movement.. and then have the expression randomly pick which one to use. could be very interesting. :)


CGTalk Moderation
01 January 2006, 09:01 PM
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.