Mesh BDF: Barycentric Dominance Field for 3D Native Mesh Generation
July 5, 2026 ยท View on GitHub
News
- release training code
- release inference code, check points
- [2026-07-05] release core codes of BDF encoding and decoding (backward compatible to Trellis.2 O-voxel)
- [2026-06-30] arXiv preprint released
1. Environment Setting
1.1 Conda
- Following Trellis.2 environment setting:
setup.sh - Additional packages:
pip install \
open3d==0.19.0 \
objaverse==0.1.7 \
open_clip_torch==3.3.0 \
matplotlib \
seaborn \
scikit-learn \
plotly \
dash \
plyfile \
pyquaternion \
ConfigArgParse \
GPUtil
- Build o-voxel manually: (In order to modify o-voxel C++ codes anytime)
cd o-voxel
python setup.py build_ext --inplace
- Set o-voxel path
export PYTHONPATH="/path/to/your/MeshBDF/o-voxel:$PYTHONPATH"
1.2 Docker (Optional)
- Pull docker image
docker pull song21/trellis2:v2
- Start docker container
For example, if you want to run this code on Windows, and this project is stored in D:\Docker_projs\MeshBDF, run the command in windows cmd like this:
docker run -it --name trellis2 --gpus all -p 8066:22 -v D:\Docker_projs\MeshBDF:/workspace/MeshBDF:rw song21/trellis2:v2
- Get in to docker container
For example, in windows cmd:
docker exec -it trellis2 /bin/bash
- Activate conda env (in docker container) and SSH
service ssh start
conda activate trellis2
-
Use SSH in VSCode to connect the docker container, passwd:
111111 -
Refer to Conda env setting (additional packages, build o-voxel)
2. Try BDF Encoding and Decoding
2.1 Run Demo
Some demo meshes are provided in demo_bdf/input_mesh, run this code to try BDF encoding and decoding:
python demo_bdf/bdf_enc_dec.py
The results will be stored in demo_bdf/output_mesh
2.2 BDF Decoding Illustration

-
To accelerate the convertion from dual contouring quads (in trellis.2) to dual graph nodes, we develop a extended quad-style marching cube algorithm. This marching cube algorithm have lookup table size compared to naive loopup table size.
-
The BDF visualization is stored in
/s01_mcface, while the BDF value is converted into vertex color of the qmc mesh. -
The Flood Fill visualization is stored in
/s03_floodcolor, the mesh is the same as dual contouring quads of trellis.2, while the quads are separated. -
The reconstructed mesh is stored in
/s05_floodface.
Citation
@misc{song2026meshbdfbarycentricdominance,
title={Mesh BDF: Barycentric Dominance Field for 3D Native Mesh Generation},
author={Gaochao Song and Haohan Weng and Luo Zhang and Zibo Zhao and Shenghua Gao},
year={2026},
eprint={2606.31777},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2606.31777},
}