You can install Infinigen either as a Python Module or a Blender Python script:
- Python Module (default option)
- Cannot open a Blender UI - headless execution only
- Installs the
infinigen
package into the user's own python environment - Installs
bpy
as a pip dependency
- Blender Python script
- Can use Infinigen interactively in the Blender UI
- Installs the
infinigen
package into Blender's built-in python interpreter, not the user's python. - Uses a standard standalone installation of Blender.
In either case, certain features have limited support on some operating systems, as shown below:
Feature Set | Needed to generate... | Linux x86_64 | Mac x86_64 | Mac ARM | Windows x86_64 | Windows WSL2 x86_64 |
---|---|---|---|---|---|---|
Minimal Install. | objects & materials | yes | yes | yes | experimental | experimental |
Terrain (CPU) | full scenes | yes | yes | yes | no | experimental |
Terrain (CUDA) | speedup, faster videos | yes | no | no | no | experimental |
OpenGL Annotations | additional training GT | yes | yes | yes | no | experimental |
Fluid Simulation | fires, simulated water | yes | experimental | experimental | no | experimental |
Users wishing to run our Hello World Demo or generate full scenes should install Infinigen as a Python Module and enable the Terrain (CPU) setting. Users wishing to use Infinigen assets in the Blender UI, or develop their own assets, can install Infinigen as a Blender-Python script with the "Minimal Install" setting.
See our Configuring Infinigen, Ground Truth Annotations , and Fluid Simulation docs for more information about the various optional features. Note: fields marked "experimental" are feasible but untested and undocumented. Fields marked "no" are largely possible but not yet implemented.
Once you have chosen your configuration, proceed to the relevant section below for instructions.
Please install anaconda or miniconda. Platform-specific instructions can be found here
Then, install the following dependencies using the method of your choice. Examples are shown for Ubuntu, Mac ARM and Mac x86.
# on Ubuntu / Debian / WSL / etc
sudo apt-get install wget cmake g++ libgles2-mesa-dev libglew-dev libglfw3-dev libglm-dev zlib1g-dev
# on an Mac ARM (M1/M2/...)
arch -arm64 brew install wget cmake llvm open-mpi libomp glm glew zlib
# on Mac x86_64 (Intel)
brew install wget cmake llvm open-mpi libomp glm glew zlib
# on Conda. Useful when you don't have sudo permissions
conda install conda-forge::gxx=11.4.0 mesalib glew glm menpo::glfw3
export C_INCLUDE_PATH=$CONDA_PREFIX/include:$C_INCLUDE_PATH
export CPLUS_INCLUDE_PATH=$CONDA_PREFIX/include:$CPLUS_INCLUDE_PATH
export LIBRARY_PATH=$CONDA_PREFIX/lib:$LIBRARY_PATH
export LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH
First, download the repo and set up a conda environment (you may need to install conda)
git clone https://github.com/princeton-vl/infinigen.git
cd infinigen
conda create --name infinigen python=3.11
conda activate infinigen
Then, install the infinigen package using one of the options below:
# Minimal install (No terrain or opengl GT, ok for Infinigen-Indoors or single-object generation)
INFINIGEN_MINIMAL_INSTALL=True pip install -e .
# Full install (Terrain & OpenGL-GT enabled, needed for Infinigen-Nature HelloWorld)
pip install -e ".[terrain,vis]"
# Developer install (includes pytest, ruff, other recommended dev tools)
pip install -e ".[dev,terrain,vis]"
pre-commit install
❗ If you encounter any issues with the above, please add -vv > logs.txt 2>&1
to the end of your command and run again, then provide the resulting logs.txt file as an attachment when making a Github Issue.
On Linux / Mac / WSL:
git clone https://github.com/princeton-vl/infinigen.git
cd infinigen
conda create --name infinigen python=3.11
conda activate infinigen
Then, install using one of the options below:
# Minimal installation (recommended setting for use in the Blender UI)
INFINIGEN_MINIMAL_INSTALL=True bash scripts/install/interactive_blender.sh
# Normal install
bash scripts/install/interactive_blender.sh
# Enable OpenGL GT
INFINIGEN_INSTALL_CUSTOMGT=True bash scripts/install/interactive_blender.sh
❗ If you encounter any issues with the above, please add > logs.txt 2>&1
to the end of your command and run again, then provide the resulting logs.txt file as an attachment when making a Github Issue.
Once complete, you can use the helper script python -m infinigen.launch_blender
to launch a blender UI, which will find and execute the blender
executable in your infinigen/blender
or infinigen/Blender.app
folder.
python -m <MODULEPATH> <ARGUMENTS>
in our documentation, you should instead run python -m infinigen.launch_blender -m <MODULEPATH> -- <ARGUMENTS>
to launch them using your standalone blender installation rather than the system python..
Docker on Linux
git clone https://github.com/princeton-vl/infinigen.git
cd infinigen
make docker-build
make docker-setup
make docker-run
To enable CUDA compilation, use make docker-build-cuda
instead of make docker-build
To run without GPU passthrough use make docker-run-no-gpu
To run without OpenGL ground truth use docker-run-no-opengl
To run without either, use docker-run-no-gpu-opengl
Note: make docker-setup
can be skipped if not using OpenGL.
Use exit
to exit the container and docker exec -it infinigen bash
to re-enter the container as needed. Remember to conda activate infinigen
before running scenes.
Docker on Windows
Install WSL2 and Docker Desktop, with "Use the WSL 2 based engine..." enabled in settings. Keep the Docker Desktop application open while running containers. Then follow instructions as above.