View Full Version : Reordering the vertex numbering of a model.
mLink
11-04-2009, 03:35 PM
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. :\
Mark Dygert
11-04-2009, 04:11 PM
If its a simple vertex table not matching from model to model. Morphfix will probably get them reordered correctly.
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...
NAIMA
03-19-2012, 03:21 PM
this is not working on max 2011 , is there any other script similar that works on max 2011 or anything inside max that coudl do the same?
NAIMA
03-20-2012, 06:30 AM
Is there any other plugin for doing this there are no instructions on how to install this but I do not think I did anything wrong as when I open the plugin in max as script I can't even read it in the list ... I donět understand why everytime they make a new version all plugins become useless ...
So does anyone know of another way tomake two objects that are the same object but just morphed differently to do actually preserve the same vertex order?
I couldn't get morphfix to work either when I tried it.
poopipe
03-20-2012, 01:31 PM
Would attaching the object to another mesh And then deleting the other meshs original polygons fix it?
It'd break a morph target iirc so must affect vertex ordering somehow
claydough
03-21-2012, 12:53 AM
If your needs are not simple and you actually have to re-order "every" vert's order to match another model whose vertex size is the same ( and is essentially the same model. Tho I suppose the following is valid for any "UV matchable area" )
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??
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.
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... )
vBulletin® v3.8.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.