knightcrawler25 / GLSL-PathTracer

A toy physically based GPU path tracer (C++/OpenGL/GLSL)
MIT License
1.79k stars 172 forks source link

How to make my own scene for rendering inside the engine? #33

Closed odil24 closed 2 years ago

odil24 commented 3 years ago

I'm Blender user and I'd like to export my scene from Blender as OBJ file and then would like to render inside the engine, but how to do this?

Thanks advance.

Mentalarray commented 3 years ago

you just look at the scene examples i.e cornell_box.scene in the Assets folder it shows you how to include .obj format mesh files and to set materials

odil24 commented 3 years ago

Are you mean am I must to understand this lines from the .scene files? https://i.postimg.cc/wM66RswB/screenshot-182.png

Mentalarray commented 3 years ago

the link you posted is not working

Tetsujinfr commented 3 years ago

The way the materials are stored in the scene format is different from the .mtl format: is there already a piece of code to convert std mtl files into the .scene format or one has to code a conversion tool? thanks

Mentalarray commented 3 years ago

The regular mtl format does not support PBR materials if your using blender you could build your own exporter on python to include PBR along these lines http://exocortex.com/blog/extending_wavefront_mtl_to_support_pbr

Tetsujinfr commented 3 years ago

I see thanks. So I conclude that the pbr world has no std format then and then this repo uses its own specific one. (I am not close to the cgi world/industry, bear with me) I am not a blender user and although I know this is a great tool I do not want to make it a dependency or my workflow when using the glsl path tracer. Thanks for the link, great suggestion. will try to DIY some formats conversion code.