PDA

View Full Version : Body Part Blends + Merging Vertex


Vandal
01-31-2004, 06:51 PM
I cut my character into sections so that I could do seperate blend shapes on each part of the body - so that I don't have to do full body blends when only the chest is changing. Speed things up.

http://www.paranoidentertainment.com/images/blend1.jpg

I created the blend shape for the chest (breathing) and then re-combined all the geometry and merged the vertex's back together so that it was all one peice again. Problem is that when I run the blend shape, the chest peice will blend into position - but the vertex's split apart - even though they are merged. Anyone know why, and how I can get around this?

http://www.paranoidentertainment.com/images/blend2.jpg

Here's my deformation order. I can't seem to change them around too well, but you may see something I don't.

http://www.paranoidentertainment.com/images/blend3.jpg

gmask
02-03-2004, 01:04 AM
It would have been better to have used blendshapes on sets of vertices rather than chopping the model up.

Vandal
02-03-2004, 04:39 AM
So you're saying I should keep my model as one whole peice and just make a million blends using the whole body. Only move the vertices I need on the body, but I'd duplicate the body a whole bunch of times instead of individual parts?

Wouldn't this save lots of useless data and slow things down?

GrafOrlok
02-03-2004, 06:55 AM
Yes, that's the way to go. You then delete all the BlendShape models and your scene becomes very light. Only the vertex movement is stored (in the BlendShape node).

I usually keep all my BlendShapes in a separate file so that I can call them up if I would need to do some changes. Just import them back and tweak. Then of course you need to re-create the blendShape node.

/Staffan

gmask
02-03-2004, 07:21 AM
Originally posted by Vandal
So you're saying I should keep my model as one whole peice and just make a million blends using the whole body. Only move the vertices I need on the body, but I'd duplicate the body a whole bunch of times instead of individual parts?

Wouldn't this save lots of useless data and slow things down?

Not exactly.. if you use sets of vertice sthen you are only animated what is needed.. then when you are done you no longer need the duplicated meshes.

So for example let's say you have 5 vertices in the head, 5 in each arm etc. The whole mesh has hundreds of vertices.. you sets have 5 or whatever each. This should be much more ffecient than cut up the model because you are potentially storing hundred smore vertices than you may need plus you then have to deal with contruction history or other performance drainign reconstructions to make the mesh whole again.

Vandal
02-03-2004, 01:34 PM
Okay, this is starting to make more sense. I was aware that I could delete the blends after I create them, but that their data would be stored in the one base shape. As I understood it, if I created full body blends - it would story the blend information of a vertex even though it wasn't moving or blending. Which would be a waste as I see it. Now that you both share the same principles and suggest I use the full body, here's my next issue.

I was told that it's wise to split up my geometry through out my body so that I could assign sepereate texture maps to each body part, allowing more detail on one part of the body (face or hands) then the arms or legs. Use a 1024x1024 texture map on the face and only a 512x512 on the legs - instead of one HUGE 4000x4000 texture map (only an example). I see the problem of a seem appearing, especially with my current blend shape system.

Solution 1: Keep everything in parts, don't allow blend movement near any of the seem lines. This keeping seperate shapes for different sized texture maps.

Solution 2: Use the whole body with vertex sets (by these, do you just mean - move the needed vertex I need in my blend and that's all) and not worry about seem lines with the geometry nor the texture. Yet, I'm stuck using an extremly large texture map that may be quite slow to paint.

gmask
02-03-2004, 07:15 PM
>>>Okay, this is starting to make more sense. I was aware that I could delete the blends after I create them, but that their data would be stored in the one base shape. As I understood it, if I created full body blends - it would story the blend information of a vertex even though it wasn't moving or blending. Which would be a waste as I see it. Now that you both share the same principles and suggest I use the full body, here's my next issue.

Just let me clarify that using Sets to create blendshapes is not the same as a fullbody blend. Th ewholemesh will not be stored only the vertices stored in the sets.

>>I was told that it's wise to split up my geometry through out my body so that I could assign sepereate texture maps to each body part, allowing more detail on one part of the body (face or hands) then the arms or legs. Use a 1024x1024 texture map on the face and only a 512x512 on the legs - instead of one HUGE 4000x4000 texture map (only an example). I see the problem of a seem appearing, especially with my current blend shape system.

You don't have to break up the body if it's polygonal in order to assign different UV maps and shaders to different parts of the body. Also as for detail for a particualr par tof the body it coudl be all in one map if you edit the UV's to give one area more resolution than others. However given that Mental Ray can be troublesome with complex UV maps you may have problems with it. So if you plan to use MR it would be best if it was one large Texture map that was editted to give mor eor less resolution where it's needed.

>>>Solution 1: Keep everything in parts, don't allow blend movement near any of the seem lines. This keeping seperate shapes for different sized texture maps.

Not having movement near seams is probably a comprimise that will "comprimise" the quality of motion and deformation.. I don't think that's going to be acceptable for a relatively photo real character.



>>>Solution 2: Use the whole body with vertex sets (by these, do you just mean - move the needed vertex I need in my blend and that's all) and not worry about seem lines with the geometry nor the texture.

Only put the vertices that will be moved in the sets.. create sets for head, arms legs chest etc.

>>>Yet, I'm stuck using an extremly large texture map that may be quite slow to paint.

As I mention above you could assign different shaders to seperate parts of the body if it's a poly mesh..simple select the faces you wish to give their own texture and assign and map them how you need. However you may have problems if you intended renderer is Mental Ray.

Vandal
02-04-2004, 02:38 AM
Originally posted by gmask
Just let me clarify that using Sets to create blendshapes is not the same as a fullbody blend. Th ewholemesh will not be stored only the vertices stored in the sets.

Okay, I wasn't aware of this but now I've done some research into sets and I understand what you mean. I attempted to make some sets and create blendshapes.

This is how I did it - please tell me if I did it completly wrong.

1. Select the vertex's on my character's head (which is connected to the rest of the body)

2. Create > Sets > Sets - named it "Head_set"

3. Duplicated my host body a couple times - using default settings - and moved them to the sides.

4. Selected the vertex's on each duplicate and moved them in a random place for testing purposes. I did that for each duplicate.

5. Selected the set in the Outliner - Deform > Create Blend Shape

The problem when I do this is that it seems like Maya picks a random target to become the blendshape host - it doesn't go on the character I want. I attempted to make a simple cylinder primative and do the exact same technique - it works great. The first object - the one I create the set with is always the host blend.

Another problem is that I have no idea what to do when I'm using more than one set. Do I select them all and then Deform > BlendShape ? When I tried that, I had 4-5 sliders in the BlendShape window but none of them did anything.

Should I be using sets alone, or partitions with sets inside them? I was reading the help files on sets and partitions, and it's still very confusing. I noticed that vertex's can be shared between sets - how does that effect the blend shapes? Should any vertex's be shared?

gmask - I definitly appricate the help. After three years in school learning this stuff, I still feel like a newbie sometimes.

PS: Yes, I would like to use MR - only because I need to learn how to use it.

Vandal
02-04-2004, 02:56 AM
Okay, I just went through a couple of your sig links and found the Maya FAQ section at Highend3D and checked out your section on this issue. I went to this link (http://www.highend3d.com/boards/showflat.php?Cat=&Board=mayaanimation&Number=43051&page=25&view=collapsed&sb=5) and realized that when I make my duplicate object, I have to then select the exact same vertex's and create another set out of those. Then take those two sets and create a blend shape out of them. That seems to work. I havn't done much testing yet, but I'm getting farther!

I can see it being quite annoying having to pick the exact same vertex's everytime I want to make a new blend - but, if that's what I have to do, I will do it.

gmask
02-04-2004, 03:17 AM
Originally posted by Vandal

I can see it being quite annoying having to pick the exact same vertex's everytime I want to make a new blend - but, if that's what I have to do, I will do it.

Here's a little script that will help you make the same selection on the duped object.

Select the set then run the command below.. be sure to edit the dupeobject variable to that of the dupe object that you need to copy the selection to.

-----------------------------------------------------
string $select[]=`ls -sl`;

select -d;
string $dupeobject="pSphere2";
string $buffer[];

for ($n in $select){

tokenize $n "." $buffer;

select -tgl ($dupeobject+"."+$buffer[1]);


}

gonk
02-11-2004, 03:47 AM
I was playing with that script, but i have not been able to get it working.


Everytime i run it I get this error:

Error: line 11: Invalid attribute name: two


two being the name i gave the duplicated object.


What am i doing wrong?

Vandal
02-11-2004, 04:25 AM
Script works GREAT for me. I was going to post and thank gmask about how well it works and to thank him. I actually modified the script a bit so that it would work better for my situation too.

This is how I use it. Before I make a set, I make sure I make a duplicate copy of the original (so that it doesn't carry the set information with it), then I create a set on the original. Once that is done I usually hide my original - I don't need it again until I'm testing out my blends.

I take my duplicate and create the blend target. Once I'm satisfied I run this script.


select -cl ;
select -r -ne Head_Set ;
select -hi;
string $select[]=`ls -sl`;
select -d;
string $dupeobject="Duplicate1";
string $buffer[];
for ($n in $select){
tokenize $n "." $buffer;
select -tgl ($dupeobject+"."+$buffer[1]);
}


I added a couple things that just picked all the verts properly and then flipped them over - most of the code is gmask's though. I just added the top 3 lines for myself. Once the verts are selected on the duplicate - create a new set. Then select both sets (duplicate, and then the original set (Head_Set) in this situation) and then create blend shape. Great workflow for me.

Thanks again gmask! Hope that helps gonk.

CGTalk Moderation
01-17-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.