Skip to content

Add VDB loader community example - #35043

Merged
Mugen87 merged 1 commit into
mrdoob:devfrom
richardmonette:vdb-community-example
Oct 16, 2026
Merged

Mugen87 merged 1 commit into
mrdoob:devfrom
richardmonette:vdb-community-example

Conversation

@richardmonette

Copy link
Copy Markdown
Contributor
image-1792157240452

Related issue: #5524

Description

Following the feedback on #35008, I put VDB loader in its own package (https://github.com/richardmonette/three-vdb-loader), and so this PR adds it as a community example.

The example loads the smoke model from openvdb.org and renders the density grid with a basic raymarcher.

The package supports:

  • float, double and half scalar grids
  • vec3s and vec3d vector grids
  • zip and Blosc compression
  • scale, translate and affine transforms

I checked the loader output against OpenVDB using generated test files and the openvdb.org samples. There's also a demo landing page https://richardmonette.github.io/three-vdb-loader/ with more elaborate examples, including the vector and fire grids.

@Mugen87 Mugen87 added this to the r187 milestone Oct 16, 2026
uniform float opacity;
uniform float steps;

vec2 hitBox( vec3 orig, vec3 dir ) {

@Mugen87 Mugen87 Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW: It's okay to make this demo with WebGLRenderer but ideally it is migrated to WebGPURenderer at some point (and then renamed to webgpu_loader_vdb).

We have some reusable RaymarchingBox TSL code that could be reused in this demo as well.

https://github.com/mrdoob/three.js/blob/dev/examples/jsm/tsl/utils/Raymarching.js

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noted, thank you! Will do a follow up

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Mugen87
Mugen87 merged commit 1caca5a into mrdoob:dev Oct 16, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants