Skip to content

06. Optimization Tools Suite

← Previous: One-Click Optimize | Next: Runtime Components →


Overview

FuzzyOptimizer provides a standalone suite of professional optimization tools accessible directly from their respective tabs in the Dashboard. All tools:

  • Operate on the active scene selection.
  • Execute within the atomic, revertible session framework.
  • Write generated meshes, materials, and atlases cleanly into Assets/FuzzyOptimizer_Generated/.

1. Smart Mesh Combiner

Dashboard Tab: Mesh Combiner
C# API: FuzzyLogicLabs.FuzzyOptimizer.Editor.Combiner.SmartMeshCombiner

Merges static renderers into unified spatial meshes organized by grid cells, producing a single submesh per distinct material.

  • Non-Destructive Architecture: The original source GameObjects and renderers are merely disabled—not destroyed. Colliders, custom scripts, audio sources, and child transforms remain completely intact and active.
  • Data Integrity: Fully preserves vertex normals, tangents, UV2 channels, and vertex colors. Correctly handles mirrored, negatively scaled objects and auto-generates lightmap UVs when necessary.
  • Spatial Grid Cells: Segmenting merges by spatial cells ensures that frustum and occlusion culling continue to work efficiently in large outdoor scenes.
  • Reversible: Combined root objects receive a CombinedMeshGroup component. Clicking Revert on this component instantly restores the hidden original renderers and offers to purge generated assets.
OptionDefaultDescription
Group NameCombinedGroupName assigned to the generated root GameObject.
Use AtlastruePacks compatible Lit/Standard materials into a single shared atlas material.
Atlas Size2048Resolution for generated texture atlases.
Cell Size0 (Whole Selection)Spatial grid cell size in meters; set to 0 to combine the entire selection into one mesh.
Save PrefabtrueExports the combined hierarchy as a reusable prefab asset under Assets/FuzzyOptimizer_Generated/Combined/.
Include Non-StaticfalseMerges objects marked with animators, scripts, or non-kinematic rigidbodies. Disabled by default to prevent freezing dynamic objects.

2. Synchronized Lit Texture Atlas Packing

C# API: FuzzyLogicLabs.FuzzyOptimizer.Editor.Atlas.URPTextureAtlasPacker

Utilized by both the Smart Mesh Combiner and the HLOD Builder. Rather than packing diffuse textures alone, this engine packs all synchronized channels of URP Lit and Built-in Standard shaders into pixel-aligned atlas sets:

  • Albedo Map (multiplied by material tint color)
  • Normal Map (correctly reoriented and packed)
  • Metallic / Smoothness Map
  • Occlusion Map
  • Emission Map

Primary features:

  • MaxRects Bin Packing: Employs optimal 2D bin packing; slot allocations match the source texture resolution (single-color materials allocate a minimal 64 px tile).
  • Edge Dilation: Extends border pixels into padding zones to prevent mipmap color bleeding at glancing camera angles.
  • GPU Resampling: Resamples textures via GPU blits; source textures do not require Read/Write to be enabled in import settings.
  • Automatic UV Remapping: Vertex UV0 coordinates are mathematically remapped to the exact UV sub-rect of the atlas slot.
  • Intelligent Fallback: Tiled materials (UV coordinates outside the 0–1 range), transparent shaders, and alpha-clipped cutout materials are skipped automatically and retain their distinct submeshes and materials.

Assets are written to Assets/FuzzyOptimizer_Generated/Atlases/.


3. Hierarchical LOD (HLOD) Builder

Dashboard Tab: Mesh Combiner
C# API: FuzzyLogicLabs.FuzzyOptimizer.Editor.HLOD.HLODBuilder

Designed for large, open-world environments. The HLOD builder groups static renderers into spatial grid cells and equips each cell with a structured LODGroup:

  • LOD0: The original full-detail scene renderers (visible when the camera is up close).
  • LOD1: A single, simplified, atlased proxy mesh representing the entire cell (reducing thousands of distant draws to a single draw call).
  • Culled: Completely culled when the cell covers less than the cull screen height.
OptionDefaultDescription
Cell Size50 mGrid dimensions; each cell becomes a single distant proxy draw call.
Proxy Ratio0.15 (15%)Percentage of original triangles retained in the simplified proxy.
Proxy Screen Height0.25 (25%)Transition screen height threshold where the cell switches from LOD0 to the proxy.
Cull Screen Height0.01 (1%)Screen height threshold below which the cell is culled completely.
Use Atlas / Sizetrue / 2048Packs all proxy materials into a shared texture atlas.
Proxy Casts ShadowsfalseDisables shadow casting on distant proxies to avoid shadow map overhead.

The root object receives an HLODRoot component. Deleting this root or clicking Remove HLOD restores the original renderers. Output: Assets/FuzzyOptimizer_Generated/HLOD/.


4. Mesh Decimator (Burst QEM)

Dashboard Tab: Mesh & Colliders
C# API: QEMDecimator.Decimate(mesh, targetRatio) / QEMDecimator.DecimateBatch(meshes, ratios, options)

Implements high-performance Quadric Error Metric (QEM) edge collapse simplification based on Garland & Heckbert’s algorithm, compiled with the Unity Burst Compiler into parallel C# Jobs.

  • Crack-Free Boundary Locking: Automatically detects and locks open surface borders, UV seams, and normal splits, ensuring simplified meshes never tear along seams.
  • Full Vertex Channel Preservation: Retains submesh structures, vertex normals, tangents, secondary lightmap UVs, and vertex color channels.
  • Multithreaded Batch Decimation: Can simplify dozens of unique meshes simultaneously across CPU worker threads without editor hitches.

Assets are written to Assets/FuzzyOptimizer_Generated/Decimated/.


5. Auto LOD Chain Generator

Dashboard Tab: Mesh & Colliders
C# API: AutoLODGenerator.GenerateLODChain(gameObject, lod1Ratio, lod2Ratio)

Generates complete LOD chains with a single click:

  1. Generates LOD1 (default 50% triangles) and LOD2 (default 25% triangles) meshes using the Burst QEM decimator.
  2. Instantiates child objects with configured renderers matching the parent’s material and lighting settings.
  3. Configures a standard Unity LODGroup component with pre-tuned screen transition percentages.
  4. Mesh Instance Sharing: If multiple selected objects share identical mesh assets, the generator simplifies the mesh once and shares the resulting LOD assets across all instances.

Assets are written to Assets/FuzzyOptimizer_Generated/LODs/.


6. Collider Optimizer

Dashboard Tab: Mesh & Colliders
C# API: FuzzyLogicLabs.FuzzyOptimizer.Editor.Colliders.ColliderOptimizer

Replaces performance-heavy MeshCollider components with optimized physics alternatives:

  • Intelligent Primitive Fitting: Analyzes the target mesh. If the mesh is watertight and its bounding volume fill ratio is between 80% and 110%, it replaces the MeshCollider with an ultra-fast Box, Sphere, or Capsule Collider.
  • Non-Convex Low-Poly Proxies: If primitive fitting is not suitable (such as hollow archways, open doorways, or complex terrain props), it generates a simplified, decimated collision mesh. For static geometry, the proxy remains non-convex, preserving doorways and interior walkthrough spaces.
  • Empty Collider Removal: Automatically detects and removes unassigned or broken MeshColliders.

Assets are written to Assets/FuzzyOptimizer_Generated/Colliders/.


7. Mesh Repair Tools

Dashboard Tab: Mesh & Colliders
C# API: FuzzyLogicLabs.FuzzyOptimizer.Editor.MeshTools.MeshRepairTools

A collection of non-destructive mesh fixing utilities:

ToolOperation
Weld VerticesMerges duplicate vertices sharing position and normal within a threshold distance (default 0.001 m), repairing fragmented geometry.
Recalculate NormalsComputes face-angle weighted normals for smooth, artifact-free surface shading.
Invert NormalsReverses triangle winding order and vertex normals to fix inside-out or inverted meshes.
Generate UV2Computes an un-warped secondary UV channel required for lightmap baking on procedural meshes.

Cleaned mesh assets are saved to Assets/FuzzyOptimizer_Generated/Repaired/.


8. Culling Tools

Dashboard Tab: Culling & Impostors

Layer Distance Culling

Attaches the high-performance LayerDistanceCuller component to the camera. It configures native Unity Camera.layerCullDistances with spherical culling, eliminating distant prop draws without runtime script overhead. See Runtime Components: LayerDistanceCuller.

Size-Based Culling

C# API: SizeCullingTool
Enables distance culling for small environment props without modifying layer assignments. Attaches a lightweight single-level LODGroup with a configured cull screen height. When the object covers less than the threshold on screen, it is culled natively by the rendering engine.

One-Click Occlusion Culling

C# API: OcclusionSetupTool.SetupAndBake()
Automatically tags all static environment geometry as occluders and occludees, enables occlusion culling on the camera, and triggers an asynchronous background occlusion bake with platform-appropriate voxel parameters.


9. Billboard & Multi-Angle Impostor Baker

Dashboard Tab: Culling & Impostors
C# API: BillboardBaker.BakeBillboard(gameObject, resolution, mode)

Captures complex, high-poly distant props (such as distant trees, rock towers, or architectural landmarks) into lightweight 2D billboard assets:

  • Single Quad Billboard: Renders an orthographic capture of the object onto a transparent quad oriented by the runtime BillboardRotator component.
  • 8-Directional Impostor: Bakes an atlas of 8 horizontal perspectives around the object. At runtime, the zero-allocation MultiAngleBillboard component samples the camera angle and displays the corresponding view.

Default resolution: 512×512. Assets are written to Assets/FuzzyOptimizer_Generated/Billboards/.