News

Roblox Releases Cube 3D AI for 3D Mesh Generation

Roblox Releases Cube 3D AI for 3D Mesh Generation

March 20, 2025
Roblox Cube 3D 3D Mesh Generation Generative AI Open Source Text-to-Shape 3D Assets Python API CUDA Hugging Face
Roblox has open-sourced Cube 3D, a generative AI system for text-to-shape 3D mesh generation, providing developers with tools to create 3D assets programmatically.

Roblox Cube 3D Mesh Generation Code Release

Video: Roblox 'Cube' - 3D GenAI Open Sourced at GDC 2025

Roblox has released Cube 3D, a generative AI system designed for 3D intelligence, as part of their open-source initiative. This release includes code and model weights for text-to-shape generation, enabling developers to create 3D assets programmatically. Here’s a breakdown of the key details:

Getting Started with Cube 3D

To begin using Cube 3D, follow these steps:

  1. Clone the Repository: Clone the Cube 3D repository from GitHub using the following command:
    git clone https://github.com/Roblox/cube.git
  2. Install Dependencies: Navigate to the cloned directory and install the required dependencies in a virtual environment:
    cd cube
    pip install -e .[meshlab]

    Note: [meshlab] is optional and can be omitted for better compatibility, but mesh simplification will be disabled.

  3. Install CUDA (if needed): For Windows users, install the CUDA toolkit and PyTorch with CUDA support:
    pip install torch --index-url https://download.pytorch.org/whl/cu124 --force-reinstall
  4. Download Model Weights: Download the pre-trained model weights from Hugging Face:
    huggingface-cli download Roblox/cube3d-v0.1 --local-dir ./model_weights

Generating 3D Meshes

To generate 3D models using the downloaded weights, run the following command:

python -m cube3d.generate \
  --gpt-ckpt-path model_weights/shape_gpt.safetensors \
  --shape-ckpt-path model_weights/shape_tokenizer.safetensors \
  --fast-inference \
  --prompt "Broad-winged flying red dragon, elongated, folded legs."

This will generate an .obj file in the specified output directory. You can also render a turntable GIF of the mesh using the --render-gif flag (requires Blender installed and accessible in your system’s PATH).

Shape Tokenization and De-tokenization

To tokenize a 3D shape and reconstruct it, use the following command:

python -m cube3d.vq_vae_encode_decode \
  --shape-ckpt-path model_weights/shape_tokenizer.safetensors \
  --mesh-path ./outputs/output.obj

This will tokenize the .obj file and print the tokenized representation, as well as export the reconstructed mesh.

Minimalist Python API

Cube 3D also provides a Python API for integration into your projects. Here’s an example:

import torch
import trimesh
from cube3d.inference.engine import Engine, EngineFast

# Load checkpoint
config_path = "cube3d/configs/open_model.yaml"
gpt_ckpt_path = "model_weights/shape_gpt.safetensors"
shape_ckpt_path = "model_weights/shape_tokenizer.safetensors"
engine_fast = EngineFast(
  config_path, gpt_ckpt_path, shape_ckpt_path, device=torch.device("cuda")
)

# Inference
input_prompt = "A pair of noise-canceling headphones"
mesh_v_f = engine_fast.t2s([input_prompt], use_kv_cache=True)

# Save output
vertices, faces = mesh_v_f[0][0], mesh_v_f[0][1]
trimesh.Trimesh(vertices=vertices, faces=faces).export("output.obj")

Hardware Requirements

Cube 3D has been tested on Nvidia H100, A100, and Geforce 3080 GPUs, as well as Apple Silicon M Chips. A GPU with at least 24GB of VRAM is recommended for optimal performance.

Citation

If you find Cube 3D useful, consider citing their technical report:

@article{roblox2025cube,
  title = {Cube: A Roblox View of 3D Intelligence},
  author = {Roblox, Foundation AI Team},
  journal = {arXiv preprint arXiv:2503.15475},
  year = {2025}
}

Additional Resources

For more details, visit the Cube 3D GitHub repository.

Sources

Cube - Roblox Foundation Model for 3D Intelligence - GitHub Our latest version of Cube 3D is now accessible to individuals, creators, researchers and businesses of all sizes so that they can experiment, innovate and ...
Roblox launches Cube 3D and mesh generation API for creators Roblox has launched and open-sourced its Cube 3D model to make it accessible to users on and off the platform.
Roblox releases open source Cube 3D, an AI model ... - GIGAZINE Roblox announced a project called 'Building an open source AI model for generating 3D objects and scenes in Roblox' in September 2024. This ' ...