Photon mapping versus Ray Tracing results

33 views
Skip to first unread message

psycho...@gmail.com

unread,
May 31, 2009, 9:43:59 PM5/31/09
to pbrt
I'm trying to render some photon mapped scenes but the results are
just terrible. I've tried many many different parameter combinations
but nothing turns out.

It's a simple scene, just a box with a point light in the center of it
and some tubes running across the top of the box. Note that I have to
drastically reduce the light intensity depending on whether or not
it's photon mapping or ray tracing; the light values used for the ray
traced image will completely bleach out all the detail if used in the
photon mapped image.

Here are the photon mapping arguments:

SurfaceIntegrator "photonmap" "integer causticphotons" [0]
"integer indirectphotons" [500000]
"integer directphotons" [500000]
"bool finalgather" ["false"] "integer finalgathersamples" [32]
"integer nused" [50]
"bool directwithphotons" ["false"]
"integer maxdepth" [10]
"float maxdist" [22.5]

WorldBegin
AttributeBegin
TransformBegin
Translate 0 0 0
LightSource "point"
# Photon mapping
#"color I" [.0125 .0125 .0125]
# Ray Tracing
"color I" [10.0125 10.0125 10.0125]
TransformEnd
AttributeEnd
.
. #Geometry stuff in this section
.
WorldEnd

I've posted the side-by-side rendered comparison at:
http://web.ics.purdue.edu/~davewhit/photon_vs_raytrace.jpg

Matt Pharr

unread,
Jun 1, 2009, 5:37:01 PM6/1/09
to pb...@googlegroups.com
Hi..

One thing that might help would be to use the 'exphotonmap' plugin
(the updated photon map plugin described on the pbrt website.) It
should be available as part of the pbrt 1.03 distribution, so you
should just need to change the surface integrator name below.

If you could also post the statistics that are printed when you render
your scene, that could be helpful. My suspicion based on the images
is that the search distance isn't large enough so that it's not
finding enough photons at the lookups, but it's hard to be sure.

That you need to change the light intensity is definitely suspicious--
that shouldn't be necessary. My guess is that once we figure out the
actual issue, that won't be necessary, but we'll cross that bridge
when we get to it...

Thanks,
-matt

psycho...@gmail.com

unread,
Jun 1, 2009, 10:58:09 PM6/1/09
to pbrt
I've switched to the exphotonmap plugin. It certainly looks much
better, but it's still not there yet. It's too dark and grainy
considering the number of photons shot (500k). Below are links to the
latest results:

Image:
http://web.ics.purdue.edu/~davewhit/photon_mapping_exphoton.jpg

Scene:
http://web.ics.purdue.edu/~davewhit/photon.pbrt

thanks,
dave


On Jun 1, 5:37 pm, Matt Pharr <matt.ph...@gmail.com> wrote:
> Hi..
>
> One thing that might help would be to use the 'exphotonmap' plugin  
> (the updated photon map plugin described on the pbrt website.)  It  
> should be available as part of the pbrt 1.03 distribution, so you  
> should just need to change the surface integrator name below.
>
> If you could also post the statistics that are printed when you render  
> your scene, that could be helpful.  My suspicion based on the images  
> is that the search distance isn't large enough so that it's not  
> finding enough photons at the lookups, but it's hard to be sure.
>
> That you need to change the light intensity is definitely suspicious--
> that shouldn't be necessary. My guess is that once we figure out the  
> actual issue, that won't be necessary, but we'll cross that bridge  
> when we get to it...
>
> Thanks,
> -matt
>

psycho...@gmail.com

unread,
Jun 1, 2009, 11:07:03 PM6/1/09
to pbrt
Oh yeah, here's the stats:

Statistics:
Camera
Camera Rays Traced 369.6k
Geometry
Total shapes created 25
Triangle Ray Intersections 3.238M:
31.901M (10.15%)
Triangles created 10
Kd-Tree Accelerator
Avg. number of primitives in leaf nodes 126:32
(3.94x)
Interior kd-tree nodes made 31
Leaf kd-tree nodes made 32
Maximum number of primitives in leaf node 8
Lights
Number of shadow rays traced 98.3k
Photon Map
Discarded photons 12.319M:
26.734M (46.08%)
Final gather rays traced 2.966M
Number of photons shot from lights 323.4k
Radiance photons created 94.8k
Shading
Number of points shaded 855.6k

Sicilia Judice

unread,
Jun 2, 2009, 10:16:35 AM6/2/09
to pb...@googlegroups.com

I tried to use the photonmap integrator too and I have noticed these little white dots in the image, that appears in your image too... Why does this happen?
--
---------------------------------------------------------------------------
Sicilia Ferreira Judice
www.siciliajudice.com

Laboratório Nacional de Computação Cientifica
Avenida Getulio Vargas, 333 - Quitandinha.
Petrópolis, RJ, Brasil - CEP: 25651-075.
Lab. Virtual | Tel. +55 (24) 2233-6098
Fax: (24) 2233-6167 (aos cuidados de Sicilia)

psycho...@gmail.com

unread,
Jun 3, 2009, 6:26:03 PM6/3/09
to pbrt
OK, this is weird. I re-rendered the scene using raytracing again
except instead of a point light, I'm using an area light (just a small
lit sphere in the middle of the scene). The point light renders look
perfect. The area lights - not so much.

This might seem like it warrants a new thread, and maybe it does, but
the results have a similar graininess that I see in my photon mapped
renders. It makes me wonder if there's a problem with my scene file
that's common to both the area-lit scene and the photon mapped scene.

Here's the ray traced scene with area light and the accompanying scene
file:
http://web.ics.purdue.edu/~davewhit/raytrace_one_area_light.jpg
http://web.ics.purdue.edu/~davewhit/raytrace_one_area_light.pbrt

Matt Pharr

unread,
Jun 23, 2009, 1:44:21 PM6/23/09
to pb...@googlegroups.com
I just did some tests and it looks like this is just Monte Carlo
noise; if you add something like "integer nsamples" [16] to the
AreaLight line, it'll trace 16 shadow rays to the area light and the
noise clears up nicely..

Thanks,
-matt
Reply all
Reply to author
Forward
0 new messages