Exphotonmap error

3 views
Skip to first unread message

Thomas

unread,
Apr 20, 2008, 9:00:49 AM4/20/08
to pbrt
I recently came across a small "error" in the exphotonmap plugin I
noticed a while ago. It is not really an error: in the Li function the
variable 'n' is used twice. The first time for the normal of the
intersection point of the regular rays and again in the final
gathering part. On VS2005 this results in significant artifacts
because in

Li += fr * Lindir * AbsDot(wi, n) * wt / photonPdf;

the new normal (from the radianceMap) is used instead of the normal
declared at the start of the Li function. Fixing this is easy enough
(rename the second n's to nGather for example) but I thought I'd
mention it nonetheless.

Matt Pharr

unread,
Jun 1, 2009, 8:18:26 PM6/1/09
to pb...@googlegroups.com
I'm surprised that VS2005 gets that wrong, but agree/admit that it's
in any case confusing/sloppy code that should be fixed..

Thanks,
-matt

Matt Pharr

unread,
Jun 1, 2009, 8:47:52 PM6/1/09
to pb...@googlegroups.com
Hi, Thomas--

Yikes, that's a really big error! (IMHO). (Which makes it all the
more awful that your email sat unreplied to for so long.)

This is probably good motivation for a bugfix 1.04 release. (There
are a few other bad ones like this that are worth a small patch.)
I'll try to get one out in the next week or two.

Thanks for reporting this!!!

-matt


On Apr 20, 2008, at 6:00 AM, Thomas wrote:

>
Reply all
Reply to author
Forward
0 new messages