gkjohnson / three-gpu-pathtracer

Path tracing renderer and utilities for three.js built on top of three-mesh-bvh.
https://gkjohnson.github.io/three-gpu-pathtracer/example/bundle/index.html
MIT License
1.28k stars 125 forks source link

Provide adapter for Babylon JS #35

Open gkjohnson opened 2 years ago

gkjohnson commented 2 years ago
thomasaull commented 2 years ago

I spread the word in the babylonjs forum: https://forum.babylonjs.com/t/help-wanted-to-create-a-babylon-adapter-for-three-gpu-pathtracer/29350

gkjohnson commented 2 years ago

Awesome, thank you! I'm less familiar with Babylonjs so I'm not sure what the best way to do this would be but it seems like it would be great to enable the project to work easily with three.js and Babylon.

The simplest approach I can think of is a quick Babylon.js scene -> static three.js BufferGeometry / scene builder. Not sure if anything like that already exists. This is effectively what the Skinned Geometry demo does and it's reasonably quick and could happen over multiple frames if necessary. Ie skinned geometry (which is not directly supported by bvh or pathtracing) can "baked" into a static buffer geometry so a bvh can be build / refit for rendering.