Free

TRELLIS.2: generate a textured 3D model from an image

Generate a first 3D model with materials from an object image using TRELLIS.2. Check runtime requirements, shape and suitability for your scene.

Tools

Open demo · Installation instructions · Download source code (ZIP)

TRELLIS.2 generates a 3D model with materials from an image of an object. Use it for a prototype, game asset or 3D illustration that you can open in a modelling tool or place in a website scene.

Tool features

This is a generative model from Microsoft, not a Codex plugin. It builds shape and surface properties such as colour, roughness and transparency. The official example exports GLB, a file format for moving 3D models between applications.

The model infers unseen surfaces. Rotate the result and compare it with extra photographs: backs, small lettering and thin parts may need correction. A technically accurate replica requires a different measurement and modelling process.

Image to Three.js approaches a similar task differently: the assistant writes scene code. Choose TRELLIS.2 when you need a model file, and the code route when separate controllable parts and later code editing matter.

Where to run it and installation requirements

Start with the official demo. Before uploading, check whether it is available, whether sign-in is needed and how the service handles your files. Use your own non-sensitive image for a first test. A queue or unavailable demo does not establish that the model runs on your computer.

The documented local installation is tested on Linux with an NVIDIA GPU with at least 24 GB of VRAM. Mac memory does not replace that NVIDIA requirement. It needs Python 3.8 or newer and the CUDA Toolkit; the authors recommend CUDA 12.4 and Conda. Download the TRELLIS.2-4B weights separately from the source code.

After checking the machine and approving installation, the official route is:

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 the trellis2 environment and installs dependencies. It is not a universal laptop installer. Have the assistant read setup.sh and check hardware, compatibility and free space first. GPU rental, weight downloads and paid runs require separate approval. README timings use server hardware and do not describe your laptop.

How to generate and check your first model

  1. Choose your own image of one clearly visible object and explain the purpose, such as a 3D website illustration. Agree on acceptable simplification and a route: the demo or a suitable GPU machine.
  2. Ask the assistant to perform the available steps through that route. For local use, it follows the official example, finds your image and saves exports separately from the source. You handle required sign-in and cost approval.
  3. Open the GLB, rotate it and check shape, materials, transparency and file size. Compare several views before moving it into an editor or website.

In the official example, material transparency is not enabled by default even when the texture has an alpha channel. If glass or cutouts look opaque, check the imported material mode. A completed export alone does not prove that another application renders it correctly.

Where it fits in a guide

Use it at the useful 3D object stage of interface design. A model is useful when rotation helps someone inspect the object, not as a mandatory background for every website.

Three.js Skills can help load an existing GLB into a scene and set up cameras, lighting and controls. For websites, also check file size, mobile loading and a normal image fallback when 3D is unavailable.

A first test produces a checked model and the saved reference. Website deployment, model optimisation and exact manufacturing geometry are separate from generation itself.

How to troubleshoot and remove an installation

If a local run fails to start, check the NVIDIA GPU, VRAM, driver, CUDA and active environment first. Repeating installation does not fix missing hardware. Use the demo for an initial introduction if appropriate.

For a strange result, simplify the reference to one unobstructed object. Compare several views, then correct the required part in an editor. For a heavy GLB, reduce geometry and texture size separately and inspect the appearance again.

Test updates on a separate example first. Before removal, ask the assistant to locate the environment, weights and exports, show its plan and preserve your models. Remove only data belonging to that installation; shared caches may serve other projects. The code uses MIT; check the model weights and dependency terms on their own pages.

Prompt for a model from an image

Paste this into Codex or Work and attach your image. The assistant chooses an executable route, prepares the run and checks the result using available tools.

Find my attached image and project materials. Help me generate a 3D model with the official TRELLIS.2 for an editor or website. First agree on its purpose and acceptable simplifications. Check the official demo and available hardware; local use needs Linux and NVIDIA with at least 24 GB of VRAM. Do not install dependencies, download weights, rent a GPU or upload my image to an external service without agreement.
Suggest a suitable route and explain the required actions. After approval, perform the available steps and save the source image and GLB export separately. Do not treat sign-in or an open webpage as completed generation.
Open the model in an available viewer and check several views, materials, transparency and file size. If inspection is unavailable, explain what still needs checking. For a website, check desktop and mobile loading, controls and an image fallback. Show differences from the reference and fix accessible problems. Do not publish without my request.
In This Article
Saved