Direct lighting in general and in SPPM

Discussion related to the implementation of new features & algorithms to the Core Engine.

Moderators: jromang, tomb, zcott, coordinators

Direct lighting in general and in SPPM

Postby guibou » Fri Mar 23, 2012 10:38 am

Hello,

It appears (core/transport.cpp in ::Connect function) that direct lighting can get through some surfaces (in fact every surface which are BSDF_SPECULAR | BSDF_TRANSMISSON) and for which F(-ray.d, ray.d) != 0. This allows direct light sampling to connect a diffuse vertex with a light through architectural glass / null material / ...

This is an issue for SPPM. Currently photons with pathLength of 0 are not taken into account in the density estimation because they are already taken into account by the direct lighting. But how to remove photons of pathLength > 0 which may be taken into account through architectural glass ? (See the attached image for an idea of the issue. It is a null cube split by a matte plane)
untitled.jpg


Also, I started to wonder after I saw this picture from the SPPM thread:

Image

(generated with direct lighting integrator, but you can also get the same with path tracing and depth of 1, or SPPM with 0 photon / pass and direct lighting on)

Is this really direct lighting ? I mean, I can see no direct path from the roof to the light. The only way for light to come inside is through CURTAIN of the kitchen... Which is a matte translucent. How the hell do light get in the kitchen ?

Now, the kitchen scene is litted by three ligts, the kettle, sky and sun. If you disable kettle and sky, the sun can *normally* lit only the floor, but the roof is also lit. I tried to put thickness to the roof, but it does not help... Direct lighting of the sun is able to lit the roof !
guibou
Developer
 
Posts: 269
Joined: Fri Dec 04, 2009 10:14 am

Re: Direct lighting in general and in SPPM

Postby jeanphi » Fri Mar 23, 2012 1:06 pm

Hi,

What I do in bidir is that I have 2 counters: one for real surface intersections which is used for sample data indexing, and one for path vertex indexing which is not incremented when hitting a pass through surface.

Jeanphi
jeanphi
Developer
 
Posts: 6577
Joined: Mon Jan 14, 2008 7:21 am

Re: Direct lighting in general and in SPPM

Postby guibou » Fri Mar 23, 2012 1:31 pm

jeanphi wrote:What I do in bidir is that I have 2 counters: one for real surface intersections which is used for sample data indexing, and one for path vertex indexing which is not incremented when hitting a pass through surface.


I just saw that (I was looking in the path integrator code for something similar, but was unable to find it...). So in your definition passthrough materials are specular transmission with a pdf of 1.0 ;) (I think one day we'll have to list all the subtle conventions that lux use ;)

Ok, I'll do the same for SPPM. Thank you.

By the way, why matte translucent is not a passthrough material ? And also, why the hell does the direct lighting is able to lit the roof of the kitchen scene ?
guibou
Developer
 
Posts: 269
Joined: Fri Dec 04, 2009 10:14 am

Re: Direct lighting in general and in SPPM

Postby jeanphi » Sat Mar 24, 2012 12:47 pm

guibou wrote:I just saw that (I was looking in the path integrator code for something similar, but was unable to find it...). So in your definition passthrough materials are specular transmission with a pdf of 1.0 ;) (I think one day we'll have to list all the subtle conventions that lux use ;)

That's slightly more complex: a passthrough material is a specular transmission with wi=-wo, the pdf is 1 because that's the case for all specular materials (actually it is infinite), and a call to pdf(wo, wi) returns a non null value.

guibou wrote:By the way, why matte translucent is not a passthrough material ? And also, why the hell does the direct lighting is able to lit the roof of the kitchen scene ?

Matte translucent is not passthrough because it scatters light in every directions, a passthrough material must not change the ray direction. And I don't know why the roof is lit, maybe an issue with SPPM tracing code? Is it also lit if you add another mesh to prevent light from hitting the roof from outside?

Jeanphi
jeanphi
Developer
 
Posts: 6577
Joined: Mon Jan 14, 2008 7:21 am

Re: Direct lighting in general and in SPPM

Postby SATtva » Sat Mar 24, 2012 2:58 pm

guibou, i think what you're observing with directlight is to be expected -- the light on the room ceiling is not reflected off the floor, but is indeed a direct light from the sky infinite light, its "bottom" part specifically (light from below the horizon). Here's a really simple scene, just a hollow cube with thick walls and an opening:

bidir.sunsky.jpg
Reference: bidir, sunsky

dl.sunsky.jpg
Directlight, sunsky

dl.sky.jpg
Directlight, sky only

dl.sun.jpg
Directlight, sun only
dl.sun.jpg (9.96 KiB) Viewed 616 times


See the front wall and the refrigerator on your image -- they are pitch black too as no light is hitting them.
Linux builds packager
聞くのは一時の恥、聞かぬのは一生の恥
User avatar
SATtva
Developer
 
Posts: 5495
Joined: Tue Apr 07, 2009 12:19 pm
Location: from Siberia with love

Re: Direct lighting in general and in SPPM

Postby Chawl » Sun Mar 25, 2012 6:26 am

Kitchen scene has two major lights. One is named Sky which is "Sky only", other is named Sun which is "Sun+Sky". Perhaps guibou only disabled rendebality of the Sky and forgot to change Sun from"Sun+Sky" to "Sun only". I rendered the kitchen with Direct Light with proper changes and got this result, but I'm not sure if glitter on some metal surfaces should be there:
kuhnya.Scene.sun-only.dl.png
Direct Light, Sun only illumination
Chawl
 
Posts: 71
Joined: Fri May 14, 2010 7:52 pm
Location: Ankara, Turkey

Re: Direct lighting in general and in SPPM

Postby guibou » Sun Mar 25, 2012 8:03 am

Chawl wrote:Kitchen scene has two major lights. One is named Sky which is "Sky only", other is named Sun which is "Sun+Sky". Perhaps guibou only disabled rendebality of the Sky and forgot to change Sun from"Sun+Sky" to "Sun only". I rendered the kitchen with Direct Light with proper changes and got this result, but I'm not sure if glitter on some metal surfaces should be there:
kuhnya.Scene.sun-only.dl.png


Yes, you are right, I forgot to disable the Sky lamp ;)

Now I'm wondering how the floor can be lit by the sky in direct lighting through the curtain, which is not a passthrough material ?
guibou
Developer
 
Posts: 269
Joined: Fri Dec 04, 2009 10:14 am

Re: Direct lighting in general and in SPPM

Postby jeanphi » Mon Mar 26, 2012 1:57 am

Hi,

Isn't the curtain a mix with the null material?

Jeanphi
jeanphi
Developer
 
Posts: 6577
Joined: Mon Jan 14, 2008 7:21 am

Re: Direct lighting in general and in SPPM

Postby guibou » Wed Mar 28, 2012 6:32 am

jeanphi wrote:Isn't the curtain a mix with the null material?


Yes, indeed, you are right. It does not appears easilly as such is luxblend because it is hidden inside the "Luxrender alpha transparency panel".

Today I learn a new trick, don't trust luxblend and see the .lxs by myself.

Thank you.
guibou
Developer
 
Posts: 269
Joined: Fri Dec 04, 2009 10:14 am


Return to Architecture & Design

Who is online

Users browsing this forum: No registered users and 1 guest