Jump to content

How-to for mirroring asymmetrical meshes?


Recommended Posts

Posted

I just want to take a mesh which is right- or left-handed and mirror it (to make it symmetrical, so ending up with two meshes).

 

I know the mirror function does this superficially - the mesh is visibly mirrored but the weights are still tied to the same bones. For the new mirrored mesh, you still need to delete the old bones, add the counterpart bones on the other side, and remap the weights to those matching counterparts, - but how? How do you copy the weights and transfer them?

Genuinely surprised I couldn't find any video tutorial for something which seems like it would come up often. I found this LL thread from last year, but honestly couldn't parse the instructions (I DUM).

When I try to do things like set a reference mesh I can't find where to paste that information on the new bones, and I'm not even sure I'm copying the information at all anyway. I see a message telling me that the mesh will look for the nearest nodes (with the option to resize) when I'm copying reference weights. I've used that function before when importing .obj files and weight-painting them from scratch, but obviously I'm trying to skip that for something which should both be more precise and a lot easier.

Posted
On 3/29/2022 at 2:24 AM, SmedleyDButler said:

I just want to take a mesh which is right- or left-handed and mirror it (to make it symmetrical, so ending up with two meshes).

 

I know the mirror function does this superficially - the mesh is visibly mirrored but the weights are still tied to the same bones. For the new mirrored mesh, you still need to delete the old bones, add the counterpart bones on the other side, and remap the weights to those matching counterparts, - but how? How do you copy the weights and transfer them?

Genuinely surprised I couldn't find any video tutorial for something which seems like it would come up often. I found this LL thread from last year, but honestly couldn't parse the instructions (I DUM).

When I try to do things like set a reference mesh I can't find where to paste that information on the new bones, and I'm not even sure I'm copying the information at all anyway. I see a message telling me that the mesh will look for the nearest nodes (with the option to resize) when I'm copying reference weights. I've used that function before when importing .obj files and weight-painting them from scratch, but obviously I'm trying to skip that for something which should both be more precise and a lot easier.

 

Can you upload some screenshots so we know what kind of mesh it is and what problems are occurring and where?

Posted
23 hours ago, Andy14 said:

Can you upload some screenshots so we know what kind of mesh it is and what problems are occurring and where?

 

For sure.

 

I'm not going to dump everything at once since it felt like I had too many things going wrong, but here's a few to get started until I start running into the first stages of trouble. 

 

Spoiler


#1. Here's the armour set, (male 1 weight version, obv). You can see the right-hand pauldron is my source mesh here.

 

SfLWtRc.jpg

 

#2. I've already made a mirrored copy for the left, but it still has right-side weighting & bones. Okay, so we're gonna try and fix this.

 

zSab40v.jpg

 

#3. I make a duplicate of the original right-side mesh and convert it to a reference shape so that I'm not working directly with the right-side pauldron, which doesn't need to be edited. I notice this error if I right-click on the NAME of the mesh in the top-right parts list window, but if I click on the visibility ICON with another mesh selected, the dropdown will show and I can then copy bone weights from the reference while a different mesh is selected.  

 

lnMKs1Z.jpg

 

#4. To simplify this, let's strip away the rest of the armour set.

 

Here I have the left pauldron selected and I am manually adding the matching bones for the left side so I can paste the weights over.

 

1FvQ6GD.jpg

 

#5. First major problem is that the bones get added to the project AS A WHOLE - i.e. all other meshes get them! Which Is okay? I think? But I'm not sure. Already I'm wondering if I've fucked up.

 

Here you can see I tried masking the right hand pauldron to see if that would prevent the bones being added to that mesh (it didn't but I wasn't really surprised, just wanted to see if that worked).

 

ZGw6N0M.jpg

 

Posted

I went a little further after that and I think I actually figured it out, but I'm not 100% sure?

 

I went back to my original file, because for some reason when I saved the new pauldrons-only mesh it didn't have the addition of the left-handed bones (??? because they were still unweighted when I saved, I guess?). The original armour set has the full skeleton, so I figured that might just be easier.

 

I was able to get a weight for one bone to transfer from a reference shape if followed this exact process.

 

- Copy weights from reference shape

- Make sure recipient shape is selected, then go into bones sub menu

- Select a bone with the "X-Mirror Bone" dropdown.

- Go back to the mesh tab and transfer weights.

 

cTBDuQh.jpg

 

I copied a couple more bone weights over this way with the same results (but then OS crashed, lol. Pretty sure that's just my potato though, and not an error with OS or the meshes).

 

If this is correct, do I simply need to repeat this for every bone I wish to copy over? Am I making this more difficult? i.e. Is there a way to do multiple bones at once? Am I missing anything?

Posted
36 minutes ago, SmedleyDButler said:

 

For sure.

 

I'm not going to dump everything at once since it felt like I had too many things going wrong, but here's a few to get started until I start running into the first stages of trouble. 

 

  Hide contents

 

 

#1. Here's the armour set, (male 1 weight version, obv). You can see the right-hand pauldron is my source mesh here.

 

 

SfLWtRc.jpg

 

#2. I've already made a mirrored copy for the left, but it still has right-side weighting & bones. Okay, so we're gonna try and fix this.

 

zSab40v.jpg

 

#3. I make a duplicate of the original right-side mesh and convert it to a reference shape so that I'm not working directly with the right-side pauldron, which doesn't need to be edited. I notice this error if I right-click on the NAME of the mesh in the top-right parts list window, but if I click on the visibility ICON with another mesh selected, the dropdown will show and I can then copy bone weights from the reference while a different mesh is selected.  

 

lnMKs1Z.jpg

 

#4. To simplify this, let's strip away the rest of the armour set.

 

Here I have the left pauldron selected and I am manually adding the matching bones for the left side so I can paste the weights over.

 

1FvQ6GD.jpg

 

#5. First major problem is that the bones get added to the project AS A WHOLE - i.e. all other meshes get them! Which Is okay? I think? But I'm not sure. Already I'm wondering if I've fucked up.

 

Here you can see I tried masking the right hand pauldron to see if that would prevent the bones being added to that mesh (it didn't but I wasn't really surprised, just wanted to see if that worked).

 

ZGw6N0M.jpg

 

None of the pictures can be seen.

 

My advice:


- Duplicate the mesh.
- X-Mirror on Duplicate
- Reshape the duplicate with brushes, delete vertices etc. - if necessary
- Export the duplicate as Obj
- then delete the duplicate from OS
- import the previously exported obj

With this you should be able to copy bone weights and transfer the sliders as normal. The prerequisite is that the body mesh is loaded as a reference in the project.

Posted
5 minutes ago, Andy14 said:

None of the pictures can be seen.

 

My advice:


- Duplicate the mesh.
- X-Mirror on Duplicate
- Reshape the duplicate with brushes, delete vertices etc. - if necessary
- Export the duplicate as Obj
- then delete the duplicate from OS
- import the previously exported obj

With this you should be able to copy bone weights and transfer the sliders as normal. The prerequisite is that the body mesh is loaded as a reference in the project.

 

Ugh, LL's been giving me embed errors lately,. but I thought the pictures were showing up at least.

 

Here's the imgur page. https://imgur.com/a/1MOgvys

 

Luckily I don't need to transfer sliders for this since it's just a male mesh and I don't bother building those in BS.

 

One question though: If I re-import the .obj, when I transfer the weights, won't they transfer to the original bones? i.e. I'll be stuck with the same problem I started with in that I'll have a left-side mesh with the right-side weights & bones of the original?

Posted
25 minutes ago, SmedleyDButler said:

 

Ugh, LL's been giving me embed errors lately,. but I thought the pictures were showing up at least.

 

Here's the imgur page. https://imgur.com/a/1MOgvys

 

Luckily I don't need to transfer sliders for this since it's just a male mesh and I don't bother building those in BS.

 

One question though: If I re-import the .obj, when I transfer the weights, won't they transfer to the original bones? i.e. I'll be stuck with the same problem I started with in that I'll have a left-side mesh with the right-side weights & bones of the original?

You must use either full armor or bodymesh as a reference to copy bone weights. You cannot copy bone weight from the right pauldron to the left pauldron

Posted
48 minutes ago, Andy14 said:

You must use either full armor or bodymesh as a reference to copy bone weights. You cannot copy bone weight from the right pauldron to the left pauldron

 

How do I copy the weight painting from the right pauldron to the left pauldron then?

Posted
26 minutes ago, SmedleyDButler said:

 

How do I copy the weight painting from the right pauldron to the left pauldron then?


Not at all, because the right bones are not the left bones. ;)

- New project
- Import the Armor (not the Pauldrons)
- The Armor Mesh -> Set Reference
- Import the Pauldrons from Obj
- Select the Pauldrons (both if you have 2) -> Copy Bone Weights

PS: If you tell me what the result should actually be (I assume left and right pauldron as separate armor), then you can also upload the nif and I'll take a look.

Posted
10 hours ago, Andy14 said:


Not at all, because the right bones are not the left bones. ;)

- New project
- Import the Armor (not the Pauldrons)
- The Armor Mesh -> Set Reference
- Import the Pauldrons from Obj
- Select the Pauldrons (both if you have 2) -> Copy Bone Weights

PS: If you tell me what the result should actually be (I assume left and right pauldron as separate armor), then you can also upload the nif and I'll take a look.

 

Well, that's the thing - the desired result is to flip a right-sided mesh to a left-side mesh without repainting the weights from scratch for the new/flipped mesh. I have a number of meshes I need to do this to as well, but this is the first one I started working with.

 

Pauldron Right Side.nif

Posted
1 hour ago, Andy14 said:

 

The right (original) pauldron is unchanged....
pauldrons.nif

 

Okay! So we're on the same page here; that's the result I need (and I need to do this for more than a few other meshes).

 

So can you walk me through the steps you took to do this? Or maybe a couple labelled screenshots would be better?

 

Is this still correct?

Quote

- Import the Armor (not the Pauldrons)
- The Armor Mesh -> Set Reference
- Import the Pauldrons from Obj
- Select the Pauldrons (both if you have 2) -> Copy Bone Weights

 

Because if so, I'm trying to figure out at what point the weights are actually changed from right to left.

 

I think I understand that you don't need to add the bones, you just need them to be in the project's skeleton already.

 

Posted
37 minutes ago, SmedleyDButler said:

 

Because if so, I'm trying to figure out at what point the weights are actually changed from right to left.

Such a thing is not possible in OS.

If a mesh is mirrored, the old bone weights must be deleted (see the workflow above via Obj) and the new bones added with Copy Bone Weights.

 

Alternative to the Obj workflow:

After duplicating and X-Mirroring, select the mesh, switch to the Bones tab and choose All Bones -> Delete from Selected Shape.
After that switch to Meshes Tab and Copy Bone Weights.

A mesh must first be imported from which the bones are to be copied. I imported the malebody_1 nif and set it as a reference.


This is how I created the Pauldron nif.

With bone correction in posing mode, it only took about 5 minutes.

 

Then the two meshes selected -> Export as Nif. Open the nif in Nifskope -> Spells -> Optimize -> Remove Bogus Nodes to remove unnecessary nodes (e.g. bones).

Then Spells -> Optimize -> Remove Unused Strings.

 

That's all. It doesn't matter how the mesh was created, whether as a mirrored duplicate, as an imported obj - it doesn't matter - it's always the same procedure how a mesh is skinned in OS. Bones are not mirrored in OS in the way of L-Bone and R-Bone..

 

PS: So the first step should be. Import the malebody_1.nif and set it as a reference. Bone weights can only be copied from the reference to the selected mesh. Source -> Target system - not on itself.

Posted
8 hours ago, Andy14 said:

Such a thing is not possible in OS.

If a mesh is mirrored, the old bone weights must be deleted (see the workflow above via Obj) and the new bones added with Copy Bone Weights.

 

Alternative to the Obj workflow:

After duplicating and X-Mirroring, select the mesh, switch to the Bones tab and choose All Bones -> Delete from Selected Shape.
After that switch to Meshes Tab and Copy Bone Weights.

A mesh must first be imported from which the bones are to be copied. I imported the malebody_1 nif and set it as a reference.


This is how I created the Pauldron nif.

With bone correction in posing mode, it only took about 5 minutes.

 

Then the two meshes selected -> Export as Nif. Open the nif in Nifskope -> Spells -> Optimize -> Remove Bogus Nodes to remove unnecessary nodes (e.g. bones).

Then Spells -> Optimize -> Remove Unused Strings.

 

That's all. It doesn't matter how the mesh was created, whether as a mirrored duplicate, as an imported obj - it doesn't matter - it's always the same procedure how a mesh is skinned in OS. Bones are not mirrored in OS in the way of L-Bone and R-Bone..

 

PS: So the first step should be. Import the malebody_1.nif and set it as a reference. Bone weights can only be copied from the reference to the selected mesh. Source -> Target system - not on itself.

 

I've definitely done both mirror and import as .obj, so that's good, I fully get that part. Also the optimization cleanup at the end, I'm pretty familiar with all that too.

 

There were a couple snags I ran into:

 

1) When copying bone weights from the reference shape, it didn't duplicate all the bones the original pauldron had. I guess I could manually add them? Or should I be changing the settings when copying the weights over? You didn't mention anything, so I used the usual 5/4 default settings.

2) The weight painting of the new pauldron doesn't match the original pauldron (since it's using the body mesh as a reference, of course).

 

Now, with #2 I think this is where you mean to mean to use bone correction in posing mode to get the weight painting for the new pauldron done? The thing is, that's one tool I have little experience with. I'm not even sure if you mean only the bottom pane, the one you open by clicking "posing", (blue box), or both the panes below the mesh/bones/etc. pane (blue & green boxes). Weirdly the OS wiki on Github doesn't give specific names for each of those panes/panels, at least no where I've noticed. Would you be able to expand on this bit?

 

 

 

OS_righthandpanes.jpg

Posted
24 minutes ago, SmedleyDButler said:

 

I've definitely done both mirror and import as .obj, so that's good, I fully get that part. Also the optimization cleanup at the end, I'm pretty familiar with all that too.

 

There were a couple snags I ran into:

 

1) When copying bone weights from the reference shape, it didn't duplicate all the bones the original pauldron had. I guess I could manually add them? Or should I be changing the settings when copying the weights over? You didn't mention anything, so I used the usual 5/4 default settings.

2) The weight painting of the new pauldron doesn't match the original pauldron (since it's using the body mesh as a reference, of course).

 

Now, with #2 I think this is where you mean to mean to use bone correction in posing mode to get the weight painting for the new pauldron done? The thing is, that's one tool I have little experience with. I'm not even sure if you mean only the bottom pane, the one you open by clicking "posing", (blue box), or both the panes below the mesh/bones/etc. pane (blue & green boxes). Weirdly the OS wiki on Github doesn't give specific names for each of those panes/panels, at least no where I've noticed. Would you be able to expand on this bit?

 

 

 

OS_righthandpanes.jpg

 

When I'm at the PC, I'll take screenshots of each step.


One thing in advance: Fixed Weight Brush is there to skin the vertices with a constant value (the value of the brush) e.g. 0.07. This is not required in this case.

 

The left pauldron of ourse has different bones than the right pauldron. NPC L UpperArm instead of NPC R UpperArm etc.

The right pauldron (the original one) even has a bad skin because the mesh was skinned from the forearm. But that's not correct and that's why it's missing in the nif I've posted.

Posted

Interesting! The pauldrons started as Team TAL Mordhau ports and I'm used to their having very high-quality work. Thanks in advance for taking the time to do up the screenshots (it does help... I'm so much more a visual fella).

Posted
1 hour ago, SmedleyDButler said:

Interesting! The pauldrons started as Team TAL Mordhau ports and I'm used to their having very high-quality work. Thanks in advance for taking the time to do up the screenshots (it does help... I'm so much more a visual fella).


Step 1: Import a Mesh/Nif as Reference. I use the body nif and set the mesh as reference.

 

Spoiler


1-Import_Refrence_Step_1.png.1c7002a562d8d4ad7c05c31a59eaed69.png

1-Import_Refrence_Step_2.png.7e408cbd8ac3c6eaf318d70638a764c1.png

 


 

Step 2: Import of your Pauldron. I press T to hide textures and W to show the wireframe. This makes it easier to work.

 

Spoiler


2-Import_Pauldron_Step_2.png.8ac2f686d101fa8ea1c98923e91340ff.png


 

 

Step3: Duplicate the pauldron

 

Spoiler


3-Duplicate_Mesh_Step_1.png.c4e36177bfc0e65c76ce82d71dc42125.png


 

Step 3.1: Mirroring the duplicate

 

Spoiler


3-Duplicate_Mesh_Step_2.png.22dd4d5d64908d73a79a280b7afa480d.png

 


 

 

Step 3.2: Show you that the mesh is mirrored with all information, including the original bones. ;)

VERY IMPORTANT - All work with bones is done with selected new pauldron (Meshes tab)

 

Spoiler


3-Duplicate_Mesh_Step_3.png.903d56f6792738aad054a1e6993454eb.png

 

Bones are not mirrored - here you can see - it is missing

3-Duplicate_Mesh_Step_3-1.png.ede1841f81606d8d7b7400bb3e7c4470.png

 

 

 

 

 

 

Step 4: We remove the bones from the left pauldron. Actually we just remove the skin.

Spoiler


Here the bones are selected individually

4-Skin_Duplicate_Step_1.png.ab933a398c60371539e1367090598a51.png

 

Alternatively, we can also select all bones, since we want the mesh to be clean

4-Skin_Duplicate_Step_1-1.png.4b1e6d01ed11c9974cb3ff7dc9cf7c15.png

 

 

Quick check - the mesh is clean

4-Skin_Duplicate_Step_1-2.png.6b6cd26f4bde462847847933f22d9934.png

 

 

 

Step 5: Skin the mesh with "Copy Bone Weights"

Spoiler


4-Skin_Duplicate_Step_2.png.937715ec58c31fc691858d9371c1881f.png

 

In this case, the search radius is fine.
Don't raise the 4!

4-Skin_Duplicate_Step_2-1.png.b308e560ef637da32392548e9ea39f6c.png


 

Setp 6: Now it's time to get to work - we're going to edit the skin to avoid unsightly clipping and in-game distortion.

 

Spoiler


First check - the correct bones were used

4-Skin_Duplicate_Step_3.png.50dbb23682447901268e6c0530fd3881.png

 

But when scaling it doesn't look so good anymore

4-Skin_Duplicate_Step_3-1.png.5894cd4e153b1768be56eb08f39f728e.png

 

 

So we're going to smooth the skin

 

Brief information about Bone Brush:
Bone Brush + Left Mause Button = Increase Bone weight
Bone Brush + ALT + Left Mouse Button = Decrease Bone weight
Bone Brush + SHIFT+ Left Mouse Button = Smooth Bone Weight

 

That is better

4-Skin_Duplicate_Step_3-2.png.b4043c3b5a5ce1ccc6098e4705ed374b.png


 

Step 7: Optional - use the posing function

Posing can be used to emulate animation. Particularly recommended for gloves, fingers, etc.

(Important when using Posing: Always reset the bones afterwards -> Reset All)
 

Spoiler


Here you can see nice clipping, because the mesh is not flat, but unfortunately too few vertices (polygons that are too big)

4-Skin_Duplicate_Step_3-3.png.fd753e6be686dcb7ef59c0c1ee17c205.png

 

The polygons are too big to fully fix it

4-Skin_Duplicate_Step_3-4b.png.d17bec3bf94388bbfa64d8dcee9d7087.png


 

 

And so on - here's the next bone. Before and after processing (smoothing)
 

Spoiler


4-Skin_Duplicate_Step_3-5.png.48c2fc47bf185a1b954e6ae680925d3f.png

 

4-Skin_Duplicate_Step_3-5a.png.45e7103b93a01b0910a9721fa8d2967b.png

 


 

 

And finally just export
 

Spoiler


5-Export.png.c56d49ba2751e5a8d9a5f9e002e3cc65.png


 

 

Another small note on multi-layer meshes. It can be useful to edit individual vertices with both Bone Brushes and the Sahpe Brushes. The best way to do this is to use the "Edit Connected Only" option, or Press C or use the Icon for that.
 

Spoiler


Menu or press C

4-Skin_Duplicate_Step_3-4.png.bdb25854dec971c287b60d63f9ce19aa.png

 

Or use the Icon

4-Skin_Duplicate_Step_3-4a.png.09cdcd319bb514b477ed84a22f7ab864.png


 

Posted
12 hours ago, Andy14 said:

*extremely thorough tutorial*

 

Well that's it, lock, stock, and barrel.

 

Thanks so much for the help, really, really appreciate you taking that much time to put this together.

 

Hopefully it will hang around and be useful for others as well!

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...