transfer vertex ids between different

64 views
Skip to first unread message

Rudi Hammad

unread,
Jun 21, 2021, 6:57:33 PMJun 21
to Python Programming for Autodesk Maya
Hello,
haven't found anything in the search bar and nothing really worked for me doing a google search, so I was wondering if it is possible to transfer the vertices ids from one mesh to another with different topologies. There is a tool in Maya called transfer vertex order , but it crashes maya every time.
Any suggestions?
Thanks

R

Alejandro

unread,
Jun 21, 2021, 7:10:27 PMJun 21
to Python Programming for Autodesk Maya
I believe you need to have the same topology to transfer the vertex order, since you'll need the same number of vtx to copy the id to, otherwise maya will crash.

Rudi Hammad

unread,
Jun 22, 2021, 3:45:14 AMJun 22
to Python Programming for Autodesk Maya
That was to nice to be true. So I guess there is no easy way (or no way at all probably) to transfer the vertices ids between different topologies?

Alok Gandhi

unread,
Jun 22, 2021, 3:53:25 AMJun 22
to python_in...@googlegroups.com
There was GATOR is Softimage XSI that could handle such cases as yours. I remember vaguely that it was being worked upon in Maya (since the Softimage dev team was merged with the Maya team). I am not sure if it exists in Maya in some form. Maybe someone here has more information and can comment.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/a86d302a-881b-4443-a487-18a468ecb0b4n%40googlegroups.com.

Rudi Hammad

unread,
Jun 22, 2021, 4:35:28 AMJun 22
to Python Programming for Autodesk Maya
It looks similar to maya's transfer attribute tool, but it doesn't look to do a vertex id transfer.

Alok Gandhi

unread,
Jun 22, 2021, 4:46:50 AMJun 22
to python_in...@googlegroups.com
Ok. Btw, I am curious as to how you would transfer the vertex id for two differing topologies. Can you give some details about what's different between the two topologies. In any case, I assume that they have the same number of vertex (otherwise you cannot transfer the vertex ids).


Rudi Hammad

unread,
Jun 22, 2021, 5:44:57 AMJun 22
to Python Programming for Autodesk Maya


yes, i want to have different topologies. The use case would be a rig where you have a mesh cut out of the head for the facial rig, that you blendshape into the full body mesh. So there you have 2 different topologies. In maya you can do a blendshape between different topologies but if the ids don't match you get unwanted results.
I can achieve that alternativly wrighting a wrap deformer , but I was wondering  by beeing able to match the vertices ids it would be easier.

R

Rudi Hammad

unread,
Jun 22, 2021, 5:46:12 AMJun 22
to Python Programming for Autodesk Maya
(so no, meshes whould not have the same number of cvs)

Hannes Delbeke

unread,
Jun 22, 2021, 6:41:19 AMJun 22
to python_in...@googlegroups.com
match by vert id is impossible in that case because the vert ids cant ever match, unless you somehow reorder the verts yourself from the mesh with the most verts(the body)
what i suggest to do instead is match vert by world position, or if you have unique UVs by UV position.

get the closest vert, for every vert. and hook them up in a tuple.
then use this to do anything you want. ex transfer skinning.

i suggest to do this with openmaya because of speed
it will be very slow in pymel



Rudi Hammad

unread,
Jun 22, 2021, 7:00:31 AMJun 22
to Python Programming for Autodesk Maya
Actually I is possible, I did figure out how to do it. If you separate the head from the body, duplicate the head, and then recombine the head to the body, vertex order is preserved.
Then you can do a blendshape. I'll probably end up writing a deformer anyway, but that's a nice little trick there.

Alok Gandhi

unread,
Jun 22, 2021, 7:01:38 AMJun 22
to python_in...@googlegroups.com

Hannes Delbeke

unread,
Jun 22, 2021, 7:22:17 AMJun 22
to python_in...@googlegroups.com
that's true when it stays separate, but when merging the 2 pieces together including merging overlapping verts and vert UV, order for those merged verts can change




stephenkmann

unread,
Jun 22, 2021, 5:03:11 PMJun 22
to python_in...@googlegroups.com
Why are you separating the head.. you don't really need to do that technique any more , now that there is the morph deformer... 

Also, I usually found the performance hit of having a connected head to body with morph targets was never really that bad.. especially if you remove the body components from the blend shape. 

I'd be curious if the head cutting off is still necessary , and in what cases.. 


-=s



Roy Nieterau

unread,
Jun 22, 2021, 5:12:22 PMJun 22
to Python Programming for Autodesk Maya
Not an answer to the question, but the separated mesh rig-blendshape workflow can be much optimized in Maya 2022 using the new Morph deformer: https://youtu.be/Cdow0UVZfBI?t=1605
In particular the "partial deformation" around 28:10 he states it and starts showing after. :) No need for actual merging of meshes, etc. - That's prone to get slow!

Rudi Hammad

unread,
Jun 22, 2021, 8:05:30 PMJun 22
to Python Programming for Autodesk Maya
Cool stuff about the morph deformer. I just need something that works across previous maya version. Thanks for the ref.
About separating the head it simply how I like to my rigs. I used both method in different production and still prefer the cut out.

Rudi Hammad

unread,
Jun 22, 2021, 8:17:36 PMJun 22
to Python Programming for Autodesk Maya
By the way I just saw that the solution I came out with it is what he mentioned in the video. Happy accidents happen after all!

stephenkmann

unread,
Jun 22, 2021, 9:06:45 PMJun 22
to python_in...@googlegroups.com
Yes that's what I'm saying Roy, 
  You no longer need to separate.. as the morph deformer will act like a blendShape to the joined full body/head . 

If you don't need it to be connected.. like the neck goes under a shirt. then sure..   I prefer separate shells,,, ( I am not a multi shell poly fan) 

but for characters where you have the head and neck connection visible as it flows into the body,, then  I don't bother to cut the head off and go thru the rig-a-marole of cutting off and re-ordering and re-connecting hack. 
Dropping your verts out of the blendShape deformer will result in a similar performance and file size.  or if in 2022 you can use the morph deformer.

-=s

Rudi Hammad

unread,
Jun 22, 2021, 9:32:31 PMJun 22
to Python Programming for Autodesk Maya
Here are the reason why I prefer the cut out(maya 2022 and previous) :
1. it is cleaner in the sense that you don't need to have an entire body if your are just movind points in the head.
2. the file size where your keep your blendshapes will be smaller. You might not notice this is cartoony characters, but if you are working with high res geo (like in realistic character) you will feel the impact in size and loading times.
3. if the body topology changes, all your facial blendshapes are still safe. Even adding an extra loop in the fingers later on will mess up all your facial blendshapes.
4. cutting out the head will allow you to display the head with different LODs. You might get 24 fps with one char in the scene but if you have 4, i hardly see it will keep up to 24 fps. If you cut out the head you can display it with a procy
  body so you will have 24 fps with many chars in the scene.

In a nutt shell I find separating the head a cleaner and more optimize design. Just do what ever you think is best for your workflow.
Reply all
Reply to author
Forward
0 new messages