Skip to main content

Function-Oriented Abstractions for Procedural 3D Generation in Python

Project description

ProcFunc: Function-Oriented Abstractions for Procedural 3D Generation in Python

Documentation | Research Paper | Documentation | Transpiling | Experiments | Contributing

This repository contains only the Primitives API, Transpiler and Tracer from our research paper.

The pre-made procedural generators are coming soon as part of infinigen.

Installation

Use uv or your favorite package manager to install procfunc via pip:

uv pip install procfunc

Note: ProcFunc depends on bpy==4.2.0 which then requires Python==3.11.x. Other version are not yet supported.

Since we have not yet reached semver 1.0.0 we have not yet finalized procfunc's interface. In the meantime, each 0.X.0 may introduce interface changes. Please pin uv add procfunc<0.XX where X is the current version.

Usage

See procfunc.readthedocs.io for available functions

Please create Github Issues for any bugs or unclear interfaces!

Transpile a blender file to ProcFunc code

Convert a Blender geometry node tree into procfunc Python code by downloading our example blend and executing the transpiler:

wget https://raw.githubusercontent.com/princeton-vl/procfunc/main/examples/transpile_simple_chair/simple_chair.blend
uv run python -m procfunc.transpiler.main simple_chair.blend --node_trees simple_chair --output transpiled_code.py

See the expected output in examples/transpile_simple_chair/transpiled_code.py. To use the code, you can add pf.ops.file.save_blend("test.blend") to the end of it, then open the generated blender file. You can also open and edit the blender geonodes prior to transpiling in order to generate different procfunc code.

Paper

If you find procfunc useful, please cite our paper:

@misc{raistrick2026procfunc,
      title={ProcFunc: Function-Oriented Abstractions for Procedural 3D Generation in Python}, 
      author={Alexander Raistrick and Karhan Kayan and Jack Nugent and David Yan and Lingjie Mei and Meenal Parakh and Hongyu Wen and Dylan Li and Yiming Zuo and Erich Liang and Jia Deng},
      year={2026},
      eprint={2604.26943},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2604.26943}, 
}

Experiments

See experiments/EXPERIMENTS.md

NOTE: experiments are only intended to be correct when using the experiments branch, which will not see major updates.

Contributing

Please create an issue for any proposed features to discuss them before implementing.

Developer Installation
git clone git@github.com:princeton-vl/procfunc.git
cd procfunc
uv venv
uv pip install -e ".[dev]"
Tools
uv run ruff format
uv run ruff check --fix
uv run pytest
make docs
Todos / Sharp Edges

Add optional support for bpy==4.x and 5.x and maybe 3.6, all under the same procfunc interface.

pf.ops is missing some blender functions and arguments, especially returning "selection" masks for some cases.

Assets like pf.MeshObject and pf.Material are not currently cleaned up upon going out of scope

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

procfunc-0.30.2.tar.gz (273.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

procfunc-0.30.2-py3-none-any.whl (290.5 kB view details)

Uploaded Python 3

File details

Details for the file procfunc-0.30.2.tar.gz.

File metadata

  • Download URL: procfunc-0.30.2.tar.gz
  • Upload date:
  • Size: 273.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for procfunc-0.30.2.tar.gz
Algorithm Hash digest
SHA256 c87aa061c8ee3b5e0341a3c23e376223fa95d200b720c37d39b9deac1a9fa6a1
MD5 5280a7ae012e4ff6fd3b214d80ac5ae7
BLAKE2b-256 e3baf8ed5df358f7d395da2f16a39f0b99b763ead66fd6f9dd388b2ff57ad2f7

See more details on using hashes here.

File details

Details for the file procfunc-0.30.2-py3-none-any.whl.

File metadata

  • Download URL: procfunc-0.30.2-py3-none-any.whl
  • Upload date:
  • Size: 290.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for procfunc-0.30.2-py3-none-any.whl
Algorithm Hash digest
SHA256 80c1efb24981f8f3e506708556c327da403704f718d6d583d8264b17fdfa5464
MD5 44196073c64f9328c5426e1aa83e1765
BLAKE2b-256 5f94701b00ea860f9d10dd543a8b85ac7096f6ead9819f560fa74ff968957c79

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page