View Full Version : help?--rigging legs to deform dress
02 February 2004, 05:22 AM
Ok, I'm not new to rigging, but this has got me stumped. Here are two images of a character that I've modeled for a class project.
Does anyone know how I can setup this character's legs to influence the outside geometry (dress)? I want to do this without using Maya's cloth dynamics and softbodies. Any suggestion? Or is it not possible without the aforementioned techniques? Any help would be greatly appreciated.
02 February 2004, 06:53 AM
write an expression to drive 2 blendshapes one for each legg, based off the hip rotation, not the knee, the hip because the gloth should not bend backwards if she just lifts the heel back.
02 February 2004, 03:34 PM
I haven't had the chance to learn expressions. Any suggestions to help me get started on that?
02 February 2004, 11:20 PM
Think of expressions as a child > parent relationship. So in this case, you'd have the blendshape value as the child, based off of the hip rotation. (as far as the order to write the expression in)
(object I want to be controlled) = (object that will do the controlling)
I'm taking a stab in the dark here for the expression as I can't really say what angle the hip would be at during the max blend shape value, but...
blendShapeName.lf_legDress = lf_hipJNT.rotateX / 60;
So given the above expression, lets say that the furthest your character will ever extend her leg is 60 degrees. You build a blend shape so the dress properly contours the leg when the hip has been rotated 60 in X.
Since the blend shape only ranges in value from 0 to 1, we can't just link them up directly. So, we add a little math.
What we do know, is that at a blend value of 1, or 100%, the hip rotateX will be at 60. So when hip.rX = 60, we need blendShape.lf_legDress to be 1. So we divide the hip rotation value by 60 and set that value to equal the blend shape.
I imagine you'd also be making shapes for leg back, leg to the side, possibly even knee bending back if it's needed.
The trick there I think is getting the shapes to transition well from one to the next, such as when she kicks her leg forward and then rotates it outward.
If you want to read more on expressions, I recomend Jason Osipa's book Stop Staring (http://www.amazon.com/exec/obidos/tg/detail/-/0782141293/qid=1071033722/sr=8-1/ref=sr_8_1/002-7081928-9192834?v=glance&n=507846)
It deals with expressions on facial blends for the UI he builds, but it does a very good job of explaining expressions to someone who has little or no programming background.
I hope I explained this well enough, and didn't just throw out a bunch of gibberish :p
Good luck :)
02 February 2004, 02:58 AM
jHromika has hit the nail on the head with the explination, expressions are the easiest form of programming in maya so dont be scared.
here is an example expression I used as a spine control. you have 5 joints in the back, so i will have join1, joint2, joint,3 joint4, and joint5. all connected to make the spine. This is not in expression form just typed out in english not code.
::joint 2 expression example for x y & z rotation::
joint 2 rotate x y & z = joint 1 rotate x y & z * 0.25;
::joint 3 expression example for x y & z rotation::
joint 3 rotate x y & z = joint 2 rotate x y & z * 0.25;
::joint 4 expression example: for x y & z rotation:
joint 4 rotate x y & z = joint 3 rotate x y & z * 0.25;
::joint 5 expression example for x y & z rotation::
joint 5 rotate x y & z = joint 4 rotate x y & z * 0.25;
then make the controller, I parent a cube or icon to the root, and write and expression for joint1 to = cubes x y & z rotation.
03 March 2004, 05:00 PM
Ok, you guys have made my job definitely easier for me. I'll be doing some experiments with these techniques as soon as I get to that point in my rigging.
Another question. Should the dress be influenced by nothing more than the blend shapes or a combination of blend shapes and smooth bind? Any suggestions?
03 March 2004, 11:50 PM
Hmm...that's a good question.
Before *attempting* to answer :p I think I should ask, is the dress going to be in one piece or two?
If it's all going to be one piece, you'll definitely need a combination of skinning and blends.
Another idea though, would be to separate the dress at the waistline. Then skin the upper half to the spine and arm joints. Skin the lower half to the hips joints, and then set up your 8 or so blendshapes to drive the motion from the legs.
Although I guess that still requires a combination of skinning and blends... :rolleyes:
It'll take some experimenting to see how well it would work, mostly when working with combinations of the shapes, but I think it could be possible.
Does that sound about right?
03 March 2004, 04:47 AM
I kinda disagree with the whole expression idea. I would make a rig for her skirt. you would have to key frame all of it, if you did a simple FK rig, but you might be able to get a semi automatic solution in IK. Have an IK handle being driven bye the knee, or something, and another one driven bye the ankle. FK seems to be more of a solid solution though. make like 6 joint chains starting that the waist, going down to the end of the skirt, and parent them to the hips. You will have to key frame this, but it won't freak out on you, and you have perfect control over what you want it to look like. This is a really simple approach, but it is effective, and solid. We'll, that is my two cents.
03 March 2004, 08:33 AM
mabey even, just have the weights switch depending on the rotation of the hip.
03 March 2004, 11:55 PM
you don't have to mess with that if you do several joint chains. For example, one going down the middle of the dress, in the very front. One going down the front of each leg, and in the back also, and one on the side of each leg, and finally one going down the middle of the skirt in the back.
03 March 2004, 04:27 PM
Thanks guys for all the tips. Since I don't have the time to fiddle around with expressions right now due to the deadline, I think I'll try fortner_m's approach. Sounds simple enough, makes me wonder why I didn't think of this myself.:blush: I definitely want to delve into expressions as soon as I find the time. Thanks again everyone.:bowdown:
03 March 2004, 07:55 PM
yeah, after more thought, you're probably better off going that route anyway.
It'll be more animation, but you know you'll have full control over it. Whereas with the blends, you're at best, still limited with the motions you can do.
I believe fortner wins the prize here :D
Although the blend idea is still cool if executed properly :thumbsup:
04 April 2004, 08:32 PM
I have to animate a character's dress also. I've done a test using the method described by fortner_m (using bones).
But then I tried just using clusters and seemed to get fairly good results.
Does anyone think using clusters might be a good method?
04 April 2004, 12:34 AM
Skin your legs to your joints then use a wrap deformer on the dress. This way your Leg geometry can drive the deformation of the dress and you'll cut down on the amount of weights to paint.
Probably a good idea to skin the top half to the skeleton and the bottom half separate like jHromka suggested.
If your feeling ambitious Cloth is always fun
04 April 2004, 12:07 AM
That's funny...cause I was experimenting with wrap deformers just the other day. I've got good results using this method. Not realistic quality, but it definitely does the job for this particular situation. I'll be sticking with this technique on this project. Beats having to keyframe a bunch of joints.:thumbsup:
04 April 2004, 04:44 AM
For realism I would go cloth or Soft bodies for sure but the wrap deformer will give you a fair amount of control and you can adjust the or animate the envelope and weight thresholds for a bit more addded realism:beer:
01 January 2006, 02:00 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.