Convert Blockbench .bbmodel files to Panda3D .bam files
Project description
bbmodel2bam
Convert Blockbench .bbmodel files to Panda3D .bam files.
Inspired by blend2bam.
Features
- Mesh elements – free-form meshes with per-vertex UVs
- Cube elements – box primitives with per-face UV rects
- Embedded textures – base64-encoded textures decoded and embedded in BAM
- File-referenced textures – external texture paths resolved relative to
.bbmodel - Groups / bones – outliner hierarchy preserved as scene-graph nodes
- Element transforms – origin and rotation applied correctly
- Coordinate conversion – Blockbench Y-up → Panda3D Z-up
- Panda3D file loader –
loader.load_model('model.bbmodel')works natively
Installation
pip install panda3d-bbmodel2bam
Or install in development mode:
pip install -e .
Usage
CLI
bbmodel2bam model.bbmodel model.bam
bbmodel2bam models/ output/
bbmodel2bam --scale 0.0625 --textures ref model.bbmodel model.bam
Options:
| Flag | Default | Description |
|---|---|---|
--scale FLOAT |
1.0 |
Uniform scale factor for coordinates |
--textures {embed,ref} |
embed |
Embed textures in BAM or save as separate files |
--append-ext |
off | Append .bam instead of replacing extension (batch) |
-v, --verbose |
off | Print extra conversion info |
Python
from bbmodel2bam.converter import convert
convert('model.bbmodel', 'model.bam', scale=1.0)
Panda3D File Loader
With the package installed, Panda3D 1.10.4+ can load .bbmodel files directly:
model = loader.load_model('model.bbmodel')
model.reparent_to(render)
Supported bbmodel features
| Feature | Status |
|---|---|
| Cube elements | ✅ |
| Mesh elements (free-form) | ✅ |
| Per-face UV (non-box UV) | ✅ |
| Box UV | ❌ planned |
| Embedded textures (base64) | ✅ |
| External texture files | ✅ |
| Element rotation/origin | ✅ |
| Groups / outliner hierarchy | ✅ |
| Animations | ❌ planned |
| Locators | ❌ planned |
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file panda3d_bbmodel2bam-0.1.0.tar.gz.
File metadata
- Download URL: panda3d_bbmodel2bam-0.1.0.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19eca81fa9c0ec47b9c5f49a4d8d1d96fe84b13168314e64a97e19593613a94f
|
|
| MD5 |
9cdefeaf2678cf71c7aa404642a7c141
|
|
| BLAKE2b-256 |
156a2f5b8b06ff90fe98ddd81bc87a7a7e7c07fa9aafb0acd37532e67a48e6fc
|
Provenance
The following attestation bundles were made for panda3d_bbmodel2bam-0.1.0.tar.gz:
Publisher:
ci.yml on thetestgame/bbmodel2bam
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
panda3d_bbmodel2bam-0.1.0.tar.gz -
Subject digest:
19eca81fa9c0ec47b9c5f49a4d8d1d96fe84b13168314e64a97e19593613a94f - Sigstore transparency entry: 1290035383
- Sigstore integration time:
-
Permalink:
thetestgame/bbmodel2bam@296fc66e6ee30c7d06018ebf14bb6c4fbdedba8f -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/thetestgame
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@296fc66e6ee30c7d06018ebf14bb6c4fbdedba8f -
Trigger Event:
push
-
Statement type:
File details
Details for the file panda3d_bbmodel2bam-0.1.0-py3-none-any.whl.
File metadata
- Download URL: panda3d_bbmodel2bam-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c74b1eae34090d5e1008e714a8f41bbcb17bc7759628c6b6b6f4d73fabf61ebb
|
|
| MD5 |
058efc01b9a836230dccf12345149ecf
|
|
| BLAKE2b-256 |
608f9e0f4617f48538fc88526b68ecea081e836b7d666314568920886100e351
|
Provenance
The following attestation bundles were made for panda3d_bbmodel2bam-0.1.0-py3-none-any.whl:
Publisher:
ci.yml on thetestgame/bbmodel2bam
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
panda3d_bbmodel2bam-0.1.0-py3-none-any.whl -
Subject digest:
c74b1eae34090d5e1008e714a8f41bbcb17bc7759628c6b6b6f4d73fabf61ebb - Sigstore transparency entry: 1290035448
- Sigstore integration time:
-
Permalink:
thetestgame/bbmodel2bam@296fc66e6ee30c7d06018ebf14bb6c4fbdedba8f -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/thetestgame
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@296fc66e6ee30c7d06018ebf14bb6c4fbdedba8f -
Trigger Event:
push
-
Statement type: