Reply
Reply
 
Thread Tools Display Modes
mLink's Avatar
Old (#1)
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.
MattLink3d.com character/creature artist
Offline , spline, 137 Posts, Join Date Jul 2009, Location The writhing south  
   Reply With Quote

Mark Dygert's Avatar
Old (#2)
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...

Last edited by Mark Dygert; 11-04-2009 at 04:18 PM..
(AKA Vig) Portfolio | Lab | Brawl | Decker |
Offline , Polycount.com Editor, 13,894 Posts, Join Date Oct 2004, Location Seattle, Wa Send a message via MSN to Mark Dygert  
   Reply With Quote

NAIMA's Avatar
Old (#3)
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?
Offline , dedicated polycounter, 1,338 Posts, Join Date May 2009,  
   Reply With Quote

NAIMA's Avatar
Old (#4)
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?
Offline , dedicated polycounter, 1,338 Posts, Join Date May 2009,  
   Reply With Quote

cw's Avatar
Old (#5)
I couldn't get morphfix to work either when I tried it.
Creative Assembly
Total War
Creature doodles
Offline , polycounter, 776 Posts, Join Date Jan 2006, Location UK  
   Reply With Quote

poopipe's Avatar
Old (#6)
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
Offline , triangle, 392 Posts, Join Date Dec 2010,  
   Reply With Quote

claydough's Avatar
Old (#7)
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??

Quote:
Originally Posted by mLink View Post
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 )
  1. kept in it's original state to transfer back any skinning or uv information
  2. half the model representing the lower body
  3. 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... )
Offline , polygon, 712 Posts, Join Date May 2008, Location Austin/Baltimoron  
   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Copyright 1998-2012 A. Risch