tunabrain / tungsten

High performance physically based renderer in C++11

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About customizing ray directions

IwakuraRein opened this issue · comments

commented

Hi Benedit.

I know the path tracing algorithm demands the ωo generated randomly, I want to customize the ωo of the first bounce of each ray though.

I've tried to fathom tungsten's core codes but can't get everything clear, for I just started learning pbrt. I've made PathTracer.cpp load an exr file describing the ωo of each pixel, but I have no idea where I can assign them. I guess the random generation happens in the class PathSampleGenerator, and handleSurface(), estimateDirect(), sampleDirect(), and chooseLight() in the TraceBase.cpp need modifications. Could you teach me a bit?

Thanks. 😊