Skip to main content

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


Download files

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

Source Distribution

panda3d_bbmodel2bam-0.1.0.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

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

panda3d_bbmodel2bam-0.1.0-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

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

Hashes for panda3d_bbmodel2bam-0.1.0.tar.gz
Algorithm Hash digest
SHA256 19eca81fa9c0ec47b9c5f49a4d8d1d96fe84b13168314e64a97e19593613a94f
MD5 9cdefeaf2678cf71c7aa404642a7c141
BLAKE2b-256 156a2f5b8b06ff90fe98ddd81bc87a7a7e7c07fa9aafb0acd37532e67a48e6fc

See more details on using hashes here.

Provenance

The following attestation bundles were made for panda3d_bbmodel2bam-0.1.0.tar.gz:

Publisher: ci.yml on thetestgame/bbmodel2bam

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file panda3d_bbmodel2bam-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for panda3d_bbmodel2bam-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c74b1eae34090d5e1008e714a8f41bbcb17bc7759628c6b6b6f4d73fabf61ebb
MD5 058efc01b9a836230dccf12345149ecf
BLAKE2b-256 608f9e0f4617f48538fc88526b68ecea081e836b7d666314568920886100e351

See more details on using hashes here.

Provenance

The following attestation bundles were made for panda3d_bbmodel2bam-0.1.0-py3-none-any.whl:

Publisher: ci.yml on thetestgame/bbmodel2bam

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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