Skip to content

About

[ECCV 2026] It's the official repository of "Interact3D: Compositional 3D Generation of Interactive Objects".

Topics

Resources

Stars

56 stars

Watchers

1 watching

Forks

Latest commit

Β 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Interact3D: Compositional 3D Generation of Interactive Objects

arXiv 2603.16085 Hugging Face Dataset

Interact3D Teaser

Interact3D generates collision-aware compositional 3D assets from a natural-language scene prompt. The pipeline first creates a compositional image and isolated object images, reconstructs them with TRELLIS.2, separates object-level guidance with PartField, and finally registers the generated objects into a physically plausible 3D scene.


✨ What is included

  • Single-sample inference: prompt β†’ images β†’ GLBs β†’ registered scene.

  • Batch inference: resumable processing over data/data.json.

  • Optional Agent Optimization: optional VLM-guided retry when registration reports severe residual penetration.

  • Optional Multi-object extension: sequentially add more objects to an existing registered scene.

  • Optional MuJoCo preview export: lightweight MJCF scene for manual interaction/inspection.


🧩 Repository layout

run_image_generation.py          # Stage 1: scene/object image generation via Gemini API
run_trellis2_generation.py       # Stage 2: image-to-3D with TRELLIS.2
run_partfield_segmentation.py    # Stage 3: PartField grouping into guidance meshes
run_registration.py              # Stage 4: registration + collision refinement
run_agent_optimization.py/.sh    # Stage 5: optional retry loop for failed registrations
run_multiobject_composition.sh   # Optional: sequential 3+ object composition
convert_to_mujoco.py             # Optional: MuJoCo MJCF preview exporter
run_batch.sh                     # Batch runner over data/data.json

πŸš€ Quick start

1. Install environments

This repo intentionally reuses the original environments of PartField and TRELLIS.2 instead of forcing a single merged environment. This matches how run_batch.sh, run_agent_optimization.sh, and run_multiobject_composition.sh call the code: Stage 2 runs in the TRELLIS.2 env, while Stage 1/3/4/5 run in the PartField env.

Env Default name Used for
PartField env partfield Gemini image stage, PartField segmentation, GeoTransformer registration, Agent Optimization, MuJoCo utility
TRELLIS.2 env trellis2 Image-to-3D reconstruction

Install them following the upstream repos first:

# PartField: create/install the env as required by the official PartField repo.
git clone https://github.com/nv-tlabs/PartField.git

# TRELLIS.2: create/install the env as required by the official TRELLIS.2 repo.
git clone -b main https://github.com/microsoft/TRELLIS.2.git --recursive

Then install this repo's lightweight Python dependencies into the PartField env:

conda run --no-capture-output -n partfield pip install -r requirements.txt

If your TRELLIS.2 env does not already include Pillow, install it there too:

conda run --no-capture-output -n trellis2 pip install Pillow

2. Install GeoTransformer in the PartField env

GeoTransformer is used by Stage 4 for optional global registration initialization.

git clone https://github.com/qinzheng93/GeoTransformer.git
cd GeoTransformer
conda run --no-capture-output -n partfield pip install -r requirements.txt
conda run --no-capture-output -n partfield python setup.py build develop
mkdir -p weights
# Put geotransformer-3dmatch.pth.tar under GeoTransformer/weights/.
cd -

Expected checkpoint path:

GeoTransformer/weights/geotransformer-3dmatch.pth.tar

3. Prepare PartField checkpoint and Blender

Place the official PartField checkpoint at:

PartField/model/model_objaverse.ckpt

Blender is used by Stage 3 to render part contact sheets. If blender is not available, download a local copy and export BLENDER:

mkdir -p third_party
cd third_party
wget https://download.blender.org/release/Blender4.3/blender-4.3.2-linux-x64.tar.xz
tar -xf blender-4.3.2-linux-x64.tar.xz
cd -
export BLENDER="$PWD/third_party/blender-4.3.2-linux-x64/blender"
$BLENDER -b --version

4. Configure Gemini API and paths

Set a Gemini API key before running stages that use LLM/VLM/image generation. The shell runners use conda run internally, so you do not need to manually switch envs during batch/multi-object/agent runs.

export GEMINI_API_KEY="<your_gemini_api_key>"

export PARTFIELD_ENV=partfield
export TRELLIS2_ENV=trellis2
export TRELLIS2_DIR=TRELLIS.2
export PARTFIELD_DIR=PartField
export GEOTRANSFORMER_DIR=GeoTransformer
export GEOTRANSFORMER_WEIGHTS=GeoTransformer/weights/geotransformer-3dmatch.pth.tar
export BLENDER="$PWD/third_party/blender-4.3.2-linux-x64/blender"

# Optional model overrides used by the shell runners.
export INTERACT3D_GEMINI_TEXT_MODEL=gemini-3.5-flash
export INTERACT3D_GEMINI_VISION_MODEL=gemini-3.5-flash
export INTERACT3D_GEMINI_IMAGE_MODEL=gemini-3-pro-image

πŸ§ͺ Single-sample pipeline

Use conda run to match the stage-specific environments used by the batch scripts.

Stage 1 β€” Generate images

conda run --no-capture-output -n partfield python run_image_generation.py \
  --scene-prompt "A ripe lemon is nestled in a picnic basket, fresh from the market." \
  --outputs-root outputs \
  --category "food" \
  --gemini-text-model "${INTERACT3D_GEMINI_TEXT_MODEL:-gemini-3.5-flash}" \
  --gemini-image-model "${INTERACT3D_GEMINI_IMAGE_MODEL:-gemini-3-pro-image}"

The script prints the sample directory as the final stdout line, e.g.:

outputs/food/00001_lemon_picnic_basket

Key outputs:

compositional_scene.png
object_a.png
object_b.png
metadata.json

Stage 2 β€” Reconstruct GLBs with TRELLIS.2

conda run --no-capture-output -n trellis2 python run_trellis2_generation.py \
  --input-dir <sample_dir> \
  --trellis2-dir TRELLIS.2

Key outputs:

compositional_scene.glb
object_a.glb
object_b.glb

Existing .glb files are skipped unless --overwrite is passed.

Stage 3 β€” Build guidance meshes with PartField

conda run --no-capture-output -n partfield python run_partfield_segmentation.py \
  --input-dir <sample_dir> \
  --partfield-dir PartField \
  --blender "$BLENDER" \
  --gemini-vision-model "${INTERACT3D_GEMINI_VISION_MODEL:-gemini-3.5-flash}"

Key outputs:

guidance_object_a.glb
guidance_object_b.glb

Temporary PartField folders are removed by default. Use --keep-intermediates for debugging.

Stage 4 β€” Register objects into a scene

conda run --no-capture-output -n partfield python run_registration.py \
  --input-dir <sample_dir> \
  --geotransformer-dir GeoTransformer \
  --geotransformer-weights GeoTransformer/weights/geotransformer-3dmatch.pth.tar

Key output:

registered_scene.glb

metadata.json records the selected anchor, object transforms, collision refinement details, and registration.status. The transform convention is:

p_world = scale * R @ p_local + t

πŸ€– Optional Agent Optimization

If Stage 4 writes registration.status = "failure", the residual penetration exceeded the configured threshold. Agent Optimization keeps the anchor object fixed, regenerates only the moving object/scene images, then reruns Stage 2-4. For cost control, this step is manual and is not invoked by run_batch.sh.

AGENT_OPTIMIZATION_ITERS=2 ./run_agent_optimization.sh <sample_dir>

🏭 Batch inference

run_batch.sh is the cost-conscious batch runner used for dataset production. It runs Stage 1-4 only:

image generation -> TRELLIS.2 -> PartField -> registration

It does not run Agent Optimization automatically. This keeps large-scale generation cheaper; if a sample has registration.status = "failure", inspect it later and optionally launch run_agent_optimization.sh on that sample only.

By default, the script reads DATA_JSON=${DATA_JSON:-data/data.json}.

{
  "00001": {
    "category": "food",
    "prompt": "A ripe lemon is nestled in a picnic basket, fresh from the market."
  }
}

Run a batch:

DATA_JSON=data/data.json ./run_batch.sh

Batch runs are resumable:

outputs/.batch_state/    # completion markers and machine-scoped summaries
outputs/.batch_logs/     # per-item logs

βž• Multi-object composition

For scenes with three or more objects, start from a completed sample containing registered_scene.glb, then add objects sequentially with a tab-separated plan:

napkin	A folded napkin lies beside the picnic basket and lemon, with a visible gap and no intersection.
small jam jar	A small jam jar stands behind the picnic basket, fully supported by a flat base.

Run:

./run_multiobject_composition.sh <sample_dir> additions.tsv

Outputs are written under:

<sample_dir>/multiobject/step_XX_<object_name>/

Enable per-step Agent Optimization if needed:

MULTIOBJECT_AGENT_ITERS=2 ./run_multiobject_composition.sh <sample_dir> additions.tsv

πŸ•ΉοΈ Optional MuJoCo preview export

To convert a registered two-object sample into a compact MJCF preview scene with separate MuJoCo bodies and preserved visual textures. We can use:

conda run --no-capture-output -n partfield python convert_to_mujoco.py \
  --input-dir <sample_dir>

Outputs:

<sample_dir>/mujoco/scene.xml
<sample_dir>/mujoco/meshes/

Default behavior is designed for manual interaction in the MuJoCo viewer:

  • zero gravity;
  • no floor;
  • contacts disabled;
  • both objects have freejoint and stay still until manipulated.

Useful variants:

# Only object_a is movable; object_b is fixed.
conda run --no-capture-output -n partfield python convert_to_mujoco.py \
  --input-dir <sample_dir> \
  --dynamic-object object_a

# Physical preview with gravity, floor, and contacts.
conda run --no-capture-output -n partfield python convert_to_mujoco.py \
  --input-dir <sample_dir> \
  --dynamic-object object_a \
  --include-floor \
  --enable-contact \
  --gravity 0 0 -9.81

πŸ–ΌοΈ Qualitative results

Two-part composition

Interact3D TwoPart

Multi-object composition

Interact3D ManyPart

Interact3D ManyPart


πŸ™ Acknowledgements

This repository builds on several excellent open-source projects. We sincerely thank their authors and contributors:

Please also follow the licenses and terms of the upstream projects, checkpoints, and external tools when using or redistributing this code.


πŸ“œ Citation

If you find this repository useful, please cite:

@article{shan2026interact3d,
  title={Interact3D: Compositional 3D Generation of Interactive Objects},
  author={Shan, Hui and Luo, Keyang and Li, Ming and Zheng, Sizhe and Fu, Yanwei and Chen, Zhen and Huang, Xiangru},
  journal={arXiv preprint arXiv:2603.16085},
  year={2026}
}

About

[ECCV 2026] It's the official repository of "Interact3D: Compositional 3D Generation of Interactive Objects".

Topics

Resources

Stars

56 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages