[Maya] Painting Skin Weights for Overlapping Meshes

Hi,

I have a character wearing a hood. The hood is in the same mesh with the character (i.e. combined as opposed to separated).

I’m having a problem with painting the back of the head/neck. So I tried hiding the hood.
I can see the back but I can’t really paint at it because even though the hood is hidden Maya still recognizes it as existing in view.

I could separate the hood and the character but combining them back again will be a problem because it will ruin the vertex order. Is this assessment correct?

Is there a way around this (i.e. a setting to force Maya to recognize hidden components has hidden objects)?

Thank you for looking at my problem.

Hmm… You could potentially:

  1. Separate the body from the cloth - you’d have to deal with the seam though. But skinning these individually then polyCombineSkin and deleting the non-deformer history. This way you could copy the skin weights back to a single mesh.

  2. Isolate the neck geo and weight it.

-c

1 Like

Hi @chalk Thanks for the response

RE: polyCombineSkin
Where do I find polyCombineSkin?
I tried google and the documentation but I couldn’t find any.

If you are referring to a mere mesh merge/polyunite. It doesn’t necessarily work for copy skin weights. For instance, if you merge object A (skinCluster 1) and object B (skinCluster 2).

The result would be object C but with skinCluster1 and skinCluster2 and not skinCluster3.

In order to copy skin weights, you need a combine a skinCluster otherwise youd only get half of skin to be copied over.

RE: Isolate the neck geo and weight it.
That’s my current workflow (hiding/isolating). Problem again is the weight brush still recognize the objects even if hidden/unisolated, so I can’t paint properly.

I would not separate and combine my geometry. That is potentially not production-friendly if you start changing vertex orders. If it is a personal project that is less important. If it is client or studio work and you are working with other departments, this is not really an option.

Instead, you can duplicate your geometry and separate that and work on that. Skin those parts separately. Then you can just delete it when you are done.

Then, this is how I copy weights to partial parts of a mesh:

  1. Use ngSkinTools + masking. Copy the weights over and then mask out the areas.

  2. Use Python. Here I’ll use PyMEL.
    import pymel.core as pm

  • Let’s say you are trying to copy the separate hood back to your full geo, only on the hood area.

  • Select the separate hood, and run this Python:
    source = pm.selected()

  • Select the vertices of just the hood area, and run this Python:
    target = pm.selected()

  • Next, run this Python line, and it will copy the weights to the two variables you just stored, and it doesn’t matter what you have selected.
    pm.copySkinWeights(source, target, noMirror=True, surfaceAssociation='closestPoint', ia=['oneToOne','name'])

The other benefit of doing it this way, is that on your separate hood geo, if it is double sided, you can delete one of the double-sides and paint just the one side. Then when you copy it back to the double-sided hood, it will be quite clean.

1 Like

Hey @bentraje,

Little typo on my part - should be polyUniteSkinned:

http://help.autodesk.com/cloudhelp/2017/ENU/Maya-Tech-Docs/CommandsPython/polyUnite.html

@clesage Sorry to confuse - In stating a single mesh I was hoping to assume, that it was the original and @bentraje would be duplicating parts of it, working on them, then combining them back with polyUniteSkinned and copying this duplicated-part-combined-weighted-mesh weights back to the original mesh.

100% agree - It’s the upmost importance that if this is a production model, you don’t break it, always duplicate parts and work with them if need be. Issues with the topology etc should be brought up with the modelers/modeling lead etc.

2 Likes

@clesage
Thanks for the detailed steps.

I used the second step.
It works as expected.

@chalk

That command is new to me. I’m sure it will come handy on future projects.

Thanks!