Successful blendshapes require that the multiple copies of your model that you are deforming share the same vertices order that the original model has. That's fine and all works well if you stay inside of Maya but I've run into a snag while exporting my models as OBJs to be remodeled in other programs such as Zbrush. Actually, the problem begins the minute you hit the EXPORT button. I've exported the poly model then imported it back into Maya without ever having brought it into another program and the vert order changes. This creates a big problem. So, how do people deal with the situation of exporting their model (or parts of the model) then bringing it back with the vertices order preserved?
I've discovered that if I export the original model then import it back in then create blend shapes from THAT model, the problem doesn't exist but, what if you break the model down into pieces: head, arms, legs to create blendshapes for each then you combine the pieces back together and merge the vertices. I haven't tried this yet but I'm anticipating that such manipulation will change the vertices order. Is there a utility within Maya or a Mel script available that combats this problem? Vlad, I'm sure you know what I'm talking about. Do you ever create blendshapes outside of Maya? If so, what is the proper workflow to make all these pieces of geometry play nice when you use them to create the blendshape nodes?
Here is the workflow that I'm using now:
Create poly model
EXTRACT faces for a part of the model (the head) with the 'seperate extracted faces' checked, and 'keep faces together' on.
Export the head as an OBJ
Import the head back into Maya
Copy imported head for blendshape modeling
Export copied head as OBJ
Import and remodel head(s) using Zbrush
Export head(s) from Zbrush as an OBJ
Import Zbrush head(s) back into Maya
Create a blendshape node(s) as usual.
This works well but I haven't tried reattaching the head to the rest of the model yet so I don't know if that will create a problem. Plus, the head is just one piece of extracted geometry from the model. I feel like the problem will be compounded when I extract the legs and arms to create blendshapes for them as well. I suppose that as long as the verts on the edge of each piece of geometry is not altered then the blendshape creation can be told to not check the topography of the model. I just fear that each piece of seperated geometry that is exported will be assigned identical vert numbers that have already been assigned to verts on other parts of the seperated model. Any help is greatly appreciated.
Strange but I've noticed that once a person posts a problem on this board, they often discover the answer for themself.
I discovered that if I extract the head from the neck then export it out and then import it into Zbrush, I can then export it from Zbrush and back into Maya then combine and merge the head back to the neck. Then I can go back to Zbrush with the originally exported>imported head and sculpt it into as many copies as I need then bring them into Maya and they will work flawlessly as blend shapes. The key was pretty basic; do the same thing to each head and the vertices will stay the same for all of them.
Tonight's test will be to break a model down into more seperate parts (head, torso, arms) then try to make blend shapes for each. My only worry is what will happen when I combine the multiple parts of the original model back together. It worked well when I ran my test with the head and neck but now I want to see what happens when I add more body parts to the scenario. I'll post my results later.
You can break your model into many pieces then create blend targets for each piece then combine and merge the pieces back together and all will work as long as you create the blendshape nodes before you combine and merge the pieces back into a single piece of geometry. There is one problem though; a node is created that keeps track of the original vert order and the new vert order (once the pieces are combined back together) so that the blend targets can still affect their base geometry even though the base geometry verts will get reorders. The problem is that, depending on how many verts you have in your model, this calculation takes time. The blendshapes will not work in real time as you move the blendshape sliders.
Now, if you are only seperating one piece of the model to create blendtargets you won't have this problem since, when combining the two pieces back together, if you select the blendshape base geometry first and the rest of the model second then COMBINE the pieces, the blendshape base geometry will retain the order of its vertices and all non transform history can be deleted. This means that there is no need for maya to create a node to keep track of vert order changes since they didn't change in the part of the model that has a blendshape node attached.
I'm working on a practical demonstration now that will show a model deforming with the use of multiple blend targets that were created in Zbrush. I'll post the video clip as soon as I'm done...
I think I know what you're saying , Vlad, but wrap deformers are very processor and memory intensive. I might try the muscle system included on the rigging disc from the Hyper-Real DVD set that Alias has available. This muscle system doesn't calculate the entire mesh. From what I remember from the DVD, it only calculated the affected vertices via a weight map that you paint. This way, you can use a "muscle" to deform an area of skin without having to deal with the rest of the skin being calculated.