Jump to content

Maya Boolean making mesh vanish


Zak Kozlov
 Share

You are about to reply to a thread that has been inactive for 3675 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hello!

 

I'm exploring a complete new workflow for mesh clothes creation using Marvelous designer and maya to retopo the mesh using this tutorial right here http://www.youtube.com/watch?v=ZMuw0sfMKQs (Total maya noob compared to Blender and zBrush hehe)

 

So i'm having a problem when its time to do boolean intersect , the meshes are vanishing

I did lots of search and apparently it's a common problem on Maya but no solution i found worked

 

Even found a thread with the same issue on SL forum right here:

http://community.secondlife.com/t5/Mesh/Please-help-problem-with-Maya/td-p/2166339

 

I made sure that everything suggested by Chosen Few was done properly

The density is quite the same, size too, my normals are facing the right direction, i'm freezing transformations and deleting history

 

Aaaand it's still not working :o

 

I have uploaded my file in dropbox if any of you would like to look at it and see what's wrong and explain to me that'd be awesome (keep in mind i'm a total noob in Maya, i still have problem with camming around haha)

 

Here is the link of the file: https://www.dropbox.com/s/33v0zfw68893f0p/BooleanIssue.mb

 

Thank you!

Link to comment
Share on other sites

Here's a link to an alternative to the Boonlean method.

https://sites.google.com/site/adamvanner/scripts-and-tools/marvellous-designer-quad-mesh-in-maya

There's even a plug-in to do it all automatically if you are using a newer version of Maya.

Unfortunately my version is way too old so I can't use the plug-in though I did get good ideas and tips from the webpage.

Just please don't use so many vertices as the mesh in the photos.  The mesh in the photos would cause way too much lag.

I hope that helps. :)
Cathy

Link to comment
Share on other sites

Hi :) Thanks for your help

 

I'm trying to run these scripts (Maya noob)

I found this tutorial right here: http://cgartistry.com/running-python-scripts-in-maya/

 

Following it, i have put the scripts in the script folder and use the script editor typing:

import avMergeMeshEdges
import getUVShells
import mdSetupMesh
mdSetupMesh.(mdSetupMesh)

 

When doing that the history returns:

# Error: line 1: invalid syntax #

 

What would i do wrong?

 

on another note, my mesh is almost as high poly as those displayed but its so i have more control at the end and remove edgeloops that are affecting more or less certain area, the final is going to be much lower hehe and also i'm going to use this high poly version to bake normal maps for the lower poly

Link to comment
Share on other sites

Ok i figured out the problems with the scripts loading

I was putting the scripts in the wrong path and had the loading line wrote wrong

 

Now the scripts seem to work until theres a bug

I'm not sure if any of you know python but it seem that the objects to delete is not defined

it create 2 of the 4 "islands" properly with quads and seem to bug when its time to delete the non-quad copies of them

 

The message is:

Error: line 1: TypeError: file C:\Program Files\Autodesk\Maya2013\Python\DLLs\mdSetupMesh.py line 92: Object [] is invalid #

The line 92 is:

cmds.delete(toDel)

 

in the MakePlanarMesh function:

 

#makePlanarMesh(cmds.ls(sl=True)[0],100)    def makePlanarMesh(mesh, subdivs):    cMesh = cmds.duplicate(mesh)[0]    nf = cmds.polyEvaluate(cMesh,f=True)    cmds.polyExtrudeFacet('%s.f[0:%d]' % (cMesh,nf),ltz=0.2,kft=True)    cmds.delete(cMesh,ch=True)    pPlane = cmds.polyCube(w=1,h=1,d=0.05,sx=subdivs,sy=subdivs,sz=0,ch=0)[0]    cmds.move(0.5,0.5,0.1,pPlane)            bMesh = cmds.polyBoolOp(cMesh,pPlane, op=3, ch=1, useThresholds=0, preserveColor=0)[0]        cmds.delete(bMesh,ch=True)    nf = cmds.polyEvaluate(bMesh,f=True)    nv = cmds.polyEvaluate(bMesh,v=True)    # shift back to z plane    cmds.polyMoveVertex( '%s.vtx[0:%d]' % (bMesh,nv), tz=-0.075 )        toDel = []    for f in range(0,nf):        face = '%s.f[%d]' % (bMesh,f)        pos = cmds.xform(face,q=True,ws=True,t=True)        z = 0        for i in range(0,len(pos),3):            z += pos[i+2]                if abs(z) > 0.01:            toDel.append(face)    cmds.delete(toDel)    return cMesh

 

 

I have made a video of all the steps and you can see it interupt right there:

 

Is there some Python genius? hehe

Link to comment
Share on other sites

Looks like the script was almost done.

It has the blendshapes for the flat mesh it made from the UVs.
All you would have to do is "Create Wrap" to all the new quad pattern meshes and then click on MD 
meshes from the UVs they will under INPUTS have labels named blendshape1, blendshape2, 3 and 4. Just set those from 0 to 1 and your flat quads will 
wrap themselves around your mesh pants.

Or

You could pickup where the boonlean stopped you now that you have the quads.

Please let us know how it all works out.
Cathy :)

Link to comment
Share on other sites

Hiya

This mod is not working :( creates 2 errors and 1 warning now:

 

# Error: line 1: Cannot perform boolean operation #
# Warning: Can't perform polyMoveVertex3 on selection #
# Error: line 1: TypeError: file C:\Program Files\Autodesk\Maya2013\Python\DLLs\mdSetupMesh.py line 92: Object [] is invalid #

 

and unfortunately i can't take it from there either because if you noticed in the video, this error happen when only 2 of the 4 islands are transformed to quads. unless theres something i don't understand and the 2 others are hidding somewhere i can't finish it hehe

 

I think i'll give up on this method hehe i still have a few options to retopo those pants, not the bests but considering that i've been stuck 2 days exploring this one, they kinda become hehe

 

Thanks for your time and help :)

 

and if anybody can still make it work that'd be awesome

for the futur projects, and for the fact that ALOT of people seem to have this boolean issue and that if those scripts would be working fully, that'd be amazing

Link to comment
Share on other sites

OK so it looks like the problem isn't in the python script but that the boonlean is failing causing the error in the script.

Try it with a different mesh from Marvelous Designer.

Oh and be sure to undo any changes you made in the python script.

Since my version of Maya is too old for the python plug-ins what I do is instead of using boonleans I just use the flatten UV Island Meshes and use Create Polygon Tool and Snap To Point to create the quads.

I first use the Create Polygon Tool by clicking around border edges of the flat UV island mesh and then use the Split Polygon Tool to cut it up into quads.  I use the Split Polygon Tool to split between horizontal vertices of the borders.  Then I do a vertical split down the middle from top to bottom connecting at the 50% between the two ends of the horizontal edges.  Then I use Add Divisions to automatically create smaller quads.  What this does is give really nice edge flow which the Boonlean method does not.  Plus you end up needing a whole lot less vertices which reduces cost and lag.

You only really have to do 2 of the 4 UV mesh islands this way because you can duplicate two and mirror them to get all four.  Then you create the blendshapes between the mesh UV islands and your 3D mesh pants.  THen you take your mesh you made with the Create Polygon Tool and the UV island mesh and use Create Wrap on each of them.  Then you click on each of the UV island mesh and set the blendshapes to 1.  The UV islands will change shape into the 3D mesh pants shape and since the mesh you create with the Create Polygon Tool are now connected to them they will also change shape into the 3D mesh pants.

Then just duplicate the mesh you made with the Create Polygon Tool so they keep their 3D pant mesh shape.  You can then set the blendshapes back to 0 and then Add Divisions to your mesh you made with the Create Polygon Tool and set the blendshapes back to 1 and duplicate those.

Now you have two pairs of mesh pants with quads.  One low poly count and one high poly count.  Use the high poly count to generate Normals you can then apply to the low poly count which you upload to SL.

I know it sounds like a lot of work but believe me you get so much more control and create higher quality less lag producing mesh.  If you need to add more vertices around a particular area like the knees you can really easy.  Part of the problem with using the boonlean is that in order to get enough vertices in the few areas that need them more you have to use the same density of vertices over the entire mesh.

On last thing.  When you export out of Marvelous Designer be sure to have the export set to export the mesh as separate objects not one object.  This will save you a lot of time.  If you exported the pants your of MD as one object try exporting it as one OBJ but with the setting for separate objects and try the python plug-in again.

Hope that help you or someone sometime. :)
Cathy

Link to comment
Share on other sites

  • 2 months later...

Hello to all you, people!

Excuse me for interrupting your talk, I'm a newbie here, I found your forum through Google and hope you can help me by advice. Simply I am working too with Marvelous Designer and have exactly the same problem with MD meshes and Adam Vanner's scripts from https://sites.google.com/site/adamvanner/scripts-and-tools/marvellous-designer-quad-mesh-in-maya. Though I don't make clothes for Second Life, but I plan to make it for Poser and DAZ and met with with the same problem of retopology. I found MD is a great tool, nearly like a real sewing machine, but the meshes it generates is a little suitable for conforming clothes in Poser and don't suit for further modeling in the traditional vertex modeling software.  For example, chaotic triangles don't let me extrude parts of the mesh, cut it  and do many other things I want to do with a mesh. So I was looking for any way to do accurate and precise retopology and found nothing better than Maya and these scripts from Adam Vanner's site. So I had to install Maya and attempt to learn it, but as a complete noob, I have the same problems with running scripts - they don't work on my meshes at all. I try to run them in Maya 2013 - select the mesh, load uvShells at first, and nothing happens, then load mdSetupMesh and after this the program begins to update some plugins (such a message) -

Updating pymel with pre-loaded plugins: Fur, DirectConnect, studioImport, ikSpringSolver, rotateHelper, MayaMuscle, fbxmaya, ik2Bsolver, objExport #

The script itself doesn't work. As I see here, there is some errors in it, so where are they and how to fix it? You said there was a plugin instead of scripts - where can I download it and does it work in Maya 2013? How to run these scripts properly to make them work? It seems, your thread is an only thread, whose visitors have dealt with MD and Vanner-s scripts, cause in no other place I found an answer. Before I tried to use manual method in older version of Maya (2008), but it works too bad here, meshes disappear too often after boolean and even in a successful case they came out unwelded and I had to weld vertices manually, it's a headache. Can the last script can really weld borders?

In short, I ask your advice, how to use and run these scripts in Maya 2013 (I don't know if they are written for this version at all). I iinstalled Maya 2013 (trial), cause I've read it has a built-in Python and doesn't need an external PyMel package. Is it really so and I'm doing something wrong, when running scripts from Script Editor or I miss any important thing, or I'm mistaken and need to install Python on my PC and PyMel in Maya 2013 manually? For me as a noob the last it's hard task, cause I tried to do it with older 2008, and was completely lost in a heap of existing Pymel and Pythons' versions and complicated installation documenation from Autodesk too.If I need to it with 2013, couldn't someone of experienced people here explain me how to do it clearly, which version of pymel I need and how to connect it with Maya and Python? I found out it's a bit hard to task to get this answer from people in the web, as if nobody knows it all.

P.S If there really is an automatic plug-in, how to use it? Thanks in advance for answer, cause I rummage Web sites and forums for long and cannot find it yet.

 

 

 

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3675 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...