Quick Navigation
- The Export Pipeline Overview
- Understanding TRELLIS 2's PBR Output
- glTF vs FBX: Which Format to Choose
- Fixing UV Mapping After Generation
- Draco Compression for Web Deployment
- Quick Export Script for Blender
- Importing into Unity
- Importing into Unreal Engine
- Importing into Godot
- Frequently Asked Questions
The Export Pipeline Overview
TRELLIS 2 outputs production-ready PBR models — but "production-ready" in the AI generation sense still requires a small pipeline to get into your game engine. The complete workflow looks like this:
TRELLIS 2 Output (.glb/.obj + PBR textures)
│
▼
Post-processing (UV fix, decimate if needed)
│
▼
Export to glTF 2.0 or FBX
│
▼
Game Engine Import (Unity / Unreal / Godot)The good news: TRELLIS 2 generates clean topology and correct PBR material channels. Most of the work is routing those assets into your engine of choice with the right settings.
Understanding TRELLIS 2's PBR Output
When TRELLIS 2 finishes generating, you get a mesh plus a set of texture maps:
| Texture Channel | What It Controls | Game Engine Mapping |
|---|---|---|
| Albedo / Base Color | Color without lighting | Albedo (Unity/Unreal), Base Color (Godot) |
| Metallic | Metal vs non-metal regions | Metallic |
| Roughness | Surface smoothness/glossiness | Roughness |
| Normal | Surface detail bumps | Normal Map |
| AO (Ambient Occlusion) | Soft shadow contact areas | Ambient Occlusion |
TRELLIS 2 outputs these as separate image files (usually PNG or EXR), not baked into the mesh. This is actually ideal — you can adjust roughness and metallic values directly in the engine without re-exporting.
One key thing to know: the base color map often has baked-in shadows from the original lighting in the generation stage. For game use, you may want to pull the brightness up slightly and let the engine's real-time lights handle shadowing.
glTF vs FBX: Which Format to Choose
This is the most common question, and the answer is almost always glTF 2.0 (.glb binary form) unless you have a specific reason to use FBX.
Why glTF wins for TRELLIS 2 output:
- Native PBR support — glTF was designed for PBR materials from the ground up. TRELLIS 2's material channels map directly to glTF's material model with zero conversion loss.
- Embedded or external textures — .glb bundles everything into one file; .gltf keeps textures separate. Both work.
- Web-native — If you're building a Three.js viewer or WebGL experience, glTF is the only sane choice.
- Open standard — No licensing friction, no format version surprises.
- Draco compression — glTF supports Draco mesh compression out of the box (more on this below).
When to use FBX instead:
- Unreal Engine skeleton/animation rigs — FBX has deeper support for skeletal animation import in Unreal. If your TRELLIS 2 model needs to be rigged, go FBX.
- Legacy pipeline — Some studios have internal tooling locked to FBX.
- Cross-platform asset bundles — Unity's FBX importer has more tuning knobs for mesh optimization.
Recommendation: Start with glTF. Switch to FBX only when you hit a specific limitation.
Fixing UV Mapping After Generation
AI-generated models can have UV seams that aren't ideal for game tiling or atlas layout. Here's what to check and fix in Blender (or any 3D DCC):
Common UV Issues with TRELLIS 2 Output
- Seams on curved surfaces — If a pipe or rounded object has a UV seam cutting across the most visible face, re-seam in the UV editor.
- Overlapping UV islands — Rare but happens with complex lattice structures. Unwrap and pack UVs again.
- Non-square UV layouts — Game engines prefer square UV tiles. Scale non-square islands to fit.
Quick UV Fix Workflow in Blender
1. Import the .glb/.obj from TRELLIS 2
2. Enter Edit Mode → select all faces (A)
3. Smart UV Project (U → Smart UV Project) with an island margin of 0.02–0.05
4. Check for overlaps in the UV editor
5. If the model is low-poly enough, try regular UV Unwrap (U → Unwrap)
6. Export back to glTF with "Apply Modifiers" disabled (keep it clean)For models with thin-walled structures (TRELLIS 2's specialty), pay special attention to the interior UVs. Some engines cull backfaces by default — but if you need double-sided rendering (hollow objects seen from inside), enable that in your engine's material settings.
Draco Compression for Web Deployment
If your goal is web-based 3D — Three.js viewers, model previews on your site, WebGL experiences — Draco compression is essential. A typical TRELLIS 2 model can go from 15MB down to 1–2MB with Draco.
What Draco Does
Draco is a mesh compression format developed by Google and used natively in glTF 2.0. It compresses:
- Vertex positions and normals
- Texture coordinate indices
- Metadata
It does not compress textures — those stay as PNG/JPEG. But mesh geometry is usually the bulk of the file size for AI-generated models, so the savings are significant.
Enabling Draco in glTF Export
Most DCC tools support glTF export with Draco. In Blender:
- File → Export → glTF 2.0 (.glb/.gltf)
- Under Geometry section: enable Apply Modifiers
- Under Compression section: check Draco mesh compression
- Set compression level (10 = maximum, but slower; 6–8 is usually fine)
In Blender's glTF exporter, the UI looks like this:
┌─────────────────────────────────┐
│ Export glTF 2.0 │
│ │
│ ┌ Geometry ─────────────────┐ │
│ │ ✓ Apply Modifiers │ │
│ │ ✓ UVs │ │
│ │ ✓ Normals │ │
│ └────────────────────────────┘ │
│ │
│ ┌ Compression ──────────────┐ │
│ │ ✓ Enable Draco │ │
│ │ Compression Level: [8] │ │
│ └────────────────────────────┘ │
└─────────────────────────────────┘Loading Draco-compressed glTF in Three.js
Three.js has built-in Draco support:
import * as THREE from 'three';
import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
import { DRACOLoader } from 'three/addons/loaders/DRACOLoader.js';
// Set up Draco decoder (uses Google's decoder WASM)
const dracoLoader = new DRACOLoader();
dracoLoader.setDecoderPath('https://www.gstatic.com/draco/versioned/decoders/1.5.6/');
const gltfLoader = new GLTFLoader();
gltfLoader.setDRACOLoader(dracoLoader);
gltfLoader.load('model.glb', (gltf) => {
scene.add(gltf.scene);
});The WASM decoder loads automatically — no server-side setup needed on most hosts.
Quick Export Script for Blender
Here's a Python script you can drop into Blender's Scripting workspace for one-click TRELLIS 2 model prep and export:
import bpy
import os
# ─── Configuration ───────────────────────────────────────
EXPORT_PATH = "/path/to/your/exported_models/"
FORMAT = "GLB" # "GLB", "FBX", "GLTF_SEPARATE"
DRACO = True
SCALE = 1.0 # Blender units → meters (1.0 = true scale)
# ─── Helpers ─────────────────────────────────────────────
def select_only(obj):
bpy.ops.object.select_all(action='DESELECT')
obj.select_set(True)
bpy.context.view_layer.objects.active = obj
def prep_model(obj):
select_only(obj)
bpy.ops.object.transform_apply(location=True, rotation=True, scale=True)
bpy.ops.object.origin_set(type='ORIGIN_CENTER_OF_MASS')
# Triangulate for game engine compatibility
bpy.ops.object.mode_set(mode='EDIT')
bpy.ops.mesh.select_all(action='SELECT')
bpy.ops.mesh.tris_convert()
bpy.ops.object.mode_set(mode='OBJECT')
# ─── Main Export ─────────────────────────────────────────
scene = bpy.context.scene
os.makedirs(EXPORT_PATH, exist_ok=True)
for obj in scene.objects:
if obj.type != 'MESH':
continue
prep_model(obj)
name = obj.name.replace(" ", "_")
filepath = os.path.join(EXPORT_PATH, f"{name}_export")
if FORMAT == "GLB":
bpy.ops.export_scene.gltf(
filepath=filepath + ".glb",
export_format="GLB",
export_draco_compression=DRACO,
export_apply=True,
export_normals=True,
export_texcoords=True,
export_materials="EXPORT",
use_selection=True,
)
elif FORMAT == "FBX":
bpy.ops.export_scene.fbx(
filepath=filepath + ".fbx",
use_selection=True,
apply_scale_all=True,
global_scale=SCALE,
)
print(f"✓ Exported: {name}")
print("✅ Batch export complete!")How to use it:
- Open Blender → Scripting workspace
- Paste the script into the text editor
- Update
EXPORT_PATHto your desired output folder - Hit Run Script — all mesh objects in the scene are exported
Importing into Unity
Step 1: Import the File
Drag your .glb or .fbx file directly into the Unity Project window. Unity will automatically:
- Generate a prefab
- Detect PBR materials and assign them
- Import textures into the correct channels
Step 2: Check Material Settings
After import, click on the imported material in the Project window:
- Set Metallic → drag your metallic map into the Metallic slot, set Smoothness to
From Metallic Map - Set Normal Map → enable it, drag in the normal map
- Set Occlusion → drag in the AO map if available
Step 3: Optimize for Real-time
If the model has >100K triangles, consider:
- In the model's Import Settings → Model tab → Mesh Compression →
High - Use Unity's LOD system if the model will be seen from varying distances
- For mobile targets, set Read/Write Enabled = False to save memory (but re-enable if you need runtime vertex manipulation)
Performance Tip
TRELLIS 2 models can be surprisingly dense (high triangle counts from the generation process). Use Unity's Mesh Simplification package or O3DE's mesh optimization to bring poly counts down without destroying details.
Importing into Unreal Engine
Step 1: Import
File → Import to Level (or drag into Content Browser)
Choose Import as Skeletal only if the model has bones (TRELLIS 2 doesn't generate rigs, but you might add one). Otherwise choose Import as Static Mesh.
Step 2: Material Setup
Double-click the imported material:
- Set Metallic input → plug in your metallic texture
- Set Roughness → plug in roughness (or use the red channel if packed)
- Set Normal → plug in the normal map
Unreal's material editor gives you a visual graph — it's worth five minutes to wire up the maps correctly because the difference in visual quality is dramatic.
Step 3: Enable Double-Sided
For hollow TRELLIS 2 models (pipes, shells, open containers), enable Two Sided in the Static Mesh settings under the Details panel. Otherwise Unreal will cull the interior and the model will look hollow from outside angles — which may be what you want, but usually isn't.
Details panel → Static Mesh Settings → Two Sided → ✓Importing into Godot 4
Godot 4 has excellent glTF support — arguably the smoothest import of the three engines.
Step 1: Drag and Drop
Drag the .glb file into the FileSystem dock. Godot automatically imports it and creates a scene.
Step 2: Material Slots
Click on the imported mesh → Inspect the material slot. Godot will detect PBR channels if they're properly embedded in the glTF. If textures are separate:
- Create a new StandardMaterial3D
- Set
albedo_texture→ base color map - Set
metallic_texture→ metallic map - Set
roughness_texture→ roughness map - Set
normal_texture→ normal map - Set
metallic→ 1.0,roughness→ 1.0 (these become multipliers)
Step 3: UV2 for Lightmaps
If you're baking lightmaps, Godot needs a second UV set. In the mesh import settings:
Import → Mesh → UV2: Generate Lightmap UVs → ✓Frequently Asked Questions
Can TRELLIS 2 export directly to game engine formats?
TRELLIS 2 outputs .glb (binary glTF) and .obj with accompanying PBR texture files. It does not export directly to Unity's .asset or Unreal's .uasset formats — you need a DCC tool like Blender as an intermediate step. This is standard for AI-generated 3D assets across the industry.
Do I need to retopologize TRELLIS 2 models?
In most cases, no — TRELLIS 2 generates clean quad-based topology that's game-ready for most use cases. Retopology is only necessary if you're creating a hero character with hundreds of close-up shots, or if you need exact control over vertex placement for deformation. For environment assets, props, and secondary characters, TRELLIS 2 output typically needs zero retopo work.
Why do my textures look washed out in the game engine?
This usually happens because the base color map was lit/baked under strong directional lighting during generation. In your game engine, bring up the Albedo/Brightness slightly, reduce Ambient Occlusion intensity, and let the real-time lights define the form. Alternatively, in Blender, run the base color through a node setup that boosts midtones and reduces baked shadows before re-exporting.
How do I handle TRELLIS 2 models with extremely high triangle counts?
Use Blender's Decimate modifier (Tab → Edit Mode → Mesh → Clean Up → Decimate Geometry) or export with a lower target ratio. For real-time use, models above 50K–100K triangles should be simplified. Test visual quality at your target LOD distance before finalizing.
Is Draco compression supported in all three game engines?
Directly, no — Draco decompression happens at runtime using a decoder library (Three.js handles this natively for web; Unity needs the Draco Unity package from the Asset Store; Unreal has built-in Draco support in FGLTFImporter). For native desktop/mobile builds, Draco is usually already handled by the engine's importer without any extra work on your part.
Related Posts
- How TRELLIS 2 Works: The Technology Behind AI 3D Generation — Understand the O-Voxel representation and diffusion prior that powers TRELLIS 2's output quality.
- TRELLIS 2: The Complete Installation Guide — Set up TRELLIS 2 on Windows, Mac, or Linux with step-by-step instructions and troubleshooting tips.
- TRELLIS 2 vs. TripoSR vs. Instant3D: The Game-Changer Comparison — How TRELLIS 2's PBR quality and hollow geometry handling stacks up against the competition.
Next Steps
- Generate your first model using the installation guide if you haven't already
- Open it in Blender, run the export script above, and get a clean
.glb - Import into your engine of choice — start with glTF in Godot (it's the most forgiving), then tackle Unity or Unreal once you're comfortable with the workflow
- Test at scale — export a batch of models and see how they look under your game's lighting conditions before committing to a full production pipeline