Page 1 of 1

Light scattering in Kerkythea

PostPosted: Sat Feb 23, 2008 8:12 pm
by Charles

I'm having some difficulty understanding when the various functions are called in the SDK. As a test scene, I have a cube in front of a screen. The cube's material is what I'm working on. Rendering is done with bidirectional path tracing.

When I set askReflectance() to return a NullLobe, the cube is black (as expected), but also, no light gets through to the screen; even though I set askSample() and askBranchSample() to set the outgoing ray equal to incoming ray.

When I set askReflectance() to return a TranslucentLobe, the entire cube is bright white, and all light gets to the screen. However, in ask[Branch]Sample(), I set the outgoing light to pure green. I only see a tiny little bit of green right above the cube's top edge.

I'm sure that I've got some misconceptions about the roles of these functions, but I'm having a hard time figuring them out.. any help is much appreciated!

Kind regards,

PostPosted: Fri Feb 29, 2008 1:02 pm
by giannis
Since you are working with BiPT, forget about askBranchSample.

Simply work with askSample!!

So in short:

1. askReflectance: evaluates the bsdf according to incoming/outgoing direction
2. askSample: performs a sampling of an outgoing direction along with color/pdf (based on incoming direction).

you have seen the Oren-Nayar example implementation, right?