Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rendering native three.js scene and meshes #37

Open
Maxsior opened this issue Oct 19, 2019 · 1 comment
Open

Rendering native three.js scene and meshes #37

Maxsior opened this issue Oct 19, 2019 · 1 comment

Comments

@Maxsior
Copy link

Maxsior commented Oct 19, 2019

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

@Maxsior Maxsior changed the title Rendering native three.js scene Rendering native three.js scene and meshes Oct 19, 2019
@erichlof
Copy link
Owner

erichlof commented Oct 21, 2019

@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

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

No branches or pull requests

2 participants