Alright, our programmer brought to our attention that each sub-mesh of a model may only have 40(ish) bones. The model in question has 79 bones, so must be broken up into at least 2 sub-meshes.
However, the vertex numbers are in an "illogical order."
i.e.- vertex
#1 is on the face, vertex
#2 is on the knee.
So instead of the model being split in half at the waist or something, it is being split into about 6 sub-meshes.
The model was made the way they usually are here, but this one in particular is causing problems. I think he said 200 and something bones were being transformed, instead of the 79 that should be.
I don't entirely understand what he means.
Anyways, does anyone happen to have a script or method for manually renumbering the verts of a model? Preferably a Maya solution.
Replies
http://www.scriptspot.com/3ds-max/morphix
If its a matter of more bones being added than what is actual on the rig, you probably need to check that the pivot point of each bone is at the EXACT same place as its parent. If there are any gaps between child and parent there is a very good chance that a new bone will be created on export, but it depends on the exporter. Happens all the time with FBX...
It'd break a morph target iirc so must affect vertex ordering somehow
Chances are you have committed to UV layouts already and have turned on the "preserve UV" option and/or transfered UV information back when appropriate keeping the "same" UV landscape?
( even if vert order has gotten away from you between two different versions of a model. chances are visual feedback assured that UV integrity has remained the same? )
In such a case...
simply use the model ( morph shape? ) with the correct vertex order.
compare and correct that morph shape's vertex positions using the UV layout as a key.
UV position is what we would be comparing against and not uv the map.
The script would build vertex position one at a time in this way till done.
For every vtx in the shape to be captured>
vert's UV = polyListcomponentConversion -fv -tuv;
polyEditUV -q vert's UV;
that result u v stored in the same order as that corresponding verts position.
On the Morph mesh with the correct vertex order but incorect position...
we find the corresponding vert:
MMvert's UV = polyListcomponentConversion -fv -tuv;
polyEditUV -q MMvert's UV;
The position stored in the same order as each corresponding UV position is applied to that vertex...
repeat till done! Transfer skinning hopefully when done!
Unless I am overlooking something ( and the uv assumption is valid for your case )
I imagine that would do the trick.
Even if yer UVs are hosed as well.. All hope might not be lost?
Sometimes depending on your workflow there might be similar maps applied to both models that survived vertex order.
For Instance, sets command can be useful inscripts as well as Blind Data and vertex color to map vertex order ahead of time before a destructive action. ( depending on which actions... combine for instance is to destructive for such a strategy. But within a scripts order where you have ultimate control using Sets instead of ls will retain vertex order further allowing u to make boolean sets within that capture! )
Even outside the control of a script perhaps a map exists that you can still leverage?
Without your project on my desktop, it's really hard to say if an even easier fix is available?
What poopipe suggest could be a quick fix? Trying to guess yer exact usage??
If for instance u need all the lower vertices on the bottom half of yer model
and all the higher numbered vertices on the upper part of the model you could make two duplicates ( giving you 3 versions in this example )
- kept in it's original state to transfer back any skinning or uv information
- half the model representing the lower body
- half the model representing the upper body
When you combine both parts select the half of the body that should have the lower numbered vertices first.Hope that helps ( hoping someone else actually feels like doing the actual writing poke poke poke... )