blender-game-optimization
Optimize Blender assets for real-time engines - triangle/material/texture/bone budgets per platform (mobile, Roblox, web, VR, console, PC), LOD chains, decimation modes, mesh cleanup, draw-call reduction (material merging, atlases, trim sheets), instancing, vertex-split costs, collision proxies, texture memory. Use when an asset is too heavy, before export, or when targeting a platform budget.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 1
- Forks
- 1
01 前言 Front Matter
- name
- blender-game-optimization
- license
- MIT
- metadata
- { "author": "blender-agent-skills", "version": "1.2.0" }
- description
- Optimize Blender assets for real-time engines - triangle/material/texture/bone budgets per platform (mobile, Roblox, web, VR, console, PC), LOD chains, decimation modes, mesh cleanup, draw-call reduction (material merging, atlases, trim sheets), instancing, vertex-split costs, collision proxies, texture memory. Use when an asset is too heavy, before export, or when targeting a platform budget.
02 资源文件 3
- 脚本scripts/_bpyx.py4.4 KB
- 脚本scripts/make_lods.py3.9 KB
- 脚本scripts/mesh_stats.py3.8 KB
03 SKILL.md 正文
Game Optimization
The execution model is in blender-core. Always re-run blender-asset-qa after optimizing.
Procedure
- Measure:
scripts/mesh_stats.py -- --objects ... --budget mobile|roblox|web|vr|console|pc. It returns tris, estimated draw calls, materials, texture VRAM, bones, and the over-budget items. - Clean:
make_lods.py --cleanup(merge by distance 0.1 mm, dissolve degenerate, delete loose). Remove hidden faces: back-to-back faces and faces under other parts (qa_check→back_to_back, plus manual xray). - Reduce in this order (cheapest visual loss first): hidden/interior geometry → unnecessary edge loops on flat areas (Limited Dissolve 1–5°) → over-segmented cylinders → Decimate → bake detail to normals (
blender-texture-baking). - Materials: merge to 1–2 per asset (atlas / trim sheet / shared tiling material). Each material slot per mesh is roughly one draw call.
- LODs:
scripts/make_lods.py -- --objects SM_X --renamecreates_LOD1.._LOD3at 50/25/12.5%. Check every LOD silhouette withlook/review_shots. - Re-measure, then QA, then export (
blender-export-pipelines).
Budgets (guidance per asset, 2026)
| Platform | Hero char tris | Prop tris | Mats/asset | Max texture | Bones |
|---|---|---|---|---|---|
| Mobile | 5–15k | 0.3–3k | 1–2 | 1024 | ≤75 |
| Roblox | body ≤10,742 (head 4k, torso 1.75k, limb 1,248); accessory/clothing 4k | ≤20k per MeshPart | 1 (SurfaceAppearance) | 1024 (PBR), 4k max | R15 + optional |
| Web (three.js/Babylon) | 10–30k | 1–10k | 1–2 | 2048 | ≤100 |
| Standalone VR (Quest) | 10–40k | 1–10k | 1–3 | 2048 | ≤100 |
| Console / PC | 50–150k | 5–50k | 2–6 | 4096 | 150–300 |
| UE5 Nanite (static) | — | millions OK | few | 4096+ | n/a |
| Whole-scene limits matter more than single assets: mobile ≈ 100–300k tris visible and < 100–200 draw calls; PC ≈ millions of tris and < 2–5k draw calls. |
Decimate modes
| Mode | Use | Notes |
|---|---|---|
COLLAPSE (ratio) |
organic, scans, LODs | use_symmetry, vertex group factor to protect faces/hands; triangulates |
UNSUBDIV (iterations) |
meshes made by subdividing quads | restores the quad grid cleanly |
DISSOLVE (planar, angle) |
hard-surface / CAD | delimit {"SEAM","SHARP","MATERIAL","UV"}; keeps the silhouette, makes n-gons → triangulate on export |
| Protect UV seams and silhouette: decimate a copy, then compare. If UVs tear at LOD1, the ratio is too aggressive for that topology, so re-unwrap or use a manual LOD. |
The hidden cost: vertex splits
GPU vertex count = unique (position, normal, UV, color) combinations. Every UV seam and hard edge duplicates vertices, so engine vertex counts are often 1.5–3× Blender's. Minimize seams where they aren't needed, keep hard edges = seams (so the split happens once), and don't add vertex colors or extra UV sets you don't use.
LOD rules
- Halve the tris per level. Switch at screen size ~0.5 / 0.25 / 0.125 (UE "Screen Size", Unity LOD Group %, Godot
lod_biasauto). - LODs keep the same materials (or fewer: merge them at LOD2+), same pivot, same bounds.
- Skeletal LODs: remove finger/face bones at LOD2+ (the engine bone-reduction tools handle this). Keep the skinning on the same skeleton.
- Far LOD / foliage: impostor/billboard. Unreal Nanite (static, opaque/masked) and Godot's auto mesh LOD can replace a hand-made chain.
- Roblox: no manual LODs.
RenderFidelity=Automaticdoes it. Keep each MeshPart ≤ 20k tris and use a simpleCollisionFidelity(Box/Hull) for non-walkable parts.
Draw calls and batching
- Merge static meshes that share a material and are always seen together (join objects). Don't merge across large areas, because that defeats frustum/occlusion culling.
- Instancing: repeated objects as linked duplicates (Alt+D, shared mesh) or collection instances. They export as instances (glTF
EXT_mesh_gpu_instancingwithexport_gpu_instances) or as one mesh + transforms in the engine. - Atlases/trim sheets: put many props on one texture set. Trim sheets let walls, panels and pipes share one 2k material.
- Texture memory (upper bound, uncompressed RGBA8 + mips): 1k = 5.3 MB, 2k = 21 MB, 4k = 85 MB. Engines compress (BC7/ASTC ≈ 4–8×). Pack grayscale maps into ORM channels to cut it 3×.
Collision
Keep collision separate and simple: boxes/convex hulls of ≤ 32–255 verts. UE UCX_<Mesh>_##, Godot -colonly/-convcolonly suffix, Unity MeshCollider on a simplified mesh, Roblox CollisionFidelity. Never use the render mesh as a physics mesh for anything that moves.
Rig and animation cost
Limit to 4 influences per vertex (vertex_group_limit_total(limit=4) + normalize). Remove non-deforming bones from the export (use_armature_deform_only). Bake constraints and drivers to keys. Shape keys cost memory per vertex, so drop unused ones and keep only deltas (glTF sparse accessors handle this).
Gotchas
- Decimate on meshes with unapplied modifiers:
make_lods.pyevaluates them first. Other paths need you to apply them. - Join (
Ctrl+J) merges materials and UV maps by name. Rename the UV maps identically first, or the UVs get lost. - The
Weldmodifier is the non-destructive merge by distance. Usemode="CONNECTED"to avoid welding separate parts. - Triangulate before measuring if the engine will. Quads already count as 2 tris in the stats.
04 同仓库更多 Skills
blender-workflow-recipes
End-to-end Blender 5.2 playbooks chaining the blender-* skills with QA gates - game props (mid-poly, high-to-low), game characters (sculpt/AI mesh to rigged, animated export), Roblox props/accessories/avatars, AI or downloaded asset cleanup, procedural environments, web/AR assets, product turntables, mood/weather shots (night, rain, snow, fog). Use for complete multi-stage asset requests.
blender-weather-fx
Weather effects in Blender 5.2 - looping Geometry Nodes rain, snow, dust, ash and embers with ground hits and splashes, wet surfaces, puddles with animated ripples, wall streaks, snow cover (shader + real snow geometry), storm lightning with multi-stroke flashes and bolts, engine-ready weather masks. Use for rain, storm, snow, wet street, puddle, dust or ember scenes.
blender-video-editing
Video in Blender 5.2 - Video Sequencer edits from Python (clips, image sequences, crossfades, titles, music fades, proxies, color management, H.264/AAC output) and motion tracking (feature detection, camera solve, scene orientation, tripod and plane tracking, stabilization) for VFX shots. Use to cut renders/footage together or match-move a camera.
blender-time-of-day
Time of day and atmosphere in Blender 5.2 - measured sky + sun for dawn, morning, noon, golden hour, sunset, blue hour, overcast, night/moonlight with stars and city glow, exposure balance, height fog from visibility, god rays, Cycles vs EEVEE volumes, compositor grade, stylized moods (cyberpunk neon, horror, underwater, desert). Use for any day/night, sunset, foggy or mood lighting scene.
blender-texturing
Texture authoring in Blender 5.2 - smart-material layers (edge wear, cavity grime, dust, rust, roughness breakup) from curvature/AO masks, z-fight-safe decal and sticker placement, trim sheets, tiling + vertex-color blends, texture painting, baking the look to game texture sets. Use when a material needs wear, dirt, a decal, trims or hand painting, not just wiring.
blender-texture-baking
Bake texture maps in Blender 5.2 Cycles - high-to-low normal maps with cage/extrusion, AO, curvature, ID, thickness, base color/roughness/metallic from procedurals, ORM packing, OpenGL vs DirectX, margins, GPU baking, fixing skewing/waviness/seams. Use when transferring sculpt or high-poly detail to game meshes or converting procedural materials to textures.