View Full Version : Looking for a follow through tool
FloydBishop 06-19-2002, 05:47 AM Does anyone know of a tool that I can use in Maya that will take a chain of joints and then allow for secondary motion on those joints, driven from the animation on a parent object?
For example: A rabbit's ears.
The rabbit's head moves in X from right to left. The ears lag behind a bit and then settle into their final pose after the head has stopped.
Does anyone know of a MEL script like this?
Thanks!
|
|
svenip
06-19-2002, 06:12 AM
yes off course. look for attributeGoalEditor and attrbuteGaol on highend. the editor is just a UI for the other one. it's great and it's exactly the same you're searching for.
FloydBishop
06-19-2002, 03:06 PM
Do you know of any tutorials for this MEL script? I'm new to this area.
svenip
06-19-2002, 03:34 PM
it's very easy to understand and very basic, so here's how it works.
let's assume you have two spheres lying beside each other. at first you select the object that's the influence and then shift select the seond sphere, the influenced object. this one will get the first one as a goal with a weight. so, first (if not already done) you source the editor (source attrGoalEditor.mel) after that you run the script. (attrGoalEditor). now you see two parts in the window. one tells you which object is the influenced and which is the influence itself. now you only have to click for the attribute you wanna connect. so let's say one of the translation ones (translateX). click it in both parts. now just create the goal with the button at the bottom. what happen'd ? the influenced object gots an expression to the attribute and two new attributes. one for the weight one for the offset. if you now animate just the influence object (the connected attribute) you will see some funny little things happening with the other sphere. don't worry it will all work out correctly at the end. just animate it swinging for and back for example. now hti play and see what happens. if the effect is to low, decrease the weight attribute on the influenced object. this will increase the effect.
so this is what the script does and it's very cool, because it's all just expressions and not real dynamics.
FloydBishop
06-20-2002, 01:57 AM
:bounce: AWESOME!!
Ok, now for another question. How do I set it up so it mimics gravity? For example, lond antennae that bounce as a head bobs around? Also, could I add forces to it to make it look like long hair blowing in the wind?
svenip
06-20-2002, 06:33 AM
example scene (http://www2.fh-harz.de/~u13837/example.mb)
so it's easy and setup the same way. what you see is a simple joint chain. i made the second and the third joints rotateX and influenced attribute to the joint1 rotateX with the same method as described above.
just hit play and you will see how it works.
rollmops
06-20-2002, 02:34 PM
Amazing Buzz!
thanks for the script!
I've tried to understand how to tune that expression.:D Help plz!
How can we adjust the momentum? ( how quickly the motion stopt?)
svenip
06-20-2002, 03:08 PM
on the influenced object you find two new attributes in the channelbox. the weight is the one to change.
don't change the expression
Dudeman
06-20-2002, 05:04 PM
svenip
You have given me this suggestion before on another thread about a simple spring constraint. And I thank you for it.
It would be wonderful if this script had a dampening function. Then I think it would be ideal for alot more uses.
Is there a way to dampen it? Expression? And by the way I know nothing of scripting and expression. But I appreciate them.
-Dudeman:thumbsup: svenip
svenip
06-20-2002, 05:09 PM
haven't looked at the expression yet, but i will do it tonight. one way i could think of is to use a smothstep function over top of the expression. this flattens out the ends of given expressions. so this would be possible.
i'll take a look.
FloydBishop
06-20-2002, 05:12 PM
Originally posted by svenip
example scene (http://www2.fh-harz.de/~u13837/example.mb)
so it's easy and setup the same way. what you see is a simple joint chain. i made the second and the third joints rotateX and influenced attribute to the joint1 rotateX with the same method as described above.
just hit play and you will see how it works.
I still don't get the gravity I'm looking for. I'm trying to get this to work in such a way that I can have a character with automatic followthrough on things like tails, long ears, etc.
I've tried connecting the rotation of the joints to a base object that I translate up and down. The rotation works, but it stays rotated down, never coming back to it's first position.
Any solutions??
svenip
06-20-2002, 05:22 PM
if you wanna automate the bend of the joint in relation to the up and down movement of the ball i would write an expression which controls the rotate of the first joint in relation to the veloctity of the sphere.
the velocity you can get simply by just comparing the actual posY of the sphere with the one before :
float $posY_before;
float $posY_current;
float $velocity;
$posY_cuurent = ball.ty
if(abs($posY_before))
{
$velocity = abs($posY_current-$posY_before);
$posY_before = $posY_current;
}
so this will give you a value for the velocity (very simple expression, but should work). and now you could either write an expression or use Set Driven Key to connect this velocity to a change of the rotate of the first frame. the other joints do by the script mentioned here in the thread.
svenip
06-20-2002, 05:42 PM
so here's an example for the baseball cap. look in the expression editor for the expression. just hit play.
scene (http://www2.fh-harz.de/~u13837/baseballCap.mb)
bigfatMELon
06-20-2002, 06:17 PM
I'll offer an alternative: using actual physics.
[list=1]
using the rabbit ear reference, build a joint chain for the ear.
splineIk that chain
create one cluster for the entire splineIK curve
weight the cluster so that the highest CVs carry the most effect while the lowest has as little as no effect. It's a matter of taste and provides a second line of offense when controlling the action later on.
build a locator or null for the ear that is situated roughly above it.
parent that locator to the rabbit's head joint. To this locator, you will attach any number or FRAME objects or nulls that will be used in the suspension of the ears. Yes, this is a lot like how Pod Racers get built.
make a small polygon cube and set it's render properties so that it won't ever render.
snap the cube to the position of the cluster
point constrain the cluster to the cube
make the cube a Rigid Body
add a gravity field to the cube. You may also choose to add a non-phasing or keyframmable phasing turbulence field as well for a slight randomness
now add as many child objects (nulls) to the Frame locator as you think you need (I'd start with two: one over and one below the ear's cluster) and spring constrain the cube to these nulls.
experiment. Physics is ALL ABOUT experimenting. Different spring numbers, patterns and settings will provide different kinds of action. Two might work or you might try a triangulation pattern or a box pattern. Make sure to set the spring lengths and make them strong as they are what keeps the cube in place. The weaker they are, the more the cube will travel about.
[/list=1]
It's a lot more work and there are a number or variables on how this can be set up. However, the end results offer far more control and realistic action than the goal script (that script is awesome in a pinch but the results tend to look like you used that script).
I like the option where this entire rig is just one of two control rigs that the skin joints can be blended to. Then you can blend in and out of implicit/explicit control over the ear. You might choose to fake ear collisions by colliding the cubes. Loosely connect two ears together with a spring between two cubes, or make the spring strength keyable for variable action.
Or skip this whole thing and make the splineIK a softy and set up springs for each particle in the chain.
Ok, I'm flat out rambling now...
-jl
svenip
06-20-2002, 06:38 PM
problem is, even if it's not a big one then you know how to handle, that this is done with dynamics, and this can cause some troubles if you wanna render on a farm etc. so that's what the goalscript tries to avoid, DYNAMICS. and you can control the expression very well, just by adding a control value on the object and build into the expression to act as a multiplier.
FloydBishop
06-20-2002, 06:56 PM
Originally posted by svenip
problem is, even if it's not a big one then you know how to handle, that this is done with dynamics, and this can cause some troubles if you wanna render on a farm etc. so that's what the goalscript tries to avoid, DYNAMICS. and you can control the expression very well, just by adding a control value on the object and build into the expression to act as a multiplier.
But if you use dynamics, can't you bake the dynamics prior to sending it off to the farm?
The reason I need all of this is that I'm trying to make a character with long flowing hair, but she's still a bit cartoony. I'm rendering out of Maya, so I have the access to Paint FX.
What I'm planning on doing is making strips of geo that are driven by a joint chain. The chain has followthrough built in so that when I turn or move her head, the joint chains react accordingly. I'll paint on the strips using the hair tube brush, and then hide the geo, leaving the curves that will be moved by the joint chain.
My other alternative would be to straight ahead keyframe it all. A bit of a beating, but most of this expression stuff is a bit beyond me. I did get the goal script to do something of what I need, so maybe that is the best answer in this case.
svenip
06-20-2002, 07:02 PM
a while ago i saw a tutorium (i think it was on the AW website) for creating long hair with paint effects and cloth together. so maybe this is what you search for.
and, the rendering issue is just on problem you will have with the dynamics.
bigfatMELon
06-20-2002, 07:22 PM
Yes, but that's point of an alternative: to provide an alternative.
The goal script is nice, no doubt. But sometimes there is no sub for real physics, which can always be baked for a farm render. Or better yet, baked and then manually massaged for absolute control. Besides, everyone in this forum with an actual render farm raise your hands. :)
-jl
svenip
06-20-2002, 07:24 PM
i'm up and raise my hands :) 15 pc's in a nt network :thumbsup:
no doubt the alternative is good, and i don't complain or something, do not missunderstood me :hmm:
FloydBishop
06-21-2002, 02:51 AM
Ok. I have two friends who are expert riggers. They're going to walk me through some possible solutions this weekend. I'll let you all know what we come up with on Monday.
Thanks for all of the help so far. We'll figure it out yet!!
steveblake
06-21-2002, 09:09 AM
would you mind posting up your 'expert results' ??
Thanks
FloydBishop
06-26-2002, 11:09 PM
Originally posted by steveblake
would you mind posting up your 'expert results' ??
Thanks
Here's a test that my friend Richard Cheek did to try and get the follow through result I was looking for. It works pretty well. It's a bit over my head, so I'll quote his email exactly to try and shed some light on the subject:
"The basic idea in this set up is to use a rigid body cube to control a IK spline hand running up the joints. The stop the cube from just falling to the ground, 2 springs are used to hold it in place and give it a little motion. These springs are attached to 2 locators, one above and one below the antenna, which are both in turn attached to the head joint.
The effect can be altered by changing the spring attributes as well as altering the mass and dampening of the rigid body cube.
This approach seems very good for cartoon antenna/ears etc. but needs a little work for hair. When I do get better results with a set up like this, I will also add a second skeleton which can be animated without dynamics and add a slider
to change the weight between two. This way we can animate the strength of the effect between full dynamic or full key framed animation to give
better control over the animation.
To see the animation, simple load it and click play, I have a simple animation set up."
So there you have it, that 's the solution for now, thanks to everyone who tried to help, and thanks especially to Richard Cheek. He rocks!!
:buttrock:
bigfatMELon
06-27-2002, 01:03 AM
"The basic idea in this set up is to use a rigid body cube to control a IK spline hand running up the joints. The stop the cube from just falling to the ground, 2 springs are used to hold it in place and give it a little motion. These springs are attached to 2 locators, one above and one below the antenna, which are both in turn attached to the head joint.
Ahem... sounds kinda familiar, don'it? ;)
-jl
FloydBishop
06-27-2002, 01:12 AM
Originally posted by bigfatMELon
Ahem... sounds kinda familiar, don'it? ;)
-jl
Yes, I realize that this is what you suggested. I just wanted to post a sample file as well as the description of what was going on.
Thanks to you as well.:thumbsup:
bigfatMELon
06-27-2002, 01:29 AM
Was no biggie. Just yankin yer chain. :)
BTW, if you take this method further, it's possible to do some decent fake cloth. You can use these little rigid riggs to drive the rotation of skinCluster influences which is very cheap solution and is ideal for games. It certainly won't fool the pros, but in a pinch, it will fool the other 99.9% of the population. Provide enough movement and some collisions and the eye tends to fill in the rest.
"Art is a lie that tells the truth." -Pablo Picasso
-jl
CGTalk Moderation
01-13-2006, 08:00 AM
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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.