Occlusion Settings
Found under Occlusion Settings in the Settings panel. The defaults work well for most characters — only adjust if you get unexpected results.
These settings apply to whichever mesh is the current Occlusion Target. They are shared across targets, so if a garment needs different values from the body, adjust them, run detection on that garment, and save before switching.
💡 Start with defaults: Only tweak settings if the result looks wrong after running detection.
Core Ray Settings
| Setting | Default | Description |
|---|---|---|
| Ray Count | 128 | Test directions per triangle. Higher = more accurate but slower. Raise to 256–512 for complex clothing. |
| Occlusion Threshold | 0.75 | Fraction of the triangle that must be covered to mark it hidden. Lower hides more, higher hides less. |
| Ray Offset | 0.5 | Push away from the surface to avoid self-intersection. The detector limits this offset to the clothing gap so rays do not start beyond close-fitting cloth. |
| Body Penetration Tolerance | 1 cm | Also hides skin protruding slightly through clothing when a short inward ray confirms cloth directly beneath it. Set to 0 for strict geometric occlusion. Garment-layer targets do not use this tolerance. |
| Detect Clothing Layers | Off for skin | Garment targets use the body's outward direction for both lining and outer cloth, with ray origins kept inside the cloth gap. This prevents dark lining from remaining after detection while preserving exposed fabric. The garment and layered outfit Blueprint nodes handle this automatically. For direct C++ mesh detection, enable this setting and supply the reference body mesh; geometry callers supply normals directed outward from the reference body. Re-detect and save existing garment masks to update baked results. |
| Max Ray Distance | 100 | How far each ray travels (cm). Increase for very thick clothing. |
| Cone Half Angle | 45° | Test cone angle around each triangle's normal. 30–45° for tight clothing, 60–75° for loose garments. |
Boundary & Post-Processing
| Setting | Default | Description |
|---|---|---|
| Dilation Rings | 0 | Expands the hidden region outward by this many triangle rows. |
| Max Hidden Island Size | 8 | Removes isolated hidden patches smaller than this — prevents stray hidden spots on exposed skin. |
| Max Visible Island Size | 8 | Fills small visible "holes" inside hidden regions. |
| Smoothing Iterations | 1 | Blends the hidden/visible boundary for cleaner edges. Increase for smoother boundaries. |
| Hidden Neighbor Ratio | 0.85 | Smoothing threshold. Higher preserves more visible area near edges. |
| Edge Erosion Rings | 1 | Erodes the hidden boundary inward. Removes edge spikes. |
Advanced Settings
| Setting | Default | Description |
|---|---|---|
| Clothing Proximity Threshold | 8 | Target triangles farther than this (cm) from any occluding mesh are always kept visible. |
| Vertex Occlusion Min Count | 2 | How many of a triangle's 3 corners must be hidden before the whole triangle is hidden. |
| Direct Normal Threshold | 0.40 | Relaxed threshold when the direct normal ray confirmed clothing overhead. |
| Min Informative Ray Fraction | 0.15 | Minimum ray fraction surviving self-occlusion filter before the relaxed threshold applies. |
| Use Bidirectional Containment | On | Also checks inward rays to catch geometry sandwiched between two covering layers. Particularly useful on layered outfits. |
| Close Enclosed Regions | On | Hides visible patches surrounded by hidden geometry. Cleanup joins coincident vertices across UV and material seams. Real open body boundaries, regions extending beyond clothing proximity, and wholly uncovered components stay visible. |