"Decimating AI meshes without wrecking them"
- Scene hitching / huge triangle counts with "only" mid-poly AI props.
- After decimation, thin features (umbrella domes, wheels) collapse into junk.
- Re-exported mesh compiles untextured even though the albedo still exists.
AI-generator deliveries often cap every asset at ~7–12k tris regardless of screen size. The worst offender is usually the most-instanced asset, not the densest file:
11.4k grass tuft × ~1150 instances ≈ 13M scene trisCollapse decimation preserves painted UVs fine — silhouette is the failure mode. Thin/curved features die below ~2k tris; high-instance scatter clumps tolerate aggressive cuts because faceting is invisible at their screen size.
Scripted OBJ export with export_materials=False drops usemtl as well as the .mtl, so vmdl remaps miss and the mesh compiles untextured.
- Census before tooling: for each asset, compute
tris × instance_count. Budget by screen size × instances, not file size alone. - Decimate (collapse) with budgets weighted by category. Verify with a textured before/after render on one complex prop before batching.
- After export, grep for
usemtlandvt. Ifusemtlis missing, injectusemtl <name>before the firstfline — prefer injection over re-enabling material export (which can write a stray.mtlinto a delivery folder). - Keep the both-names material remap in the vmdl pointed at the existing painted albedo vmat.
Rough guidance (tune per art direction):
| Asset role | Decimation tolerance |
|---|---|
| Scatter / ground clutter (high instance) | Aggressive |
| Hero / mid-ground props with thin silhouettes | Conservative — stop when dome/wheel edges break |
GPU cost tracks transformed triangles in the frame, so instance count multiplies as hard as mesh density. UV-preserving collapse keeps the AI bake readable; visual failure is geometric (silhouette), which is why a textured screenshot beats a raw tri count as the acceptance test. Preserving usemtl keeps ModelDoc's material group name aligned with your remap keys.