◀ Previous: 15. Shape Steps · 🏠 WC Tools · Next: 17. Settings, Menus and Commands ▶


These eight Mesh Optimizer steps deal with everything around the shape: its UVs and textures, how it looks from far away, and what it collides with.

You tune them like any step: tick On, open its settings, click Preview, compare, repeat. See the top of 15. Shape Steps.

UV Layout

Makes new UVs, or packs the ones a mesh has more tightly.

UVs are how a flat texture is wrapped round a mesh. Bad UVs waste texture space, blur some parts and sharpen others, or overlap so nothing can be baked.

Click UVs above the views to see the layout Before and After. Overlapping triangles are red, stretch runs blue to red, and islands with uneven texture density are yellow.

Setting What it does Default
Mode Keep = the UVs stay. Generate = new islands are cut and packed. Repack = the islands it has are packed again, with no new cuts. Keep
Channel The UV channel made or packed. 0 is the one textures use. 0
Maker (Generate) How islands are cut. Islands From Shape = along the shape's creases. Patches = many small patches merged together. Islands From Shape
Flatten Islands Again (Repack) Each island is unfolded flat again before packing, which takes stretch out without moving its seams. Off
Layout Size The texture size the layout is packed for, in pixels. 1024
Island Gap Pixels The gap between islands, so colors don't bleed into each other at a distance. 4
Rotate Islands Islands may be turned to pack tighter. On
Even Texel Density Every island gets the same texture pixels per meter, so there are no blurry or sharp patches. On
Texels Per Meter (Even Texel Density) Pixels per meter of surface. 0 = fill the whole square, for the most pixels this mesh can get. Set a number to give every mesh the same density. 0
Lightmap Lightmap UVs: Keep, Generate (in Lightmap Channel) or Off. Keep
Uneven Density Factor How far off an island's density must be before the UV view marks it yellow. 2

The two makers have their own fine-tuning settings (iterations, patch counts, thresholds). They're the engine's own, under the engine's names. The defaults suit most meshes.

<aside> ⚠️

Generate and Repack on channel 0 mean a new material. The mesh's textures were made for the old layout and no longer fit. So the mesh's look is baked onto the new layout as one material, using the Bake step's settings whether Bake is on or off. This works on static meshes. A skeletal mesh, or one whose look can't be baked, keeps the UVs it had, and the Result says why.

</aside>

Bake (static meshes)

Paints the source's look into new textures on the result's UVs. It has two uses:

Setting What it does Default
Kind Shared Material = every slot's look baked into one Texture Set and one material. Normal And AO = the source's lost detail as a normal map and shading; the materials stay. Both = the shared material, with the lost detail in its normal map. Shared Material
Size The baked textures' size. 2048
Projection Distance How far from the result's surface the source's detail is looked for, in cm. Raise it if detail is missing after a heavy Simplify. 3
AO Occlusion Rays Rays per pixel for ambient occlusion. More = smoother, slower. 16
Base Color, Normal, Metallic Roughness, Specular, Emissive, Opacity, Ambient Occlusion Which maps are baked. Untick what the mesh doesn't need. All on
Layout The Texture Set Type the bake is written in. Empty = the example Prop type. Empty
Masked Layout Used when the bake has see-through parts. Empty = the example PropMasked type. Empty

<aside> ✅

What you get: a normal Texture Set beside the saved mesh, and a material instance named MI_ + the mesh's name + _Baked, already on the mesh. It's the same kind of set the Textures tab makes, on the same master material, so the baked mesh gets snow, dust and wetness like everything else. Save builds that type's master material for you if it isn't built yet. Until it is, the After view shows the original materials (build it on 9. Materials Tab to see the bake in the preview).

</aside>

<aside> 💡

Bake Again (above the Steps list) runs only this step again on the previewed mesh. Change a Bake setting, click it, and you see the new textures without waiting for Simplify and the rest.

</aside>

Vertex Color Bake

Stores shading in the mesh's own points, not in a texture. It's very cheap, and a material can read it for dirt in creases or wear on edges, on meshes that don't have those maps.

Setting What it does Default
Red What the red channel holds: Ambient Occlusion, Curvature, Height or None (white). Ambient Occlusion
Green The same choice for green. Curvature
Blue The same choice for blue. Height
Alpha The same choice for alpha. None
Replace Painted A mesh whose vertex colors aren't all white has been painted by someone. Off = it's left alone. Off
AO Occlusion Rays Rays per point for ambient occlusion. 16

Switch the views to Vertex Colors and click Red, Green or Blue to see each one.

<aside> ℹ️

Tell the material what you baked. On the Material Recipe, set Vertex Color Red Holds (and Green, Blue, Alpha) to match this step. Then the feature pieces read the vertex colors. See 10. Material Recipes.

</aside>

It's skipped on meshes that use vertex colors to paint layers (the layered Building material), so it never wipes out your painting.

LODs

Makes the mesh's LODs (lighter versions shown as it gets further away), and sets Nanite.

Setting What it does Default
Mode Generate = LOD 1 and up are made again from the optimized LOD 0. Keep Source = the source's LODs stay. Generate
Count (Generate) LODs in all, LOD 0 included. 4
Shares (Generate) Each LOD's share of LOD 0's triangles. Past the end of the list, each halves the last. 1, 0.5, 0.25, 0.125, 0.06, 0.03, 0.015, 0.008
Auto Screen Size (Generate) The engine picks when each LOD shows. Off = each shows at half the screen size of the last. On
Nanite Keep Source, On or Off. Static meshes only. Keep Source
Nanite Fallback Share (Nanite On) The share of triangles kept in the fallback mesh, used where Nanite isn't. 1

Use the LOD picker above the After view to look at each one.

Impostor (static meshes)

A flat card that looks like the mesh from far away.

The mesh is photographed from many directions into a sheet of pictures. Far away, the game draws one card that turns to face the camera and shows the right picture for the angle. A whole tree becomes two triangles.

Use it for trees, rocks and buildings seen in the distance. Tick Impostor above the After view to see it.

Setting What it does Default
Shape Half Sphere = pictures from above the horizon only (things seen from the ground). Full Sphere = from every side, below too. Half Sphere
Frames Per Side Pictures per side of the sheet. 8 = 64 pictures. More = smoother as you circle it, bigger textures. 8
Frame Pixels Pixels per picture. 256
Edge Padding Pixels Pushes the color out past each picture's edge, so there's no dark fringe far away. 8
Use As Last LOD = saved, and added after the mesh's LODs. Separate Only = saved as its own mesh. (Nanite meshes ignore LODs, so theirs is always saved on its own.) As Last LOD
Screen Size (As Last LOD) How small the mesh must be on screen before the card takes over. 0.05
Blend Frames The three nearest pictures are blended, so it's smooth as you circle it. Off = the nearest only, with small snaps. On

Collision (static meshes)

Sets what the saved mesh collides with.

Setting What it does Default
Outcome Keep = the source's collision, untouched. None = no collision. Surface = it collides with its own triangles (exact, but costly). Shapes = simple shapes made from the mesh. Keep

With Shapes:

Setting What it does Default
Shape Kind What kind of shapes are made: boxes, spheres, capsules, convex hulls, or the smallest of those that fits each part. Min Volume Shapes
Max Shapes The most shapes in all. 0 = no cap. 8
Max Convex Hulls, Hull Faces (Convex hull kinds) How many hulls the mesh may be cut into, and how detailed each is. 4, 25
Auto Detect Spheres, Boxes, Capsules A part that is a sphere, box or capsule becomes exactly that shape. On
Min Thickness No shape is made thinner than this, in cm. 1
Merge Shapes Shapes that overlap a lot are merged. On
Check Gaps Tests points all over the mesh against the shapes. Where the mesh pokes out of them, it's marked in red. On
Gap Samples, Gap Tolerance, Gap Seed (Check Gaps) How many points are tested, how far outside counts (cm), and a number that picks the points. 4000, 2, 1

Switch the views to Collision: shapes are green, gaps are red dots.

Example: a doorway. One shape would fill the opening, and the player couldn't walk through. Set Outcome to Shapes and preview. If red dots show, or the opening is filled, raise Max Convex Hulls and Max Shapes and preview again.

Physical Materials

Gives each of the mesh's materials a physical material. That's what the game reads to play the right footstep and impact: wood, stone, metal.

  1. Select a mesh in the list.
  2. Open the Physical Materials step. It lists that mesh's materials, each with a box.
  3. Pick a physical material in each box. The line under it shows the surface it gives.
  4. Save.

| --- | --- | --- |

<aside> ⚠️

</aside>

Picks are remembered in the preset, so a material shared by a hundred meshes is picked once. Material instances with no pick of their own take their parent's.

Physics Asset (skeletal meshes)

Keeps the character's physics asset, or makes a new one (the simple bodies used for ragdolls and hit detection).

| --- | --- | --- |

◀ Previous: 15. Shape Steps · 🏠 WC Tools · Next: 17. Settings, Menus and Commands ▶