PDA

View Full Version : clusters with pre-animated skeleton...


frilansspion
10-13-2005, 04:28 AM
Hello. I have a problem that I thought I had already solved but it turns out I haven't, as usual. I have a motioncaptured skeleton and am attempting to bind a new model to it. I want to use blendshapes and also clusters for the eyelids with the new model, as I do with my original rigs. Problem is, the clusters are messing things up. although they are in the right place in the deformation order and have "relative" turned on (I also tried parenting them to themselves, adding objects in between the head bone and the clusters, and some other illogical panic moves) they start acting strange when the model begins to move. (its a simple walk) not so much when translated but when I rotate the clusters the cluster vertices rotate around some distant point or something, just shooting out of the face. what is up? must the model and all the bones be frozen for clusters to calculate ok? i can use them on my own rigs, both for eyes and splines, but with this skeleton (where most bones have a little translation and strange rotational axis(es??), and the root is rotated) its no good. any ideas?
I know I can leave the clusters in place at the bind bose, hide them and use controls for their rotation but I really want them on the face. =(
also (well this isnt a problem that I have to solve buts its weird) I use the "default material" display mode because the textures are layered, but when I use clusters the color of this default material changes randomly. its grey at the start as it should, then suddenly blue, yellow...?
thanks

Arcon
10-14-2005, 01:02 AM
I want to use blendshapes and also clusters for the eyelids with the new model, as I do with my original rigs. Problem is, the clusters are messing things up. although they are in the right place in the deformation order and have "relative" turned on (I also tried parenting them to themselves, adding objects in between the head bone and the clusters, and some other illogical panic moves) they start acting strange when the model begins to move. (its a simple walk) not so much when translated but when I rotate the clusters the cluster vertices rotate around some distant point or something, just shooting out of the face. what is up? must the model and all the bones be frozen for clusters to calculate ok?

...don't freeze bones. even freezing geometry with blendshape setup can be problematic. you mention you're using both blendshapes and clusters in the face... where are these things in the deformation order relative to the skinCluster...? if you're using front-of-chain blending the blend node should evaluate before (below) the skinCluster node. Clusters should also be before the skin but above the blend node.

is there any reason you have to use clusters and not blends for the entire face...?

frilansspion
10-19-2005, 02:09 AM
hello, thanks for your reply and sorry about getting back to you so late!
* the reason I use clusters for the eyelids is that I want the motion to go "around" the eye in an arc and not linearly. also, datawise its lighter and supposedly easy to set up (when things like this does not happen that is). but I guess - if theres no other choice - I could make blends instead in this particular situation. would still want a solution though =)
* the bones are not frozen. theyre already animated using motion capture, so I couldnt freeze or re-orient them even if I wanted to.
* the deformation is as you said,mostly. Ive tried the clusters both before and after the skin (since I want the controls on the face at all times that would mean the clusters should be after the skinning, right?) If I dont move them with my characters there is no problem, like I said.

Arcon
10-19-2005, 03:43 AM
the reason I use clusters for the eyelids is that I want the motion to go "around" the eye in an arc and not linearly. also, datawise its lighter and supposedly easy to set up (when things like this does not happen that is).

you can still have an arc with blendshapes, you really need 3 shapes for the top lids, one really high "surprised" look, a midway blend (which will define the arc), and a shut lid. you'll find the average 'eye open' pose is around the mid blend, maybe a little higher. for the bottom lid you can get away with 2 shapes, open and slightly raised, which isn't used often.

don't think clusters would be lighter in terms of performance, especially if you have cluster weights which you would be using. the only data in a blend node is the verts that move for each particular target, not the verts in the whole target.

clusters maybe easier to setup but i prefer blends because you can get the exact look you want, clusters you're limited to transforms.

i'd really need to see the rig check it out, but that might not be an option, if it is let me know how big the file size is.

frilansspion
10-19-2005, 06:57 AM
actually Ive wondered about that. does putting inbetweens into the blendshapes make the transition into an arc? I always thought it would just move through that shape making a kind of sharp corner. neat. I will remember that. making that many shapes sounds like a hassle but might be worth it I guess for the stability. what I dont like about blends is that theyre a pain to edit once created. if you have any tips for doing that, please share :love:
thanks for the reply. I learned a little about blendshapes even if I still cant find a way to keep clusters moving with the geometry. :)
mmm...I dont think I can upload the file...not because of how heavy it is (25mb) but because I dont think my boss would like me uploading company files to the net. =\ thanks anyways man!

Arcon
10-19-2005, 10:30 AM
regarding the arc thing - in theory it would be a linear transition but it doesn't have to be for a few reasons. you don't really notice where the transition is, especially for something with quite a small range like an eyelid. also you get to tweak the graph curves which control the transition between the targets; in addition to different target strengths defined by the curve value, you also can smooth blends with the tangents ;)

yeah you can edit targets if they stay in the scene but obviously the scene file size gets really big... there is a script or plugin out there that extracts targets that have been deleted from a scene, but i can't remember what its called... i would recommend seraching the archives here and maybe the scripts on highend3d.com.

yeah that's cool about sending the file, i don't really want a 25MB e-mail anyway... ;) good luck with your rig :thumbsup:

frilansspion
10-21-2005, 11:58 AM
really? thats sweet. had no idea it affected the tangents. thanks for the info dude:thumbsup:

Craiger
11-01-2005, 11:12 PM
If your stuck on it,,, why not rig up a blendshape of your guys head with the clusters,,, and leave the blendshape at 1 and hook you blink attribute to the clusters sitting back at the origin on your blendshape.

I figure if you can leave parts of your rig behind,,,, It'll make your life easier when it comes time to fix something.


Werd.

frilansspion
11-11-2005, 04:10 AM
sorry for the late late late reply. actually I can use clusters at the origin (before the skincluster) without blendshape workarounds. <- and thats what I settled for finally since there was no other way. what I wanted was to get the cluster to follow along... this time I only did rotation so it didnt matter much but when youre deforming with translation its a lot easier with the clusters on the geometry, and not having to navigate back to the place of skinning. If that absolutely impossible your solution is a good workaround though, Ill keep it in mind!
I cant believe it cant be done though. =) thanks man!

seven6ty
11-11-2005, 06:16 AM
Ok, god damnit, I totally had the exact answer for you, which I had to retrieve off my buddy's website... But of course it's down now. But yeah, basically, if you take the parent of the cluster, and do an inverse of it's transformation matrix, you can cancel out the double transforms (which is what you're probably seeing) on your model. Basically, what is probably happening if you have it parented into your rig... Is that it's getting one translation from being attached to your character's bind mesh, which makes it move through space with your skin.

Then, it's getting a second set of rots and trans from whatever joint/rig piece that it's parented into/under. This is giving those vertexes a second set of translations through space, those of the joint. So, now you have your clusters moving twice as far as you want them to. So, you can the trans/rots info from the parent (joint), and inverse it, so that it ends up moving it back against the movement of the joint, thereby cancelling out one of the two transforms it was recieving. Damnit, there was a quick connectAttr command, but I'll get it off my buddy tomorrow at work for those interested.

seven6ty
11-12-2005, 12:27 AM
Ok, here it is:

"One problem I have had with using Clusters in Maya is that if you parent them into the rig then you get a double transform on the vertices in the Cluster. But here is a solution I learned today.
1. select your verts, create your cluster
2. Assuming itís named cluster1(default name), type in the following:

connectAttr -f cluster1Handle.pim cluster1.pm;

This will connect cluster1Handle.parentInverseMatrix to cluster1.bindPreMatrix.

3. Group the Cluster and then parent it into the rig.

The cluster will now follow the rig, without double transforming."

Craiger
11-14-2005, 02:34 PM
The thing is,,, you don't have to make the cluster follow the rig. If you leave it out of the hirerarchy, you can still hook it up to a controller that follows with the character rig. Make an empty group (Group1) which you'll use for your controller. Group it to itself (Group2). Parent constrain Group2 into your rig so it follows along. Hook up the tx,ty,tz and rx,ry,rz of Group1 to the cluster sitting back at the origin. Done.


werd.

seven6ty
11-14-2005, 03:57 PM
That works too, but it's messier. :)

Craiger
11-15-2005, 03:30 PM
Actually, Its a cleaner solution than making all of your deformers follow your rig. There is a greater chance that things will break when they have to travel with the rig. Leaving things sitting at the origin saves you a lot of time when it comes time to fix problems. If you don't have to make something follow the rig, I'd suggest you leave it where it is.


werd.

seven6ty
11-15-2005, 04:07 PM
Mmm, not if you have multiple characters in your scene, all running around. In that case I'd think the last thing you'd want is various parts from each all sitting on top of each other, possibly thousands of units off being left at the origin. I only see funky stuff happening there... Especially if you start passing stuff like that down a pipeline.

Craiger
11-15-2005, 04:29 PM
To each his own. Obviously you would want to clean up the Outliner and make sure those clusters/deformers/etc are not just sitting by themselves, but rather in a group inside the character hirerarchy. In my experience, I've found that its easier to problem solve if a rig breaks, or misbehaves if some of the deformers controlling it aren't going for the ride with the rig. Both ways work just fine, this is just my workflow.


werd.

TRANSFORMER
11-15-2005, 09:53 PM
I made a little script that works the same way.

It's called Cluster Muscle.
Get it here: www.YouNeedThisMan.com (http://www.YouNeedThisMan.com)

TiM

anespark
12-01-2005, 07:28 PM
The thing is,,, you don't have to make the cluster follow the rig. If you leave it out of the hirerarchy, you can still hook it up to a controller that follows with the character rig. Make an empty group (Group1) which you'll use for your controller. Group it to itself (Group2). Parent constrain Group2 into your rig so it follows along. Hook up the tx,ty,tz and rx,ry,rz of Group1 to the cluster sitting back at the origin. Done.


werd.



Hi Craiger.
I want to test out yours, but I am not getting one thing.
What do you mean by " Hooking up the tx,ty,tz and rx,ry,rz" ?
are you saying hooking up with Connection Editor?
Could you explain little clearer?

Thank you.

Craiger
12-01-2005, 08:38 PM
yep. Just use the connection editor to hook it up. Translate X to Translate X, Translate Y to Translate Y etc... If you don't want a 1 to 1 ratio, you could use Set Driven Key.

oh yeah.... i almost forgot. you have to drag the cluster down in the deformation order to before the skin cluster.

werd up

CGTalk Moderation
12-01-2005, 08:38 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.