Beer glass scene creation
This course contains a little bit of everything with modeling, UVing, texturing and dynamics in Maya, as well as compositing multilayered EXR's in Photoshop.
# 1 22-03-2014 , 06:58 PM
Registered User
Join Date: Mar 2014
Posts: 4

Triangles to quads through Transfer Attributes - need an advice?

Hello! I am a newbie in Maya and need your advice to solve one practical problem. I need to convert triangulated meshes of 3D clothing into quads and I'm trying to do it thru Maya with no success yet. Meshes were generated by Marvelous Designer software and look like this -
user added image
I attempted to convert it thru Z Brush Q-Remesher but got inaccurate curved topology without Uv mapping. Someone of MD users found such a decision -
Zbrush should still be useful. Just output the meshes flat, then run the quad mesher on them. Then the UV?s can be projected straight from the originals to the new quad mesh. Then the new meshes can be wrapped back into it?s 3d form. using the same UV projection.
But as i know it cannot be done in Zbrush, but thru Maya only. I found one method described and it sounds like this-
did a bit of testing and actually found a pretty straight forward way of getting quads and keeping the UVs from Marvelous Designer. You might have to do a few minutes of merging vertices by hand in Maya but in the end it's very fast.
So what you do is you use QRemesher the same way as described by MDB101. But from MD you export the simulated mesh as an obj with UVs and the flattened mesh with UV you get from pressing the Reset to Default Arrangement in MD. So now in Zbrush you use QRemesher on the flattened mesh from MD, which means you now have 3 objs. Open Maya and import all three objs, transfer the UVs from the flattened mesh from MD on the QRemesher obj by using Transfer Attributes. Now you have a flattened QRemesher mesh with the proper UVs from MD. So for the final step, select the proper cloth simulated mesh from MD with UVs and then the QRemesher mesh with UVs, once again use Transfer Attributes using Sample Space: UV and Vertex Position: On. and Boom! There's the quad mesh with the cloth simulated folds and a great UV. The only thing left is merging the UVs from the different parts. Usually you can get the majority of vertices merged by selecting every single vertices, select a good value and press merge. There will be some triangles in the end cause QRemesher will create an uneven set of quads. But we're talking about perhaps just a handful.

Please couldn't you or someone else explain me this technique in details? For example - I have all three meshes of one the same dress -
The first one flattened to Default Arrangement from MD with UVs -
user added image

The second one is quad flat from Z-Brush (QRemesher on the flattened mesh from MD), it was UV-mapped, but the abovesaid method requires it without uvs
user added image

And the last is the proper cloth simulated mesh from MD with UVs -
user added image

I Import all three into Maya - what is the exact order of actions and which options I must check into Transfer Attributes window for each step? When I try to do it, I got broken uvs (parts of them) at the first step and no quad mesh at the second. I see just a wrong flat thing appears and the old triangled MD mesh -
user added image

Whic options should I check exactly in Transfer Attributes window for each step? Is it really so easy at all?
And can I use the second mesh from Z-Brush together with its quad Uv set for transferring? I mean in the end after generating the quad mesh, to transfer its UVs? Or may be there's a shorter way in Transfer Attributes?

Another way I've found - a script here, which was developed specially for Maya to turn MD meshes into quads. I'd like to test in Maya 2008 but cannot run it (it's a Python script). Here is a tutorial to run Python scripts for Maya 2011- i attempted to do so but I don't know exactly what to do with the code of the function from here, So when I simply load the script in Script Editor and put in in the Shelf, it doesn't work on the mesh (Syntax Error) or No pymel.core runtime, like in this screenshot
user added image
How to run this and other external Python scripts in Maya? And where can I find this pymel.core runtime?

Last edited by Nixa; 22-03-2014 at 07:03 PM.
# 2 22-03-2014 , 11:20 PM
Registered User
Join Date: Aug 2011
Location: Sliema Malta
Posts: 497

# 3 23-03-2014 , 11:10 AM
Registered User
Join Date: Mar 2014
Posts: 4
Yes, thanks, it's a great tutorial but I'd like to avoid closing holes (meshes are planned to be used as clothes in poser) and in my case retopology in Z-brush, even though mostly symmetrical often gives undesirable results like this -
user added image
(And it's the most decent result I got so far). It needs long editing after remeshing to get proper edgeloops. And keeping good flat UVs is important for me too - unfolding such body-wrapping models leads to distorted UV map.
Retopology in Maya (as far as I saw through pictures in Web) gives better quad flow, with smooth edgeloops and if the author of the method above was right, it helps to keep original straight UVs. I guess there must be another method to use Uvs of remeshed quad flat model (the second mesh) and build 3D quad mesh on their base (I came across such hints in Web), but I don't know exactly how to achieve this. May it be true?
All the time I try to transfer attributes, it seems I check wrong options or I miss some important preparations, so cannot get the described "Boom!" result. What should I do first?
And the script from Adam Vanner could be a good solution for me too, but I cannot run it. What is this pymel core runtime, must it be built-in in all Mayas or the script is purposed for another later version, not for Maya 2008 x64?

Posting Rules Forum 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

Similar Threads