erichlof/THREE.js-PathTracing-Renderer

Rendering native three.js scene and meshes

Maxsior opened this issue · 1 comments

Hello!
How can I render the existing scene with different mesh (BufferGeometry + some Materials) with PathTracing-Render?

@Maxsior

Hello! Yes at the bottom of the Readme for this project, one of the TODOs is to have it where you could feed the path tracer with a native Three.scene with custom geometry and materials. The reason that this is not done yet is because it is tricky and non trivial to be able to convert from the scene to a data structure data texture with all the vertex info that the ray tracer needs. However you can check out the BVH demos that load in gltf models like the Stanford bunny and dragon. I then use the three.js library to scale, position and rotate the model inside the scene to be rendered.

As it stands now you must do loading scene data like this manually, but hopefully someday I can create a clean interface that will just loop through the raw three.scene and assign geometry and materials to the data texture to be read by the path tracing renderer.

Thanks!
-Erich