Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit9eb3c4fc65

README.md

VDB → ZVOL importer

Claims .vdb (OpenVDB) writes and produces a sibling .zvol — the engine-native dense RGBA8 volumetric format consumed by the volumetrics system.

This is a standard importer asset: init.luau returns a { canImport, import } module that the importer dispatcher (@builtin::assetTypes.importer) loads lazily and runs only when a matching file is written. It does not execute anything at load time.

Pipeline

  1. Real parse — if the openvdb plugin in the builtin library (@builtin::plugins.openvdb) is loaded, the VDB B-tree is parsed into a dense RGBA8 voxel buffer and wrapped in a 64-byte ZVOL header.
  2. Procedural fallback — without the plugin, a deterministic noise-modulated torus is synthesised (FNV-1a hash of the first 256 source bytes seeds it) so the importer + demo wiring stays functional. The produced_by field in the result distinguishes the two paths.

ZVOL header (64 bytes)

offsetsizefield
04magic ZVOL
44u32 version (1)
84u32 width
124u32 height
164u32 depth
204u32 format (1 = rgba8)
2412f32[3] aabb_min
3612f32[3] aabb_max
4816reserved
64…voxel data, w*h*d*4 bytes, XY-major Z-slowest