Assignment 4 Discussion

Don't hesitate to ask questions.

Q1:

The first question says "L(phi, theta) = cos(theta) when theta > PI/2 and L(phi, theta) = 0 otherwise." Shouldn't this be for theta < PI/2, so that it's cosine-weighted hemisphere sampling, which is more appropriate here? If theta > PI / 2, the arrangement doesn't make much sense - the luminance would be negative! And Shouldn't we also be weighting by the cos(theta) term in the radiance function (or is this already implied)?

I agree (PaulTarjan)

A1:

It should be theta < PI/2. It was a mistake in the assignment and has now been fixed. The intent of the question was for you to sample with respect to L = cos(theta), which is exactly what infinitesample.cpp does. However, it is true that the integral you are estimating does contain an additional term cos(theta). In this case, it is possible to analytically sample with respect to more than just the value of L. If you choose to do this, please state so explicitly.

Q2:

I've extracted the "string sample" parameter from the paramter set in directlighting.cpp, but how do I access this data when I'm doing the re-weighting in transport.cpp? Can I just cast around the Light * object? (BillDwyer)

A2:

Think about amending the SurfaceIntegrator class, which DirectLighting is a subclass of. Then using certain member pointers of the scene class, you should be able to get at what you need in transport.cpp without resorting to casts or modifying function argument lists. (LeeHendrickson)

Lee's suggestion is good. In general, we won't care what quality of software engineering you use to get the parameter value from the DirectLighting class to the logic in EstimateDirect(). For your handin, we'd like to see any changes to core/transport.cpp as well as whatever you did to get the value of the parameter and marshall it to the correct locations. (Kayvon)

Assignment4Discussion (last edited 2006-05-17 01:15:30 by KayvonFatahalian)