lighttransport / nanort

NanoRT, single header only modern ray tracing kernel.
MIT License
1.08k stars 90 forks source link

add example path tracer #3

Closed daseyb closed 8 years ago

daseyb commented 8 years ago

Added a path tracing example. Uses a simple specular BRDF with no roughness, but fresnel weighting of specular paths and diffuse reflection vs. transmission parameter. All material parameters are read from the .mtl file. Should build fine under Windows with MSVC and Linux with gcc/clang. I don't have access to a Mac, so I couldn't test building on that platform.

syoyo commented 8 years ago

Super cool! Thanks!

syoyo commented 8 years ago

FYI, recent tinyobjloader(in devel branch) supports parsing PBR material proposed here: http://exocortex.com/blog/extending_wavefront_mtl_to_support_pbr

meshula commented 8 years ago

Parsing PBR, pretty cool :) Have you posted any sample MTL files that show the syntax your parser can accept?

syoyo commented 8 years ago

Have you posted any sample MTL files that show the syntax your parser can accept?

Only unit test data exists so far.

https://github.com/syoyo/tinyobjloader/blob/develop/models/pbr-mat-ext.mtl https://github.com/syoyo/tinyobjloader/blob/develop/tests/tester.cc#L322

meshula commented 8 years ago

Ah great, I see it's exactly as in the exocortex page. Thanks for the post.

syoyo commented 8 years ago

PR of PBR rendering example(e.g. Disney BRDF) in NanoRT is welcome.