Three-mesh-bvh: A plugin for fast geometry raycasting and spatial queries!

The three-gpu-pathtracer project built on three-mesh-bvh has just had it’s initial release! It now supports a new slew of material properties including transmission, specular, metalness, and more! There’s still a lot more progress to be made. I made a separate thread here with more project details -

image

6 Likes

v0.5.10 of three-mesh-bvh has just been released! This version adds a utility called StaticGeometryGenerator for baking and merging skinned and morph target meshes into static geometry so a BVH can be built. Pathtraced skinned geometry coming soon? :eyes:

Demo here: Skinned Mesh BVH Demo

ezgif-2-73938c8a33

7 Likes

I’ve just added a new demo that demonstrates how to generate projected, triangle-clipped geometry edges onto a plane to produce a line geometry - accelerated using the BVH! Each potential edge is clipped by the triangles above it to produce the visible portion that would be seen from above. This could be useful for generating 2d, line vectorized versions of geometry for things like mechanical drawings or object footprints for floor plans. Using the BVH here speeds up the search for triangles by multiple orders of magnitude to keep things updating quickly!

Here’s the demo!

https://gkjohnson.github.io/three-mesh-bvh/example/bundle/edgeProjection.html

And of course some screenshots:

10 Likes

Unbelievable! I’m speechless. :drooling_face:

That is so dope!

Hello @gkjohnson,
Thanks for this great sharing, the performance is so great.

I am trying to integreate your lasso selection feature into my platform, but my project does not use typescript, is there a library that can be included directly to use the function such as MeshBVH shapecast?

Thanks and look forward your replay.

Best regards
Kun-Yao

Typescript is not required for three-mesh-bvh so you can use this package and the shapecast function.

3 Likes

Dude, you do some incredible stuff. Nice work!

1 Like

There have been some really awesome projects getting coming out over the last few weeks that all use three-mesh-bvh from our own @N8Three, @drcmda, and @_LucasJones on Twitter! With a shader-based raytracing we can start to see som NVidia RTX-like rendering capabilities being applied in the browser especially with these shadow and gem rendering projects. Looking forward to seeing what’s next!

 

A beautiful diamond material modeling internal reflection with path tracing

A collaborative effort between N8Three and drcmda

 

Bent normal generation for specular occlusion

 

An amazing lightmap baking project

5 Likes

Revision v0.5.18 of three-mesh-bvh has been published! The big addition in this release is the ability to perform closest point-to-point queries against the BVH on the GPU in addition to a new demo showing how to generate and raymarch render a signed distance field into a 3d texture! Signed distance fields can be used for a variety of things including rendering implicit surfaces, particle animation, lighting effects, and more!

SDF Demo Here!

Rendering the SDF via Raymarching

Grid of SDF Texture Layers

Animated SDF Texture Layers

3 Likes