Maya Cleanup question?

Those of you who are familiar with Maya; after I selected “Mesh > Cleanup…” with the settings in the screenshot, my mesh had certain faces highlighted. Can anyone tell me what the problem was?

I’m having some tessellation issues and I thought it could be my mesh, so I wanted to experiment with that setting. Thanks.

Re-post your screenshot with the wireframe active (either face component mode or ‘wireframe on shaded’ viewport button). Also post a separate screenshot with smooth preview active on the mesh showing the problem area (select mesh and hit ‘3’ on keyboard, ‘1’ will remove smooth preview) - smooth preview can show a lot of geometry problems.

Also, how do you expect to know whether the problem faces are non-manifold, lamina, or zero length? Right now all you know is one of those problems are occurring and you don’t know which. 3D Art is no exception to isolation being the best problem solving method.

Without the wireframe it is not easy to tell, if it’s not a mesh overlapping your selection, you may have non-manifold geometry which is caused by a significant lack of technical knowledge and invalid modelling workflow - it’s very common for students or beginners to get result. In 7 years of using Maya I have never encountered a bug that results in non-manifold geometry slipping by me.

Non-manifold is (almost always) a very bad thing because it will cause artifacts in lighting/rendering, deformations, and simulations - it’s caused by disconnected edges/vertices, internal faces, and areas without thickness.

Thanks for the response. You’re right, I should have provided a wireframe to make it easier. I was looking for more of an overview as to what it does since I’m new to Maya. Here is the screenshot of my topology. I have no idea why those areas are problematic. I also showed the result when Maya attempts to fix the areas.

If you want to send me the mesh I can tell you what’s wrong with it, if you can’t then I can keep trying to help.

Did you turn off everything but ‘nonmanifold geometry’ to find which of those options are causing the error?

Also if you select the entire mesh and do a merge vertices (under edit mesh) with an extremely low tolerance (like 0.0010) what happens to the vertex count - reduced or the same?

As for what it does, everything under ‘remove geometry’ is self explanatory except non-manifold geometry which is why I explained it.

Still interested in seeing what a smooth preview looks like - I suspect it’d artifact due to disconnected vertices or the like.

Unfortunately I can’t share the mesh.

It only gets flagged on “faces with zero map area”.

Merge doesn’t do anything to the vertices count.

Not sure what you mean by a smooth preview.

After doing a quick google search about “faces with zero map area”, the only suggestion someone gave was to re-build that part of the mesh. Unfortunately in my situation there are quite a few areas that need to be re-edited. I’m not sure if is something I should be concerned with, or let it go…

I did a quick google to see what you’re presumably seeing - in case the google results appear to be made by people who don’t know what they’re talking about :frowning: Most are saying it is caused by polygons with vertices all in the same location - it’s not.

The map in the term ‘zero map area’ refers to the UVs. It means you have UV faces that have all the UV points surrounding it overlapping.

If the UVs haven’t been done then along the way they somehow ended up with zero map area, the solution is to simply delete or re-project the UVs until it comes time to do them. If they have been done, then whoever did them should look up some UVing tutorials :confused:

Telling maya to clean the mesh with zero map area will do little more than show you just how buggy and incomplete maya is. It will collapse the mesh to the UV area which is NEVER desirable and it’s what you’re seeing.

If is the zero map area that’s causing the, then there’s no need for a smooth preview, but for future reference is how you do it: Select mesh in object mode, press ‘3’ on the keyboard. Mesh should smooth itself. To reset do the same but hit ‘1’ instead.

Verdict: UV points are overlapping causing faces with zero map area. Delete, re-project, or fix UVs.

Even smoothing the mesh with the “3” key keeps the topology clean. It cant be a UV (see attached.) And I do all my own modeling, UVing and animating. I appreciate your help but it looks like it may remain a mystery. I don’t see any problems in U4 either.

Do you have other UV sets that may have been forgotten about? Check the ‘UV Sets’ menu in the UV Texture Editor.

Smooth Preview wont show errors for zero map area.

The fact you have selected cleanup by zero map area combined with the result when you attempt to clean up are an exact match to what occurs when you have areas with zero map area, there’s definitely something going on behind the scenes that is causing and it’s related to UVs without map area.

That said, it wont affect you in UE4, so I’m saying as a means of information since you said you wanted an overview.

I am by no means a Maya expert (mainly use max) but could the be caused by :

mayacleanup.PNG

Wouldn’t you want to use the other option to “Cleanup Matching Polygons” instead of selecting them?

Definitely not, Maya is renowned for it’s bugs and it’s fix for zero map area faces is to collapse the mesh to match the UVs. It is as ridiculous as it sounds. Selecting is always the best first option, and it’s a huge risk to allow Maya to clean your mesh for you at all with any of the settings, so if you do use it make sure to check… everything - and be ready for problems caused by it down the line regardless. Always back up before using ‘Cleanup’.

I don’t use cleanup for anything other than locating problem areas, then fix them myself.

Yeah I really didn’t think it was the, but wanted to throw it out there just in case. Max definitely has its fair share of issues but nothing like Maya from what I have heard, Autodesk has become way too complacent recently, a bug fix & general usability pass is badly needed.

Well if the zero map area is messing with the cleanup then give it some uvs to remove that from the possible issues, even if they are temporary. You will eliminate that problem and then move on to wee if there is anything else wrong.

The I’d do a merge on vertices with a really low distance threshold. Cleanup does do but I find it unreliable.

He has UVs, my only suspicion would be a second UV set having snuck in somewhere which isn’t something Maya makes very apparent. He said a low tolerance merge doesn’t change the vertex count earlier.

I doubt there’s anything actually wrong with his mesh. Not listening to Maya is a good rule of thumb in most cases :wink:

I’m also in Wellington btw, got lots of friends at Digi but not in VFX. Not a fan of those hours :slight_smile:

Thanks everyone for the tips and suggestions. My mesh is clean as well as my UVs, so I’m thinking it’s a Maya.

The main reason came about is because I was having issues assigning two materials to my character, and those materials had distanced-based tessellation using PN trangles. I keep getting these “spikes”, and I can’t sort it out. You can see my post here if you have some incite.

Thanks again!

I don’t think that’s a bug in Maya.

Since you can’t send the mesh, can you cut out a few polygons (even 5-10 of them) from the problem area, export to .obj and PM them to me? I assume that wouldn’t be an for you and I can probably find the problem.

Also what is in menu? (Using a screenshot since you aren’t familiar with Maya and saves you having to find it) I’ve asked a couple of times if you have other UV sets but haven’t got an answer so I’m emphasizing, because another existing in error could cause the problem.

Sorry. In the UV menu, I only have “map1”. Sure, I’ll send you a piece. Thanks for checking for me…

Had a look.

My mistake was assuming anything in Maya would actually work as expected. The zero map area’s fix isn’t just broken, the entire is. Ignore it, it’s wrong as long as you don’t have a very specific tolerance setting and understanding of what it thinks is actually a zero map area. If a UV is too small it’ll conclude ‘zero map area’ whether it has zero area or not. It should take your model’s scale into consideration and so forth, but it doesn’t - all it is, is " far from the other UV’s? BROKEN!" - I couldn’t tell from your screenshot that they were very small UVs.

As far as thread goes, I guess we can say that’s concluded by chucking another thing in the towering bucket that is Maya’s list of failures and shortcomings :wink:

Your mesh and UVs are fine.

So, the other thread. I took the mesh you sent me, and gave it a skeleton with quick binding, put a material with gradient texture on it, then grabbed some faces and assigned a different shader, so it had two and was skinned to a skeleton - no other modifications. Then I imported to UE4 and changed both the materials to 'PN Triangles".

No errors or oddities occurred at any point. I am using UE version 4.5.0-0. If yours is earlier perhaps there could have been a bug present.

Only thing that comes to mind is your skeleton, have a look at the joint rotations and make sure in a TPose all joint rotations are at 0,0,0. Flipped joints in particular (such as -360, 360, 180, -180 rotations, or near) can cause significant rendering issues. These rotations do occur for riggers who aren’t very experienced :slight_smile:

Well Im glad to hear it wasn’t an with my mesh and/or UV’s!

I’m running 4.5.1 and I can’t get around that. I’m not new to rigging either. I’ve tried it with Max 2015 using CAT, I’ve tried it with bones created in Maya, and I have also tried it using Epic’s ART tool. I even re-built my character and tested it, still the problem happens. If I send you my re-built character, can you take a look at my setup? I’m running Maya 2015 so if you have the same I can send you the native file or the FBX. I appreciate your help because has been driving me crazy for months!!

I don’t mind taking a look. If you set up a project in UE4 with it occurring, and the fbx file that was imported for the skeleton/mesh etc and zip/send them that should be fine.

Yeah, the rig causing it was a shot in the dark - I’ve seen it happen but not often. At point I have no clue what it is, but I have a lot of experience with poking things until it reacts.

With the amount of issues that can arise from data stored in meshes I decided to write a script. Usually exporting as .obj can solve a lot of things but sometimes it’s easier to resort to rebuilding a mesh by hand especially if you don’t know the problem.

script does exactly that for you in a few seconds (depending on poly count and your processor), and it lets you keep your UVs, normals, and even skin/weights. It is a good way to isolate components as well such as geometry, UVs, normals, and rig.

I wrote it very quickly, I will probably do it properly later but for now with an interface, error checking, and hopefully better efficiency.

If you (after saving a copy…) select your object and run it, it will rebuild your mesh using only the vertex positions.

Note:
It is a draft and there is no error checking, so if you get an error then it was given incorrect information

To use:

  • Backup your scene, make a copy, don’t work in your originals
  • Copy/Paste the script below into your script editor (accessible via the button in the very bottom-right corner of the Maya interface)
  • By default, after rebuilding your mesh, it will copy over your UV’s, normals, and skin/weights. If you don’t want any of these change from ‘True’ to ‘False’ and note the capitalization of the first letter (it will error if you use ‘false’ instead of ‘False’) and don’t use quotation marks
  • If your mesh does not have a skin attached you must disable “transferBindAndWeight” by setting it from True to False.
  • Close UV editor. It will work with it open but take a VERY long time (maybe 5x longer).
  • Select your object (must be an object, not components such as faces or vertices or the script will break)
  • Run the script (Either press numpad enter, or click the single blue arrow on the menu at the top of the script editor) - Selecting the text prior to executing will keep it in the script editor, unselected text is consumed on successful execution

A 6k poly mesh took around 10-15 seconds on my i7 @ 3.4ghz, be wary of high density meshes.

If I re-write it I’ll make a thread for it, right now it’s very much a prototype but I whipped it up to see if it’d solve your mesh’s issues.

Here is the python code:


import maya.cmds as cmds
import maya.mel as mel

'''
PolyReconstruct v0.0.1 by  Taylor
- Will rebuild a mesh using only the vertex positions,
- Can transfer the UVs and skinning from original
- You MUST specify False for transferBindAndWeight if there is no skin

- Takes around 10-15 seconds for a 6k poly mesh on my i7 processor, be wary for high density meshes

-->CLOSE UV EDITOR BEFORE RUNNING  SCRIPT - IT WILL TAKE 5x LONGER IF IT IS OPEN<--

Anything that can update during the execution of a script will update on every operation, including
the UV editor making the running time significantly longer
'''

#--------------------------------
#CHANGE ONLY THESE OPTIONS
transferUVData = True#Keep UVs from original mesh
transferNormalData = True#Keep normals from original mesh
transferBindAndWeight = True#Transfer character skin and weight - DISABLE if no skin!

#--------------------------------
#DO NOT CHANGE BELOW
obj = cmds.ls(sl = 1)[0]
cmds.select(cmds.polyListComponentConversion(obj, tf = 1))
faces = cmds.ls(sl = 1, fl = 1)

newfaces = ]

for f in faces:
    cmds.select(cmds.polyListComponentConversion(f, fromFace = 1, toVertex = 1))
    vtx = cmds.ls(sl = 1, fl = 1)
    
    vtxPos = ]
    bgnV = vtx[0]
    finV = ]
    
    match = ]
            
    cmds.select(cmds.polyListComponentConversion(vtx[0], fromVertex = 1, toEdge = 1))
    mel.eval("PolySelectConvert 3;")
    vertEdge = cmds.ls(sl = 1, fl = 1)
    vertEdge.remove(vtx[0])
    for v in vtx:
        if not v in vertEdge:
            finV = v
        else: 
            match.append(v)
            
    if len(vtx) > 3:#poly
        order = bgnV, match[0], finV, match[1]
    else:#tri
        order = bgnV, match[0], match[1]

    for o in order:
        vtxPos.append(tuple(cmds.xform(o, q = 1, t = 1, ws = 1)))

    newfaces.append(cmds.polyCreateFacet(p = vtxPos, ch = 0)[0])
    
cmds.select(newfaces, r = 1)
newMesh = cmds.polyUnite(newfaces, n = "Generated_PolyReconstruct_Geo", ch = 0)
cmds.polyMergeVertex(newMesh, d = 0.0001, am = 1, ch = 0)
cmds.polyNormal(newMesh, normalMode = 2, userNormalMode = 0, ch = 0)

if transferUVData:
    cmds.transferAttributes(obj, newMesh, transferPositions = 0, transferNormals = transferNormalData, transferUVs = 2, transferColors = 2, sampleSpace = 0, searchMethod = 3, flipUVs = 0, colorBorders = 1)
    
if transferNormalData:
    cmds.transferAttributes(obj, newMesh, transferPositions = 0, transferNormals = 1, transferUVs = 0, transferColors = 2, sampleSpace = 0, searchMethod = 3, flipUVs = 0, colorBorders = 1)
    
cmds.DeleteHistory(newMesh)

if transferBindAndWeight:
    jnts = cmds.skinCluster(obj, inf = 1, q = 1)
    mif = cmds.skinCluster(obj, mi = 1, q = 1)
    bnm = cmds.skinCluster(obj, bm = 1, q = 1)
    skm = cmds.skinCluster(obj, sm = 1, q = 1)
    nmw = cmds.skinCluster(obj, nw = 1, q = 1)
    newSkin = cmds.skinCluster(newMesh, jnts, dr = 4, mi = mif, bm = bnm, sm = skm, nw = nmw)
    cmds.copySkinWeights(obj, newMesh, noMirror = 1, surfaceAssociation = "closestPoint", influenceAssociation = "oneToOne")
    
cmds.select(newMesh, r = 1)