AI-Generated 3D Models in Unity Without Wrecking Performance
AI 3D generators can now turn a prompt or a single image into a textured mesh in under a minute. Cloud tools like Meshy and Tripo do it, and open models like Microsoft's TRELLIS and Tencent's Hunyuan3D-2 run on your own GPU. The demos look great. Then you drop the result into a real Unity scene and the frame rate halves, the lighting looks wrong, and the asset is twenty times bigger than the hand-made props next to it.
The generators are fine. What is missing is a pipeline between the generator and the engine. This is the one I use.
What a generator actually gives you
A raw AI mesh usually arrives as a GLB file with these problems:
| Problem | Why it hurts in Unity |
|---|---|
| 100k to 500k+ triangles for a simple prop | Vertex cost, shadow cost, bigger builds |
| Triangle soup from remeshing, no clean topology | Bad deformation, ugly normals, hard to edit |
| One 2K to 4K texture with lighting baked into the colour | Looks wrong under your scene lights |
| Random scale and pivot | A chair 40 metres tall, rotating around its corner |
| Messy or automatic UVs | Seams, texture stretching, poor texel density |
| Hidden faces and floating fragments | Wasted triangles, broken colliders |
Step 1: set a budget before you generate
Decide what the asset is allowed to cost. Rough budgets I use for a mid-range PC or console target:
| Asset type | Triangles (LOD0) | Textures |
|---|---|---|
| Small prop (cup, book) | 500 to 2,000 | 512 px |
| Medium prop (chair, crate) | 2,000 to 8,000 | 1K |
| Hero prop, close to camera | 10,000 to 30,000 | 2K |
| Background or distant | 200 to 1,000 | 256 to 512 px |
On mobile, divide by two or three. The point is that the number exists before the asset does.
Step 2: clean up in Blender
Import the GLB into Blender and run the same steps every time:
- Fix scale and orientation. One Unity unit is one metre. Set the real size, apply the transforms, and put the pivot where the object touches the ground.
- Delete junk. Remove loose parts and floating fragments, merge by distance, and delete faces nobody will ever see, such as the underside of a table on the floor.
- Reduce triangles. For props, the Decimate modifier (collapse mode) down to your budget is usually enough. For anything that animates, or anything you will edit later, retopologize or use a quad remesher instead.
- Recalculate normals and set smoothing (Shade Auto Smooth) so the low-poly mesh does not look faceted.
- Bake the detail back. Bake a normal map from the original high-poly mesh onto the reduced one. This is how a 3,000-triangle chair still looks like the 300,000-triangle original.
- Fix the textures. Remove baked-in shadows from the colour map where you can (some generators can output separate PBR maps; ask for them), and resize to your budget.
- Export as FBX, or as GLB for the glTFast importer.
Script this with Blender's Python API once you have done it by hand three times. Then cleanup becomes one command instead of ten minutes of clicking.
Step 3: import settings in Unity
- Mesh: turn Read/Write off unless a script needs the vertex data (it doubles the memory). Enable mesh compression for background assets. Generate lightmap UVs if the object is static and lightmapped.
- Materials: remap to your project's shaders (URP Lit or HDRP Lit) instead of keeping the imported ones, so the asset reacts to light like the rest of the scene.
- Textures: set the max size to your budget, use your platform's compressed format, and mark normal maps as Normal Map.
- LODs: add a LOD Group with two or three levels (for example 100%, 40% and 10% of the triangles), plus culling at a sensible screen size.
- Colliders: never use the AI mesh as a Mesh Collider. Use boxes, capsules or a simple convex hull.
- Static objects: mark them static for batching and occlusion. For many copies of one object, enable GPU instancing on the material.
Step 4: keep the art style consistent
Performance is only half the problem. Generated assets often look like they came from a different game, because they did. Some fixes that help:
- Use the same image reference or style prompt for the whole set, and generate from your own concept art rather than from text alone.
- Repaint or re-texture in your palette. A shared texture atlas or trim sheet makes props look like a family.
- Match texel density to your hand-made assets, so nothing looks blurrier or sharper than its neighbours.
- Check in context, in the actual scene lighting, not on a grey background.
Step 5: measure, do not guess
After importing a batch, open the Profiler and the Frame Debugger and compare against the scene before. Watch frame time, triangle count, draw calls (SetPass calls), texture memory and the build size. If one asset moves any of those noticeably, it goes back through step 2.
Local generators: one more budget
Running TRELLIS or Hunyuan3D-2 locally is great for privacy and cost, but it needs a lot of GPU memory. Run it as a separate offline step, not inside the editor session where Unity and the generator fight over VRAM. I keep a small queue: generate overnight, clean up with the Blender script in the morning, then import.
Licences
Read the terms. Cloud services differ on commercial use, especially on free plans, and some open models have their own licence conditions. Keep a note of where every generated asset came from. You will want it when someone asks.
AI generators save real time on blockout and background props. They do not replace the cleanup step; they move the work from modelling to optimization. Treat every generated mesh as a first draft with a budget, and your scene will keep both its frame rate and its look.