Skip to content

Commit

Permalink
1.1.1.0 update
Browse files Browse the repository at this point in the history
  • Loading branch information
MykytaPetrenko committed May 19, 2024
1 parent 365fdca commit 8a949c3
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 20 deletions.
Binary file added docs/images/align_minor_meshes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/transfer_basis_coordinates.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/transfer_shape_deprecated.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Transfer Shape to Minor Meshes (Outdated)
# Transfer Shape to Minor Meshes (Deprecated)

```eval_rst
.. important::
This is how to transfer changes to minor meshes in versions 1.1.**0**.X. In 1.1.**1**.X the process was changed
This is how to transfer changes to minor meshes in versions 1.1.0.X. In 1.1.1.X the process was changed
```

#### How to transfer defromation from one edit object to another (eyeshels, eyelashes etc.)
Expand Down
40 changes: 22 additions & 18 deletions docs/workflow_1_1.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Once the FBX files are imported, we can proceed to initialize auxiliary and edit
There are two parameters available:
- **Weld Distance:** Determines the distance (centimeters) at which the vertices of the meshes will be welded. The Weld Distance should be sufficient to weld all points at seams intended to be smooth, but at the same time, too large a Weld Distance value might cause other points to merge, making it impossible to apply the Surface Deform modifier, which is vital for subsequent processing. After initialization, you can preliminarily check the meshes for the most common issues that may arise during welding by clicking on the "Validate Edges" and "Validate Faces" buttons, which we will discuss a bit later in this section.

- **Keep ShapeKeys:** By default, this is turned on. You can turn it off to avoid storing shape key data for edit objects and to keep the blend file size manageable. However, in this case, you will not be able to edit corrective shape keys. Remember that the Metahuman LOD0 uses many corrective shape keys to achieve a more realistic appearance, and sometimes it's necessary to adjust some of these shape keys as well as the base mesh.
- **Keep Shape Keys for Edit Objects:** By default, this is turned on. You can turn it off to avoid storing shape key data for edit objects and to keep the blend file size manageable. However, in this case, you will not be able to edit corrective shape keys. Remember that the Metahuman LOD0 uses many corrective shape keys to achieve a more realistic appearance, and sometimes it's necessary to adjust some of these shape keys as well as the base mesh.

<a href="./images/initialized.png">
<p align="center">
Expand Down Expand Up @@ -109,31 +109,35 @@ We can recommend the following course of action:
Next, in Sculpt Mode (enable x symmetry if you need), you can work on the skin model. I prefer to start with the Grab and Elastic Deform brushes at the initial stage. I recommend starting with sculpting because only then can you properly use symmetry. In Edit Mode, symmetry does not work as expected due to the fact that Metahuman has asymmetry.
- By combining Edit Mode and Sculpt Mode, you can add more details.

Then you need to transfer changes from skin and teeth to the other objects.
```eval_rst
.. note::
Editing the mesh with a large number of shape keys may be laggy when using some sculpt brushes. You can create a "light" duplicate of the problem mesh using the "Create Light Duplicate" feature from MetaReForge.Extras. After editing, transfer the deformations back to the original "FINAL" mesh similar to 4.3. Editing in third party application *
```
[* 4.3. Editing in third party application](#43-editing-in-third-party-application)

#### 4.2. How to transfer defromation from one edit object to another (eyeshels, eyelashes etc.)
To transfer deformations, you need
1. to select the necessary item from the list (_**1**_, see figure) to which you want to transfer the deformations.
2. Next, you need to set up the transfer. You can specify the basis and final objects manually or, as shown in the figure: enter the edit_id of the mesh from which the deformations will be transferred (_**2**_, see figure) and press the arrow button (_**3**_, see figure). If everything is specified correctly, then the basis and final objects should be determined automatically.
3. By default, the surface deform modifier will be used to transfer changes (in short, the vertices of the mesh will be attached to the closest polygons of the source mesh. [Learn more](https://docs.blender.org/manual/en/latest/modeling/modifiers/deform/surface_deform.html)). In some cases, it may not work as well as desired, for example, it may warp or significantly stretch the shape of the original objects, so an option with enabling the Laplacian deform (_**4**_, see figure) has been added (in brief, this modifier keeps the anchor vertices in fixed positions and calculates the optimal locations of all the remaining vertices to preserve the original geometric details. [Learn more](https://docs.blender.org/manual/en/latest/modeling/modifiers/deform/laplacian_deform.html)). In this case, points that are closer than "Lapl. Thresh." (_**5**_, see figure) to the mesh from which the transformations are transferred will be transferred using surface deform (attached to the surface), and points that are further will be reconstructed using Laplacian deform. **For example**, when transferring deformations from the main body mesh to the eyelashes, the roots of the eyelashes will be attached to the nearest polygons on the eyelids, while the rest of the eyelash will not be directly attached to the body but will try to preserve the original shape of the eyelash as much as possible taking into account the new location of the eyelash root.
4. Click transfer (_**6**_, see figure)
5. Revise the changes after the transfer and fix minor problems.

<a href="./images/transfer_edit_shape.png">

Once the main meshes (skin, eyeballs, teeth) have been edited, you can proceed to edit the auxiliary meshes. MetaReForge offers a feature called "Align Minor Meshes" to somewhat simplify this process.

<a href="./images/align_minor_meshes.png">
<p align="center">
<img src="./images/transfer_edit_shape.png"/>
<img src="./images/align_minor_meshes.png"/>
</p>
</a>

Despite the lengthy description, the process is simpler than it seems. **The skin, teeth, and eyes are edited manually based on your artistic needs.** The deformation is transferred to the other objects. For simplicity, we have compiled the following recommendations to help you quickly get oriented:

1. **Saliva** - Transfer the deformation from "teeth" with disabled Laplacian deform.
2. **Eyeshell** - Transfer the deformation from "skin" with Laplacian Deform enabled (thresh >= 0.01).
3. **Eyelashes** - Transfer the deformation from "skin" with Laplacian Deform enabled (thresh >= 0.1).
4. **Eye Edge, Cartilage** - Transfer the deformation from "skin" with Laplacian Deform disabled.
Two configuration files are presented. Usually, the default one works well. If one or more eyelashes stray far from the main meshes, try using default_eyelashes_fix. Using these configuration files, changes identified with the skin will be transferred to objects with the next edit IDs: "eyeshell", "eyeEdge", "eyelashes", and "cartilage".The changes to "teeth" will be transferred to "saliva". Optionally, you can create custom configuration files.

#### 4.3. Editing in third party application:
If you wish to modify any part of the body in an external application, you will need to export the necessary Final Mesh and then, after editing, import it back into Blender and assign it in the 'Final' field for the corresponding body part. It's important to ensure that the vertex order remains unchanged.
If you wish to modify any part of the body in an external application, you will need to export the necessary Final Mesh and then, after editing, import it back into Blender.
Then:
- Apply transforms (ofter newly imported mesh has nonzero transforms)
- Use "Transfer Basis Coordinates" operator from MetaReForge.Extras. Select the newly imported mesh, then select original "FINAL" mesh created by MetaReForge and click the button. The operator updates only vertex coordinates of the basis shape keepeng the remaining information (like bone weights, shape key deltas unchanged)

<a href="./images/transfer_basis_coordinates.png">
<p align="center">
<img src="./images/transfer_basis_coordinates.png"/>
</p>
</a>

### 5. Editing the Armature
After achieving the desired mesh shape, it's necessary to adjust the skeleton to these changes. The Metahuman skeleton contains about a thousand bones, and editing it manually is tedious and time-consuming. Therefore, our addon includes tools to simplify this routine by transferring the deformation from the final mesh to the skeleton.
Expand Down

0 comments on commit 8a949c3

Please sign in to comment.