Skip to content
Littlewolf Labs News

Free image-to-3D pipeline

A free, local image-to-3D pipeline for game assets: TRELLIS.2 or Hunyuan3D-2.1, Blender, then Unreal, Unity or Godot (October 2026)

Turn one picture into a textured 3D model on your own PC, clean it up in Blender and drop it into your game engine, with no subscription. What hardware you really need, the exact commands, and the licence catches. Checked October 18, 2026.

A laptop running Blender with a robot character model, at a game jam

Blender at a game jam. Photo “Blender 3D modelling at Game Jam” by I G, CC BY 2.0, via Wikimedia Commons (cropped).

Paid tools like Meshy and Tripo turn a picture into a 3D model in a browser (we compare them in Image-to-3D in October 2026). You can do the same on your own computer for free with open models, then tidy the result in Blender and import it into Unreal Engine, Unity or Godot. The software is free. The catch is the graphics card, and the licences have fine print you should read before you sell anything.

This guide walks through the whole chain:

  1. Image → 3D model with TRELLIS.2 (Microsoft) or Hunyuan3D-2.1 (Tencent).
  2. Cleanup in Blender: fix scale and rotation, merge loose vertices, cut the polygon count.
  3. Import into your engine as glTF (.glb), or FBX for Unity if you prefer.

Be honest about your hardware first

These numbers come straight from each project's own README. We haven't benchmarked them.

TRELLIS.2Hunyuan3D-2.1
GPU memory (VRAM)NVIDIA GPU with at least 24 GB "is necessary" (README)10 GB for shape only, 21 GB for texture, 29 GB for both (README)
Tested onNVIDIA A100 and H100 (data-centre cards)Not stated; tested with Python 3.10 and PyTorch 2.5.1 + CUDA 12.4
Operating system"Currently tested only on Linux"README says macOS, Windows and Linux (Mac support not verified as of Oct 18, 2026)
CUDACUDA Toolkit 12.4 recommendedInstall uses PyTorch wheels built for CUDA 12.4
Model size4B parameters (Hugging Face)3.3B (shape) + 2B (texture)

In plain terms:

  • TRELLIS.2 needs a 24 GB NVIDIA card. Among consumer cards, that means something like a GeForce RTX 3090, 4090 or 5090. A 16 GB card doesn't meet the stated minimum.
  • Hunyuan3D-2.1 can make an untextured shape on a 10 GB card. Getting textures too needs 21 GB on its own, or 29 GB to run both in one go. A --low_vram_mode option exists in its demo app, but the README doesn't say how much it saves.
  • No suitable GPU? Both projects have hosted demos on Hugging Face (TRELLIS.2, Hunyuan3D-2.1). These run on someone else's machine, so they aren't local, and availability can vary. You can still do the Blender and engine steps on any ordinary PC.
  • Blender and the engines run on normal hardware. We did the Blender cleanup and the Godot import below on a Linux machine with no graphics card at all.

Read the licences before you ship

  • TRELLIS.2 is MIT-licensed, model and code (README). However, the README notes that some dependencies have their own terms. One of them, NVIDIA's nvdiffrast, says it "may be used or intended for use non-commercially", which it defines as "for research or evaluation purposes only". It's used in TRELLIS.2's GLB export step. Whether that limits what you can do with the models you make is a legal question we can't answer; check before commercial use.
  • Hunyuan3D-2.1 uses the Tencent Hunyuan 3D 2.1 Community License. It "does not apply in the European Union, United Kingdom and South Korea", and use outside its territory isn't licensed. If your products had more than 1 million monthly active users when the model came out, you must ask Tencent for a licence (LICENSE).
  • Blender is free and open source (GPL). Its licence page says the work you create with it is yours (Blender licence).

Step-by-step

1. Prepare your image

Use one object, seen clearly, on a plain or transparent background. Both projects' sample inputs look like this: TRELLIS.2's example (assets/example_image/T.png) and Hunyuan3D-2.1's (assets/demo.png) are each a single object on a transparent background. Front or three-quarter views of props, characters or furniture make good tests.

If you generate the picture with an AI image tool, a prompt like this gets a usable input:

A single stylised wooden treasure chest with iron bands, three-quarter view, centred, full object in frame, soft even studio lighting, plain white background, no shadows, no text.

2a. Generate the 3D model with TRELLIS.2 (24 GB NVIDIA, Linux)

From the TRELLIS.2 README:

git clone -b main https://github.com/microsoft/TRELLIS.2.git --recursive
cd TRELLIS.2
. ./setup.sh --new-env --basic --flash-attn --nvdiffrast --nvdiffrec --cumesh --o-voxel --flexgemm

This creates a conda environment called trellis2 with PyTorch 2.6.0 and CUDA 12.4. If you have more than one CUDA version installed, set CUDA_HOME first, for example export CUDA_HOME=/usr/local/cuda-12.4. On GPUs that don't support flash-attn (the README names the V100), install xformers and set ATTN_BACKEND=xformers. Installation "may take a while".

The easiest way to use it is the web demo:

python app.py

Then open the address shown in your terminal, upload your image and download the .glb.

For a scripted run, the README's example.py loads microsoft/TRELLIS.2-4B, runs your image and exports a GLB. These are the key export settings from that example:

glb = o_voxel.postprocess.to_glb(
    vertices=mesh.vertices, faces=mesh.faces, attr_volume=mesh.attrs,
    coords=mesh.coords, attr_layout=mesh.layout, voxel_size=mesh.voxel_size,
    aabb=[[-0.5, -0.5, -0.5], [0.5, 0.5, 0.5]],
    decimation_target=1000000,   # target face count
    texture_size=4096,           # texture resolution in pixels
    remesh=True, remesh_band=1, remesh_project=0, verbose=True
)
glb.export("sample.glb", extension_webp=True)

decimation_target=1000000 means the stock example aims for about a million faces, which is far too heavy for most game props. That's why step 3 exists. You can also lower decimation_target and texture_size here.

One gotcha from the README: the .glb exports in OPAQUE mode. Transparency is kept in the texture's alpha channel but switched off, so you have to connect the alpha yourself in Blender or your engine.

2b. Or generate it with Hunyuan3D-2.1 (10 GB for shape, 29 GB for shape and texture)

From the Hunyuan3D-2.1 README:

git clone https://github.com/Tencent-Hunyuan/Hunyuan3D-2.1.git
cd Hunyuan3D-2.1
pip install torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 --index-url https://download.pytorch.org/whl/cu124
pip install -r requirements.txt

cd hy3dpaint/custom_rasterizer
pip install -e .
cd ../..
cd hy3dpaint/DifferentiableRenderer
bash compile_mesh_painter.sh
cd ../..

wget https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.0/RealESRGAN_x4plus.pth -P hy3dpaint/ckpt

Then start the local web app:

python3 gradio_app.py \
  --model_path tencent/Hunyuan3D-2.1 \
  --subfolder hunyuan3d-dit-v2-1 \
  --texgen_model_path tencent/Hunyuan3D-2.1 \
  --low_vram_mode

Upload your image, generate, and export. The app's export formats are glb, obj, ply and stl (gradio_app.py); choose glb.

3. Clean it up in Blender

Use Blender 5.2 (5.2.2 is the current LTS release; 5.3 is in beta, with release planned for November 10). By hand, the steps are:

  1. File → Import → glTF 2.0 (.glb/.gltf) and pick your file (Blender manual).
  2. Select the model and use Object → Apply → Rotation & Scale, so the engine sees a scale of 1 and no leftover rotation (manual).
  3. In Edit Mode, select all and run Mesh → Clean Up → Merge by Distance to weld duplicate vertices (manual).
  4. Add a Decimate modifier (Collapse mode) and lower Ratio. 0.5 keeps about half the faces. Apply it when you're happy with the look (manual).
  5. File → Export → glTF 2.0 (choose .glb), or File → Export → FBX for Unity's FBX workflow (FBX manual).

Or run it as a script. We wrote this one and tested it with Blender 5.2.2 in background mode (no window), using the command-line -b and --python options:

# cleanup.py: headless cleanup for an AI-generated .glb
# Usage: blender -b --python cleanup.py -- input.glb output_name 0.5
import bpy, sys
argv = sys.argv[sys.argv.index("--") + 1:]
src, out, ratio = argv[0], argv[1], float(argv[2])

bpy.ops.wm.read_factory_settings(use_empty=True)
bpy.ops.import_scene.gltf(filepath=src)

meshes = [o for o in bpy.context.scene.objects if o.type == 'MESH']
before = sum(len(o.data.polygons) for o in meshes)
for o in meshes:
    bpy.context.view_layer.objects.active = o
    o.select_set(True)
bpy.ops.object.transform_apply(location=False, rotation=True, scale=True)
for o in meshes:
    bpy.context.view_layer.objects.active = o
    bpy.ops.object.mode_set(mode='EDIT')
    bpy.ops.mesh.select_all(action='SELECT')
    bpy.ops.mesh.remove_doubles(threshold=0.0001)      # Merge by Distance
    bpy.ops.mesh.normals_make_consistent(inside=False)  # fix flipped normals
    bpy.ops.object.mode_set(mode='OBJECT')
    m = o.modifiers.new("Decimate", 'DECIMATE')
    m.decimate_type = 'COLLAPSE'
    m.ratio = ratio
    bpy.ops.object.modifier_apply(modifier=m.name)
after = sum(len(o.data.polygons) for o in meshes)
print(f"FACES before={before} after={after}")

bpy.ops.export_scene.gltf(filepath=out + ".glb", export_format='GLB')
bpy.ops.export_scene.fbx(filepath=out + ".fbx", path_mode='COPY',
                         embed_textures=True, apply_scale_options='FBX_SCALE_ALL')

Run it:

blender -b --python cleanup.py -- model.glb model_clean 0.5

On our test with a free sample model (the Khronos "AntiqueCamera", CC0), it reported FACES before=20066 after=10031 and wrote both model_clean.glb and model_clean.fbx in a few seconds. Our test model came from a modelling program, not an AI generator, so expect AI output to need more work.

Want an AI agent to do this part? If you use Claude Code, Codex or Cursor in the same folder, try:

Run blender -b --python cleanup.py -- chest.glb chest_clean 0.3 and tell me the face counts before and after. If the result is above 20,000 faces, run it again with a lower ratio. Don't overwrite chest.glb.

Blender also has MCP servers that let an agent drive the Blender window itself. We'll cover those separately; the script above works with any agent that can run a terminal command.

4. Import into your engine

Godot 4.7. Godot imports glTF 2.0 natively and calls it the recommended format (Godot docs). Copy the .glb into your project folder and Godot imports it when the editor gets focus. Drag it into a scene to use it. We tested this with Godot 4.7.2: the cleaned file imported as a scene with its textures. The Godot docs also note that Blender exports materials with backface culling off. To get Godot's culling back, tick Backface Culling in Blender's material settings before you export.

Unity 6. Unity reads FBX out of the box: drop model_clean.fbx into your Assets folder (Unity FBX importer). For .glb, install Unity's glTFast package: Window → Package Manager → + → Install package by technical name…, enter com.unity.cloud.gltfast, then click Install (glTFast docs). The newest stable version on October 18 was 6.20.0 (August 27, 2026). After that, .glb files you copy into Assets import as prefabs (glTFast import docs).

Unreal Engine 5.8. Unreal imports glTF through its Interchange framework, which is on by default. Import the file from the Content Drawer or Content Browser, or use File → Import Into Level (which, the docs say, currently works only with glTF and MaterialX). Choose a pipeline stack in the window that opens and click Import (Epic docs).

If you have an AI agent connected to your engine (see our Unity and Godot and Roblox setup guides, and the Unreal MCP guide), you can hand it the last step:

Import chest_clean.glb from the project folder, place it at the origin of the open scene, add a light so it's visible, and show me the scene tree.

Optional: texture inside Blender with StableGen (Unofficial)

StableGen is a community Blender add-on (GPL-3.0, Unofficial) that drives ComfyUI to texture models inside Blender and, since v0.3.1 (June 12, 2026), includes a TRELLIS.2 node. Its listed Blender support is 4.2–4.5 and 5.1+, not 5.0. It still needs a capable GPU for ComfyUI, and we haven't tested it.

Try it

  1. Check your GPU: TRELLIS.2 needs a 24 GB NVIDIA card; Hunyuan3D-2.1 needs 10 GB for shape only and 29 GB for shape plus texture. No card? Try the Hugging Face demos instead.
  2. Generate a .glb from a single-object image with TRELLIS.2 (python app.py) or Hunyuan3D-2.1 (python3 gradio_app.py … --low_vram_mode).
  3. Clean it with Blender 5.2: blender -b --python cleanup.py -- model.glb model_clean 0.5.
  4. Drop model_clean.glb into Godot, or into Unity with glTFast (or use the .fbx), or import it into Unreal 5.8 through the Content Browser.
  5. Before selling anything, re-read the nvdiffrast and Hunyuan3D-2.1 licence terms.