t1k:unity:rendering:amplify-impostors
| Field | Value |
|---|---|
| Module | rendering |
| Version | 3.1.7 |
| Effort | medium |
| Tools | — |
Keywords: Amplify, impostors, LOD, rendering
How to invoke
Section titled “How to invoke”/t1k:unity:rendering:amplify-impostorsAmplify Impostors
Section titled “Amplify Impostors”Terminology
Section titled “Terminology”- Impostor — A flat billboard that fakes a 3D object from pre-baked multi-angle snapshots
- Octahedron — Impostor type mapping views onto an octahedral UV layout (best quality, recommended)
- HemiOctahedron — Half-octahedron for ground-based objects (trees, buildings) viewed from above
- Spherical — Traditional billboard with parallax depth (simplest, lowest quality)
- Atlas — Texture containing all baked view angles (albedo, normals, specular, emission, depth)
- BakePreset — ScriptableObject defining output textures, compression, and format settings
Skill Purpose
Section titled “Skill Purpose”Reference guide for Amplify Impostors v1.0.3 — a component-based impostor baking tool for Unity 6. Use to replace high-poly models (Synty characters, trees, buildings) with ultra-lightweight billboards for mass-spawned DOTS entities or distant LOD levels.
Render Pipeline: URP ONLY — This project exclusively uses URP (Universal Render Pipeline). All shaders, materials, impostor baking, and rendering must target URP. Never use Built-in RP or HDRP shaders/materials. When baking impostors, always ensure URP shader package is imported (
AmplifyImpostors/Plugins/EditorResources/Shaders/Runtime/URP/).
Key use case in this project: Synty PolygonKnights characters (5 SkinnedMeshRenderers + 50 bones each) are too heavy for DOTS mass spawning. Impostors reduce each unit to 1 quad (~4 tris) with baked appearance.
CRITICAL GOTCHA — URP shader must be imported + applied: Amplify ships URP shaders as
.unitypackagefiles inAmplifyImpostors/Plugins/EditorResources/Shaders/. You MUST import the matching version (e.g.,URP Shaders 17.3.unitypackagefor URP 17.3). After baking, materials default to the non-URP shader (Hidden/Amplify Impostors/Octahedron Impostor) which renders pink/magenta. RunTools/DOTSBattlefield/Fix Impostor Shaders for URPto batch-swap all materials to URP variants.Two material strategies (in
ImpostorMaterialHelper,DOTSBattlefield.Editor):
- MonoBehaviour GameObjects (trees, LODGroups): Use
GetUrpImpostorMaterial()— swaps shader toOctahedron Impostor URP, preserves view-dependent billboard rendering- ECS entities (units in SubScene): Use
LoadOrCreateUrpLitMaterial()— creates standardURP/Litwith alpha cutout. Amplify URP shader is still NOT SRP Batcher / BRG compatible (_AI_ForwardBiascbuffer)
When This Skill Triggers
Section titled “When This Skill Triggers”- Creating impostors from Synty or other high-poly models
- Setting up LOD groups with impostor as final LOD level
- Baking impostor atlases (editor workflow or programmatic)
- Configuring impostor atlas resolution, frame count, pixel padding
- Optimizing distant rendering for mass-spawned entities
- Debugging pink/missing impostor shaders (URP shader package)
- Integrating impostors with DOTS Entities Graphics
Quick Reference
Section titled “Quick Reference”| Topic | Reference File |
|---|---|
| Impostor types, baking workflow, parameters, LOD integration | baking-guide.md |
| API reference, enums, programmatic baking, editor scripting | api-reference.md |
| DOTS integration, ECS rendering, GPU instancing, performance | dots-integration.md |
| Advanced API patterns, batch baking, custom preset config | api-advanced-guide.md |
Critical Rules
Section titled “Critical Rules”- Import URP shaders first — Before baking, import
AmplifyImpostors/Plugins/EditorResources/Shaders/URP Shaders 17.3.unitypackage(matches Unity 6.3) - Octahedron is default — Use
ImpostorType.Octahedronfor characters/props. UseHemiOctahedrononly for trees/foliage viewed from above - 8x8 frames at 2048 — Project default (ImpostorBakeConfig). For hero characters, increase to 16x16 for more viewing angles. For mass units, reduce to 1024 resolution to save VRAM
- Run “Fix Impostor Shaders for URP” after baking — Baked materials default to non-URP shader. Menu:
Tools/DOTSBattlefield/Fix Impostor Shaders for URP - Two material strategies — MonoBehaviour:
GetUrpImpostorMaterial()(Amplify URP shader). ECS entities:LoadOrCreateUrpLitMaterial()(standard URP/Lit, SRP Batcher safe) - LODGroup integration — Use
LODReplacement.ReplaceLastto auto-insert impostor as final LOD - Bake from prefab — Add
AmplifyImpostorcomponent to prefab, set renderers, bake. Output:.asset+ textures - Linux baking works — Fixed in v1.0.1 (GLCore fix)
Performance Guidelines
Section titled “Performance Guidelines”| Scenario | Recommendation |
|---|---|
| Mass units (100+) | 8x8 frames, 1024 atlas, Octahedron |
| Distant trees/foliage | 16x16 frames, 2048 atlas, HemiOctahedron |
| Hero characters (close-up) | 16x16 frames, 2048 atlas, Octahedron |
| Buildings/static props | 8x8 frames, 2048 atlas, Octahedron |
Gotchas
Section titled “Gotchas”- Synty characters need T-pose bake: Animated characters should be in bind pose when baking. Disable Animator before bake
- SubScene baking: Impostor GameObjects (MeshFilter + MeshRenderer + impostor material) bake cleanly into ECS entities via SubScene. No SkinnedMeshRenderer = no bone overhead
- Multiple materials: If source has multiple materials, all are baked into single atlas. No material sorting needed
- Pixel padding: Keep at 32 (project default in ImpostorBakeConfig). Lower values (e.g. 16) cause atlas frame bleeding — visible as noise/artifacts around impostor edges, especially at distance where mipmaps kick in
- Shadow artifacts: Use Forward Bias slider (v1.0.0+) to fix self-shadowing issues
- Dithering crossfade: Supported for smooth LOD transitions — enable in LODGroup settings
- Custom shader property mapping (CRITICAL — Synty): Synty materials use
Synty/Generic_Basicshader with_Albedo_Mapproperty. Amplify’s baking shader expects_BaseMap/_MainTex. Fix:ImpostorBatchBaker.NormalizeMaterialsForBaking()temporarily swaps renderers toURP/Litwith correct texture mappings (_Albedo_Map→_BaseMap,_Normal_Map→_BumpMap) beforeRenderAllDeferredGroups(), then restores originals - URP Forward+ GBuffer fallback (CRITICAL — double-lit impostors): URP/Lit in Forward/Forward+ mode has NO GBuffer pass (only 8 passes: ForwardLit, ShadowCaster, DepthOnly, etc.). Amplify’s
RenderAllDeferredGroups()searches for “DEFERRED”/“GBuffer” → falls back to pass 0 (ForwardLit), which bakes FULLY LIT colors into the atlas → bright/washed-out impostors at runtime (double-lighting). Fix: Custom bake shaderAssets/AmplifyImpostors/Plugins/EditorResources/Shaders/Baking/ImpostorBakeGBuffer.shaderoutputs raw material properties to 5 MRT targets (albedo, normalWS, specular, occlusion, emission + SV_Depth), bypassing URP lighting entirely.ImpostorBatchBaker.EnsurePresetWithBakeShader()loads global BakePreset and assignsHidden/Impostors/Baking/GBufferBakebefore baking.RestorePresetBakeShader()nulls it after. TheTools/DOTSBattlefield/Bake All Impostorsmenu item handles this automatically - “Resize Textures?” dialog spam: Amplify shows
EditorUtility.DisplayDialogfor each impostor when resolution changes. Fix:ImpostorBatchBakersetsEditorPrefs.SetInt("IMPOSTORS_GLOBALTEXIMPORT", 1)before baking (1 = always resize), restores original value after. This EditorPref controls the behavior inAmplifyImpostor.cs:1177 - LOD threshold tuning: Small objects (walls ~4m, obstacles ~1-3m) need very low LOD0 transition values. At
0.10f(10% screen height), these objects are almost always below threshold → impostor shown at close range. Recommended:0.02ffor LOD0 (switches to impostor when < 2% screen height),0.005ffor LOD1 cull. Large trees can use0.15f/0.01f - Bake leftover cleanup (AUTOMATIC):
RenderAllDeferredGroups()creates temporary “Impostor” GameObjects at scene root during baking.ImpostorBatchBaker.CleanupLeftoverImpostorObjects()auto-deletes them after batch baking completes — no manual cleanup needed