Veach thesis - formula question
Re: Veach thesis - formula question
Thanks,
Sure, I know I don't use the x(0) sample on the camera... why ?
Because it run on the GPU and I would like a 'light path' for each pixel and not for a random pixel (connection between random light path and camera give a random pixel) ! It is why I first generate a ray per pixel and connect this vertex.
It should be the same ! (I just have to account for direct hit).
The main difference is that I sample the light direction (uniform for now) and the first camera-segment is not random (Like path tracing).
Sure, I know I don't use the x(0) sample on the camera... why ?
Because it run on the GPU and I would like a 'light path' for each pixel and not for a random pixel (connection between random light path and camera give a random pixel) ! It is why I first generate a ray per pixel and connect this vertex.
It should be the same ! (I just have to account for direct hit).
The main difference is that I sample the light direction (uniform for now) and the first camera-segment is not random (Like path tracing).
Re: Veach thesis - formula question
Well as long you take this into account in the full path pdf then you're fine. Essentially you are only light tracing indirect light as a result, but I assume that's intentional.spectral wrote:Sure, I know I don't use the x(0) sample on the camera... why ?
Because it run on the GPU and I would like a 'light path' for each pixel and not for a random pixel (connection between random light path and camera give a random pixel) ! It is why I first generate a ray per pixel and connect this vertex.
Looking at your images, it seems that the second vertex of your light subpath only seems to hit part of the scene (seems to cut off part-way down). I'd check the way you generate rays for your light source emission is oriented correctly in the world (I'd expect them to start on the surface of the sphere and generate a cosine-weighted distribution in the local positive hemisphere of the sample point).
Re: Veach thesis - formula question
Yes,
It seems to me too
1) Yes, I use cosine sampling on the light (hemisphere), I have even try uniform sampling.
2) Yes, it is generated in the right direction, it is easy to check because light-normal = (0,-1,0) in the test scene
It seems to me that the light hit the top of the box, and diffusely send the light. You see we have 2 bands and exactly where the box start !
Like a missing cos-weighting ! But all the 'cos' are there !
It seems to me too

1) Yes, I use cosine sampling on the light (hemisphere), I have even try uniform sampling.
2) Yes, it is generated in the right direction, it is easy to check because light-normal = (0,-1,0) in the test scene

It seems to me that the light hit the top of the box, and diffusely send the light. You see we have 2 bands and exactly where the box start !
Like a missing cos-weighting ! But all the 'cos' are there !
Re: Veach thesis - formula question
I would store paths' segments (maybe colored) in a text file (for 2 or some shaded points). Then load and view stored paths in 3D appspectral wrote: So, if someone has an idea to debug this problem ?
-
- Posts: 167
- Joined: Mon Nov 28, 2011 7:28 pm
Re: Veach thesis - formula question
graphics to debug graphics... I'll +1 my vote for that approach.
Re: Veach thesis - formula question
BTW, I have change my code in order to connect to the camera vertex x(0) (camera origin), by intersecting the image plane.
But I got the same effect
-
But I got the same effect

Re: Veach thesis - formula question
For sure, I miss something... please take a look at the following picture that represent my simple scene in 2D.
I use a simple lambert surface, it mean that the same light intensity is emitted (in all direction) from the top of the cube.
On the other side, there is the solid-angles (depth = 2) that will attenuate this band effect, I should have a gradient on the walls.
Finally if I use only theses rules... it is normal to have a band effect ?
So, what do I miss ? is there something else that I forget to introduce ? which rule can remove this band effect ?
I use a simple lambert surface, it mean that the same light intensity is emitted (in all direction) from the top of the cube.
On the other side, there is the solid-angles (depth = 2) that will attenuate this band effect, I should have a gradient on the walls.
Finally if I use only theses rules... it is normal to have a band effect ?
So, what do I miss ? is there something else that I forget to introduce ? which rule can remove this band effect ?
Re: Veach thesis - formula question
I'd be careful with your definitions, Lambertian reflectance produces uniform radiance, which means the same energy for each differential projected solid angle.spectral wrote:the same light intensity is emitted (in all direction) from the top of the cube.
Are you perhaps missing some conversion from solid angle to projected solid angle in your implementation? Perhaps this produces the visible banding.
Re: Veach thesis - formula question
Thanks a lot,
To give more details, here is what I do...
x0 : point on light
I compute the radiance for the whole surface => Le
x1 : point on top of the box
I convert the radiance this way : L = Le * |Nl.-Wi1| |N1.Wi1| / r*r
Where:
Nl : is the light normal
N1: the normal at x1
Wi1 : is the normalized vector from the light to x1
r : the distance between the light point and x1
x2 : point on the left wall
L = f(x1) * |N2.Wi2|
BTW: I don't divide f(x1) by p(x1) because I use the light pdf (previous step)
where:
f = 1/pi (lambert brdf)
p = 1/pi (lambert pdf)
N2: normal at x2
Wi2 : is the normalized vector from the x1 to x2
To give more details, here is what I do...
x0 : point on light
I compute the radiance for the whole surface => Le
x1 : point on top of the box
I convert the radiance this way : L = Le * |Nl.-Wi1| |N1.Wi1| / r*r
Where:
Nl : is the light normal
N1: the normal at x1
Wi1 : is the normalized vector from the light to x1
r : the distance between the light point and x1
x2 : point on the left wall
L = f(x1) * |N2.Wi2|
BTW: I don't divide f(x1) by p(x1) because I use the light pdf (previous step)
where:
f = 1/pi (lambert brdf)
p = 1/pi (lambert pdf)
N2: normal at x2
Wi2 : is the normalized vector from the x1 to x2
Re: Veach thesis - formula question
You're right, but the projected solid angle is only for irradiance (incoming light...). I have also think to a missing solid angle... but in this example there is only 2 solid angles : sa(0) and sa(1), both are approximatively = 1.apaffy wrote: I'd be careful with your definitions, Lambertian reflectance produces uniform radiance, which means the same energy for each differential projected solid angle.
Are you perhaps missing some conversion from solid angle to projected solid angle in your implementation? Perhaps this produces the visible banding.
I can remove the effect by doing f = f * |N1.-Wi2|... but it is incorrect !
Thanks