Veach thesis - formula question

Practical and theoretical implementation discussion.
apaffy
Posts: 46
Joined: Thu Dec 01, 2011 11:00 pm
Location: UK
Contact:

Re: Veach thesis - formula question

Post by apaffy » Fri Jul 20, 2012 2:11 pm

apaffy wrote:You'll end up with an equation that contains:
* P_A(x0) and P_A(x5)
First line is great! Something happened to your maths between the first and second lines, your pdf conversions are not correct. Your final equation will contain P_A(x0) and P_A(x5) as I noted above!

Edit: actually I already wrote down the final sample equation for 4 vertices on viewtopic.php?f=3&t=516&start=30#p1436 if you wanted a hint (although in this post please note P(x->x') is wrt projected solid angle). :)
spectral wrote:What are the values of P(x0->x1) and P(x4->x5)?
You mean P(x0->x1) and *P(x5->x4)*.
P(x0->x1) is defined by the angular emission model of your light source. For emitters that emit hemispherically from a surface, this looks a lot like Lambertian reflectance.
P(x5->x4) is defined by the angular emission model of your camera. This usually computed by sampling the film from a fixed point on the aperture, then converting this into an angular pdf.

spectral
Posts: 382
Joined: Wed Nov 30, 2011 2:27 pm
Contact:

Re: Veach thesis - formula question

Post by spectral » Fri Jul 20, 2012 2:41 pm

Okay, professor.... finally I have :
bdpt_solve3.png
bdpt_solve3.png (9.17 KiB) Viewed 4699 times
If I understand, we also have (compared to your previous post) :

P_A(x0) = 1/Pi if I emit uniformly
P_A(x5) = ???
P_\perp(x1 -> x2) = 1
P_\perp(x4 -> x3) = 1

But why ?
Spectral
OMPF 2 global moderator

apaffy
Posts: 46
Joined: Thu Dec 01, 2011 11:00 pm
Location: UK
Contact:

Re: Veach thesis - formula question

Post by apaffy » Fri Jul 20, 2012 2:52 pm

spectral wrote:Okay, professor.... finally I have :
I'm just trying to point you towards the method for the answer, sorry if the to-and-fro is annoying. :) And I agree with your result in "bdpt_solve3.png"!
spectral wrote:If I understand, we also have (compared to your previous post) :

P_A(x0) = 1
P_A(x5) = 1
P_\perp(x1 -> x2) = 1
P_\perp(x4 -> x3) = 1

But why ?
These aren't necessarily 1. More detail:

P_A(x0) is usually 1/lightArea, assuming you have one light and you sample its area uniformly.
P_A(x5) is usually 1/apertureArea for your camera. For a pinhole camera yes this can be 1 since sampling a pinhole is deterministic. :)
P_\perp(x1 -> x2) and P_\perp(x4 -> x3) are defined by how you sampled the BSDFs at x1 and x4 respectively, so these are only 1 if the BSDF at that vertex is a perfect mirror reflection. For Lambertian BSDFs, this will be 1/pi as usual.

spectral
Posts: 382
Joined: Wed Nov 30, 2011 2:27 pm
Contact:

Re: Veach thesis - formula question

Post by spectral » Fri Jul 20, 2012 2:56 pm

Ah great :-P,

In a previous post from Ingenious, he tell that in BDPT the connection segment is deterministic and so P_\perp(x1 -> x2) = 1 and P_\perp(x4 -> x3) = 1 !

1/pi is the pdf in solid angle, not in projected solid angle ? I have to convert 1/Pi in projected solid angle ?
Spectral
OMPF 2 global moderator

apaffy
Posts: 46
Joined: Thu Dec 01, 2011 11:00 pm
Location: UK
Contact:

Re: Veach thesis - formula question

Post by apaffy » Fri Jul 20, 2012 3:02 pm

spectral wrote:Ah great :-P,

In a previous post from Ingenious, he tell that in BDPT the connection segment is deterministic and so P_\perp(x1 -> x2) = 1 and P_\perp(x4 -> x3) = 1 !
The deterministic connection is between x2 and x3! x1->x2 and x4->x3 are sampled (at x1 and x4 respectively)!
spectral wrote:1/pi is the pdf in solid angle, not in projected solid angle ? I have to convert 1/Pi in projected solid angle ?
Sorry I was assuming cosine-weighted sampling, which has pdf wrt projected solid angle of 1/pi.

spectral
Posts: 382
Joined: Wed Nov 30, 2011 2:27 pm
Contact:

Re: Veach thesis - formula question

Post by spectral » Fri Jul 20, 2012 3:19 pm

Great,

Just for the fun, the final answer (I hope) :
bdpt_solve4.png
bdpt_solve4.png (11.52 KiB) Viewed 4690 times
So, thanks for all your help, explanations and patience ;-)
Spectral
OMPF 2 global moderator

apaffy
Posts: 46
Joined: Thu Dec 01, 2011 11:00 pm
Location: UK
Contact:

Re: Veach thesis - formula question

Post by apaffy » Fri Jul 20, 2012 3:37 pm

Personally I would keep the equation generic by keeping Le(x0 -> x1)/p(x0) and We(x5->x4)/p(x5) in there, which you can then specialize in code for the light/camera you are going to use, but this looks correct given your light/camera assumptions.

spectral
Posts: 382
Joined: Wed Nov 30, 2011 2:27 pm
Contact:

Re: Veach thesis - formula question

Post by spectral » Fri Jul 20, 2012 3:40 pm

Yes, I agree... thanks for the council... it is just to be complete for the current exercise !
I'll do that way...

Thanks... have a nice week end
Spectral
OMPF 2 global moderator

spectral
Posts: 382
Joined: Wed Nov 30, 2011 2:27 pm
Contact:

Re: Veach thesis - formula question

Post by spectral » Fri Jul 20, 2012 4:10 pm

Just another question, does cos(theta_5) = 1 for a pinhole ?

Because in most path-tracer I have see there is no cos term in relation to x(5) ?

Thanks
Spectral
OMPF 2 global moderator

apaffy
Posts: 46
Joined: Thu Dec 01, 2011 11:00 pm
Location: UK
Contact:

Re: Veach thesis - formula question

Post by apaffy » Fri Jul 20, 2012 4:35 pm

I have always considered the film/pinhole to be geometrically planar, in which case yes I have included a cosine term to compute the pdf wrt projected solid angle (as the equations require). I've always viewed this as additional vignetting due to points on the film away from the center not being perfectly perpendicular to rays from the aperture.

I guess you could construct a camera where the film geometry is parabolic to always perfectly face the aperture, which would cancel this effect out, but it might be easier to just correct for vignetting as a post-process if you don't like the effect.

Post Reply