3
$\begingroup$

For rendering an indoor scene where light source is skylight coming in through the window opening, one can consider the window polyline as the light source, with the sky distribution, in direct lighting calculation. And sample the window area(or solid angle).

It works as long as it's just an opening. Once a glazing is introduced I cannot figure out how to do direct lighting(in a path tracer) correctly. Shadow rays either are transmitted or reflected. I guess the transmitted ray needs to be traced again but this is not easy I suppose(as the the Brdf.SampleDirection method returns only direction), considering also that it might be a double glazing which inter-reflection can happen too.

Does any one have any suggestion or experience on this? Thanks,

$\endgroup$
5
$\begingroup$

Most renderers allow you to set a flag on an object to make shadow rays ignore it (so it won't cast shadows). You could set this flag on your glazing.

That said, it's not unusual to make it so that refraction is disabled on shadow rays: that is, if they would be transmitted by an object, a child ray is traced in the same direction, ignoring any refraction that would be caused by the ior of the material. Although this gives wrong results for objects such as crystal balls, you need photon mapping or similar to get good results for that situation anyway. Just tracing a child ray is an easy way of making objects like stained-glass windows give simple coloured shadows.

$\endgroup$
  • $\begingroup$ Thanks for your answer. My aim is to calculate daylighting from the visible sky, seen through the glazing portal,on few measurement points. The transmitted ray will hit a different patch of sky with a different distribution than the initial shadow ray. And as you said this will give wrong results. $\endgroup$ – ali Mar 14 '17 at 17:13
  • $\begingroup$ I am not sure any light tracing methods would help either as sampling the infinite area light source(sky) for an indoor scene is not efficient, and considering the window portal as the light source with the background sky distribution wouldn't help either as you sample the window area with a sample direction towards the room but still needs to trace one transmitted ray back to the sky to account for the glazing. Is this correct? $\endgroup$ – ali Mar 14 '17 at 18:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.