PDA

View Full Version : Problems animating with expressions



RyanRaner
12-23-2003, 06:11 AM
I had been doing mostly models\stills with Lightwave so far and wanted to get into some character animation, which I had only done with my older copy of Hash. I had done the "Smart Skin" tutorial on the Newtek tutorials section which showed me how to use expressions to get good deformation on joints, and do muscle building.

I followed the tutorial and it works great. The tutorial used an arm as an example which was fine. My problem is that after doing this on a leg to get a good knee deformation and bulge it seemed to stop working completely once I started using IK and a goal to move the leg.

Is there something I might be missing? Or are these expressions incapable of working on bones that are being controlled with IK?

Carm3D
12-23-2003, 04:13 PM
Yeah that's true.. Expressions made via the graph editor cannot be seen by IK controlled objects because IK is computed after the expressions.

So here's the solution: Select the object / bone in question. Hit m to enter Motion Options, and add the motion modifier "Expression." This lets you select the "After IK" option. It's the only way to get expressions after IK.

Motion Modifier expressions are a little different than expressions added via the graph editor. You cannot use the "Value" bit because it cannot see values that come from the graph editor. Whatever the result of your expression is will be applied to that item's channel. You can also use the A,B,C & D fields to make variables that you can refer to in your expression.

example:
Set A to be this:
HeadCtrl.rot(Time).p

Note that this is the "LScript way" of referring to a channel.. You can't use [HeadCtrl.Rotation.P] here because that is referring to a channel graph-editor style, and MM expressions can't see those.

Then in your expression you can do something like this:
A < 0?abs(A) * 0.3:0

I hope I got all that syntax correct.. I'm doing it from memory.. basically this is you set the A field to be your HeadCtrl rotation on pitch, then you only have to type this once.

Then the expression asks if A is less than 0.. if it is, the absolute value (takes the - and makes it positive) of A is multiplied by .3 and that result is added to whatver channel this expression is attatched to.. If it's not less than 0, the result applied by this expression = 0.

If you have any questions let me know.

RyanRaner
12-23-2003, 07:58 PM
Ok, thanks for the reply. I'll give it a shot, but I'm worried because I have not dealt with any Lscript stuff at all yet.

I wasn't really considering the update, but is it known if this type of thing is enhanced in any way in LW8 that might make things easier? All I'm really attempting to do is a bulge in the leg and, keeping parts from caving in. I've been doing models and stills, so the upgrades in v8 weren't to appealing to me.

I will give it my best shot, but I guess if I get over my head I may have to resort to animating with IK, and then manually set keyframes for the leg morphs in the end. Right now I am just learning the animation side of Lightwave at my leisure, but I hope in 8 or 9 they can catch up with Hash in the character animation department.

Carm3D
12-23-2003, 08:36 PM
> Ok, thanks for the reply. I'll give it a shot, but I'm worried because I have not dealt with any Lscript stuff at all yet.

Neither have I. Using the Item.rot(Time).p, or Item.pos(Time).x, or Item.wpos(Time).x way of referring to item channels is simply another form of syntax. You aren't programming LScript, you're just referring to an object the way it's done in LScript as opposed to how it's done in the graph editor.

It's like in America we say toilet. In the UK they say loo.

Expressions will be different in Lightwave 8. They are making a sort of "visual expressions" system. Looks like a flow-chart approach to me.

You won't have to bake your IK motions. You can figure this out.

If you want to send me a scene file I will take a look at it and give you suggestions.