# Bake Mesh

<div align="left"><figure><img src="https://2202237093-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FililYtTOKJkeJpzbCa02%2Fuploads%2FXsJiyaPCq9TIdrwUpfBj%2Fimage.png?alt=media&#x26;token=d223c6a4-8cec-4dbf-a9ea-8fef0210a18d" alt=""><figcaption></figcaption></figure></div>

```
/**
 * Node that bakes mesh changes back to a skeletal mesh asset.
 * 
 * Saves modifications to the skeletal mesh, including skeleton,
 * mesh data, DNA, and morph targets.
 * 
 * Usage:
 * 1. Connect modified mesh and target skeletal mesh
 * 2. Configure bake options
 * 3. Click Apply to save changes
 */
```

| Parameter                                             | Description                                                                                                                                           |
| ----------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p>MeshAsset</p><p><code>mesh</code></p>              | Reference to the mesh asset (skeletal or static) to be baked.                                                                                         |
| <p>LODIndex</p><p><code>integer</code></p>            | Selected LOD Index. Must be valid.                                                                                                                    |
| <p>bBakeReferenceSkeleton</p><p><code>bool</code></p> | If true, bakes the reference skeleton data.                                                                                                           |
| <p>bBakeSkeletonAsset</p><p><code>bool</code></p>     | If true, bakes changes to the skeleton asset.                                                                                                         |
| <p>bBakeMeshData</p><p><code>bool</code></p>          | Whether to bake Mesh Data                                                                                                                             |
| <p>bBakeDNAAsset</p><p><code>bool</code></p>          | If true, bakes changes to the DNA asset if available.                                                                                                 |
| <p>bBakeGroomAssets</p><p><code>bool</code></p>       | If true, bakes associated groom assets (strands, cards, meshes). Experimental.                                                                        |
| <p>bRemoveScaling</p><p><code>bool</code></p>         | Enabling this removes the scaling but preserves translation and rotation. Scale will always be (1,1,1)                                                |
| <p>bReapplyMorphTargets</p><p><code>bool</code></p>   | If true, reapplies morph targets after baking.                                                                                                        |
| <p>ProjectionQuality</p><p><code>integer</code></p>   | Subdivision of the mesh we're projection on. For this mesh we're using opensubdiv. Don't abuse this value, usually 2-3 steps is enough in most cases. |
| <p>NormalThreshold</p><p><code>float</code></p>       | Threshold for normal comparison during Morph Target conversion.                                                                                       |
| <p>bSkipMaterialMatching</p><p><code>bool</code></p>  | If true, skips material matching during Morph Target conversion.                                                                                      |
