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

  1. Following Trellis.2 environment setting: setup.sh
  2. 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
  1. Build o-voxel manually: (In order to modify o-voxel C++ codes anytime)
cd o-voxel
python setup.py build_ext --inplace
  1. Set o-voxel path
export PYTHONPATH="/path/to/your/MeshBDF/o-voxel:$PYTHONPATH"

1.2 Docker (Optional)

  1. Pull docker image
docker pull song21/trellis2:v2
  1. 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
  1. Get in to docker container

For example, in windows cmd:

docker exec -it trellis2 /bin/bash
  1. Activate conda env (in docker container) and SSH
service ssh start
conda activate trellis2
  1. Use SSH in VSCode to connect the docker container, passwd: 111111

  2. 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

img

  1. 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 2122^{12} lookup table size compared to naive 282^{8} loopup table size.

  2. The BDF visualization is stored in /s01_mcface, while the BDF value is converted into vertex color of the qmc mesh.

  3. 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.

  4. 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}, 
}