B2G4: A synthetic Data Pipeline for the Integration of Blender Models in Geant4 Simulation Toolkit
Angel Bueno Rodriguez, Felix Sattler, Maximilian Prada Perez, Maurice Stephan, Sarah Barnes
B2G4 is an open-source workflow for building complex Geant4 simulations using Blender as a visual scene authoring environment. It combines an intuitive Blender-based scene creation pipeline with a dynamic Geant4 runtime loader to significantly reduce the effort required to create, maintain, and iterate on simulation geometry.
Create simulation scenes visually in Blender, export them with the B2G4 addon, and load them dynamically in Geant4 without recompilation.
- Build Geant4 scenes visually and interactively in Blender
- Dynamically load scenes at runtime in Geant4
- Support native Geant4 solids and tessellated meshes
- Create complex hierarchies and reusable geometry efficiently
- Define custom materials, isotopes, and mixtures directly from Blender
- Accelerate simulation prototyping and iteration
B2G4 is intentionally split into two independent repositories:
| Repository | Language | Purpose |
|---|---|---|
b2g4-addon |
Python / Blender API | Scene creation and export inside Blender |
b2g4-loader |
C++ / Geant4 | Runtime parsing and scene construction in Geant4 |
The separation keeps the Blender tooling and Geant4 integration modular, easier to maintain, and independently extensible.
1. Blender Addon (b2g4-addon)
The Blender addon provides the authoring pipeline for B2G4 scenes.
Using Blender, users can:
- Create simulation geometry visually
- Assign materials interactively
- Define hierarchies and instancing
- Export scenes directly to the B2G4 format for Geant4
For more information go to the b2g4-addon page.
2. Geant4 Loader (b2g4-loader)
The Geant4 loader provides the runtime integration layer between exported B2G4 scenes and Geant4 applications.
The loader dynamically parses exported scene files and constructs the corresponding Geant4 geometry during runtime, including native Geant4 solid reconstruction and materials.
For more information go to the b2g4-loader page.
If you use B2G4 in your work, please cite:
@article{Rodriguez:2023qdr,
author = "Rodriguez, Angel Bueno and Sattler, Felix and Prada, Maximilian Perez and Stephan, Maurice and Barnes, Sarah",
title = "{B2G4: A synthetic Data Pipeline for the Integration of Blender Models in Geant4 Simulation Toolkit}",
eprint = "2311.06327",
archivePrefix = "arXiv",
primaryClass = "physics.comp-ph",
doi = "10.31526/jais.2024.476",
journal = "JAIS",
volume = "2024",
pages = "476",
year = "2024"
}B2G4 is intended to accelerate research and development by simplifying the creation of complex Geant4 simulations.
Contributions are welcome:
- Bug reports
- Feature requests
- Pull requests
- Documentation improvements
