PDA

View Full Version : Blend Shapes – What have I done wrong?


tom.lowe
12-21-2004, 03:53 PM
Have I gone wrong somewhere?

So I have modelled my character (head and body are separate objects) then created all the joints and smooth bind them to the character. I then worked on the weight maps and got them working fine, then added a few IK handles.

Now I am working on the blend shapes.

What I did was duplicate the head and then because it is easier to edit the vertices in subdivisions I converted the head into subdivisions then when it was looking good I converted the head back into polygons and made sure the model was the same as was duplicated.

Then when I create the blend shape it distorts around 80% correct but the rest is distorted all over the place.

So first question can I do the blend shapes like I am doing? and secondly if I am doing something wrong what is it?

Thanks as always for your help

swartz3d
12-21-2004, 04:16 PM
Be absolutely certain that the geometry you copied was from the original bind pose of the skeleton. And if you have any other deformers (such as clusters, etc) on the bound character, their envelope should be set to 0 before you make a duplicate to start creating a blendshape. Otherwise, you'll see some strange overriding distortions.

The key is this: Blendshapes need to be identical in every way except what is morphing. SO if there are any joint rotations (even if it's like .0001) or clusters or lattices, etc on the original target shape, and you duplicate that and try to make a new blendshape -- it will screw it all up because it's trying to morph the WHOLE shape instead of just the changing area.

I feel your pain. I've been here before. Good luck!

kiaran
12-22-2004, 12:09 AM
By cutting off the head, you've changed the vertex order. Think of Maya's mesh as being large arrays of vectors. If the order (array index) is different between the target/shape, the wrong vertices will be affected.

I explain a workaround for this on my training DVD 'The Making of Leon'. www.cgtoolkit.com (http://www.cgtoolkit.com) . I don't have time to explain the whole thing here.

Cheers,
Kiaran

swartz3d
12-22-2004, 02:58 AM
If you separated the head from the body geometry to create the blendshapes, then Kiaran is absolutely correct -- but if the head was a separate piece of geometry to begin with, then just make sure you're duplicated the geometry in an unaltered state (at the bind pose, no deformers, etc).

One other thing to watch out for: When you do the conversion from sub-d to poly, make sure you're using the vertice tessellation method, otherwise the geometry won't be identical.

-Michael

tom.lowe
12-22-2004, 12:18 PM
Thanks for all your help so far.

But I still need more help if anyone has got any.

Tried out all the things you have suggested but I am still struggling.

kiaran - the head and body are separate so I haven’t altered anything it that way.

swartz3d - thanks for all your advice

The thing is when I copy my polygon head and then modify it as a polygon and create a blend shape everything is ok but as soon as I convert it into a Subdiv and then back again into a polygon everything goes weird. I have tried deleting the history and not deleting the history. But that doesn’t solve it.

I have also tried duplicating the head with all the envelopes on 0 – never new that did anything so thanks to swartz3d for that advise.

But the problem is still there.

Now I know that is can be done because my second character that hasn’t been smooth bind can handle the blend shapes because I did a test on her and it worked

So I can only thing that the smooth bind/ik handles/weight maps are the problem, also I have got a smooth node attached to the giant face but when I duplicate I make sure it is set to 0 divisions.

Thanks again for all you help

If anyone wants to have a look at the file I can send it by email.

tom.lowe
12-22-2004, 01:32 PM
UPDATE

During one of my test Maya told me it couldn’t do what I wanted because the character wasn’t in its bind pose.

Now Maya will not go to the bind pose because the character has ik handles applied so I set it to the preferred angle seeing as I had not set a more relaxed pose and the two poses look the same.

However it still doesn’t work so I am guessing that if I get the character into the bind pose it all might all work. – Like you guys have been saying.

Maya’s diagnostics is

“To disable IK, constraints, and expressions, you can use the Modify->DisableNodes menu.”

The problem is I can’t find that Menu it is just no in the Modify section.

Can you help?

swartz3d
12-22-2004, 02:03 PM
UPDATE
“To disable IK, constraints, and expressions, you can use the Modify->DisableNodes menu.”

The problem is I can’t find that Menu it is just no in the Modify section.


It's under Modify/Evaluate Nodes/IK Solvers

Then try selecting the skeleton and resetting to bind pose under the Skin menu.

I would also try deleting the smooth operation completely before duplication (because I wonder if that operation itself actually reassigns different id's for each vertice in the process of smoothing -- so setting to 0 doesn't solve the problem). You can type "delete polySmoothFaceName;" in the command line to quickly do this.

But one thing at a time -- this is a tedious process of ellimination.

-Michael

tom.lowe
12-22-2004, 03:38 PM
Thanks Michael, you have been a great help.

I have had a mini breakthrough, This is what I have done

I duplicate my original Poly Head
Covert the duplicate into a Subdiv and edit it to create a different face.

Then I was having all the problems when I create the blend shape however

I then convert the original head into a Subdiv (losing all the info but we can live with that because all I have to do is weight the lips to the correct joints.)

Then convert both heads back into Polys so that both heads are basically going through the same process.

Create the blend shapes and they actually work without any distortion

Then go to the bind pose (big thanks with that by the way Michael) smooth bind the head with the body again

And then I am done.

Also this solved my next question as well because before my jaw bones only affected my original head and not the crappy blend shapes, but now when I move the jaw bone it affects what ever face shape is being selected in the blend shape window.

Am I doing anything wrong by doing it this way? for example can you see any problem I will encounter by doing it this way?

Thanks again for all your help Michael

swartz3d
12-22-2004, 03:57 PM
I then convert the original head into a Subdiv (losing all the info but we can live with that because all I have to do is weight the lips to the correct joints.)

Then convert both heads back into Polys so that both heads are basically going through the same process.


I've never done this before, personally -- but it seems to me that it's an aweful lot of work and unnecessary. I think you could probably leave the original head geometry alone and just be sure that when you're converting the copy from sub-d to poly that you use the "vertice" tessellation method. That'll bring it back to the original poly shape that you duplicated.

but now when I move the jaw bone it affects what ever face shape is being selected in the blend shape window.


This sounds like a deformation order issue. Solve it by right-clicking the head geometry and select inputs/all inputs and middle-mouse drag the blendshape nodes below the skin node. I usually like to have my blendshape nodes below any other deformers too (like clusters, etc).


Am I doing anything wrong by doing it this way? for example can you see any problem I will encounter by doing it this way?

The two things that could be problems in your process that I see off the top of my head are (1) The converting back and forth between sub-d on your original head (I've never tried this) (2) deformation order is ALWAYS very important when rigging a character. Skin should usually be on top of the list (the end of the history chain) after deformers and blendshapes.

I'll be away for a while, but I'll try to check back and see how it's going.

-Michael

seven6ty
12-22-2004, 09:00 PM
Here's something I whipped up to delete all the bindPose nodes for a joint heirarchy. Just select your root joint and enter this in the script editor and it will delete all of those, so you won't get any more stupid "reset to bind pose errors":

{
// Get joints:
string $parentJoints[] = `ls -sl`;
int $parentSize = `size $parentJoints`;
string $something;
for ($something in $parentJoints)
{
select -r $something;
string $relatives[] = `listRelatives -ad`;
int $relSize = `size $relatives`;
$relSize = ($relSize - 5);
string $whatever;
for ($whatever in $relatives)
{
// Check to see if joint is not the last in the chain:
if ($whatever != $relatives[0])
{
// For each joint:
group -em -n ($whatever + "_Grp1");
string $nullGroup[] = `ls -sl`;
select -r $whatever;
select -tgl $nullGroup[0];
performPointConstraint 0;
performOrientConstraint 0;

// Parent each null group under the joint it's constrained to:
select -r $nullGroup[0];
select -tgl $whatever;
parent;
// Delete the constraints:
string $constraints[] = `listRelatives -c $nullGroup[0]`;
delete $constraints[0];
delete $constraints[1];
select -r $whatever;
string $jointRels[] = `listRelatives -c -type joint`;
string $nullRels[] = `listRelatives -c -type transform`;
select -r $jointRels[0];
select -tgl $nullRels[1];
parent;
}
}
}
}

tom.lowe
12-24-2004, 10:41 PM
Your right about this being a long route Michael and in the future I will do it 100% the way you suggested, in fact that is the way I have done my second character and it worked perfectly.

But for some strange reason Maya just doesn’t like my first character and will not deform as I want it to in the blend shape. It just doesn’t like the head when it is converted back into a poly.

But not to worry, as Maya is fine with my second character so I will just do the first character the long way and then after that I can produce all my blend shapes the way you suggested.

Thanks for all you help Michael

Also I have learned a lot over the last few days about blend shapes etc and I know pretty much what all the nodes are for in the channel box but one node that I am not to sure about are these 'Tweak' node. What do they do? and could they cause any problems?

Thanks

swartz3d
12-28-2004, 11:28 PM
Don't worry about the tweak node. It's created automatically when you create any sort of deformer (like blendshapes, etc). The tweak node keeps track of vertices (and CVs) that are translated (moved) directly on the object itself. You can re-order it the same as deformers in the history inputs list.

As an exercise to see it in action, just make a blendshape or any other sort of deformer on an object and then go into component mode of the object - move/translate a vertice or CV manually on the object itself. Note, if you go into the channel editor, the tweak node has an "envelope" value (from 0-1) just like any other deformer (to adjust its influence on the object). You can re-arrange the order of it in the inputs of the object to have the tweak node take precedence over other deformers or be at the bottom of the list. Whatever works for you.

Hope your character work is going well

-Michael

swartz3d
12-28-2004, 11:52 PM
I think I figured out what your problem is -- the poly smooth operation (in your case) shouldn't happen before the blendshapes. Delete it and use the smooth operation at render time. Unfortunately, you can't move the blendshape nodes before the polysmooth operation, otherwise, it wouldn't be a problem.

tom.lowe
12-30-2004, 12:09 AM
Thanks for your advise swartz3d

My character is working fine now, and I have done a further two characters since and they are all working fine, what you said about the polysmooth was spot on also.

You have been a great help to me solving this problem and I can't thank you enough.

Thanks

P.S I have finally started animating my character and all is going well so far.

swartz3d
12-30-2004, 05:38 PM
Glad I could help -- I'd love to see what your characters look like animated sometime. Good luck!

-Michael

tom.lowe
12-30-2004, 06:58 PM
I have put a few of the Blend Shapes I created up on this forum in the Animation WIP forum.

Like you know I am still new to 3d animation and have got a lot to learn but I was fairly happy with the restults, the best I have done so far anyway.

I put them up when they were still giving me loads of problems and not deforming right so I have you to thank for getting them all to work.

Have a look http://www.cgtalk.com/showthread.php?t=196880

I will post some animations soon.

CGTalk Moderation
01-19-2006, 07: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.