Wednesday, June 22, 2011

Photon mapping ownz!

Hi there, it's been a while.

I've implemented progressive photon mapping, first exactly as it is in original paper (constructing hitmap once and shooting photons in the main loop), it was all nice and fast but quite troublesome, especially if it comes to antialiasing and glossy materials.
Then i've implemented the more basic approach to PPM as in this paper.

But I have some isues as for now:
  • I am not sure about the adjoint bsdf for shading normals. What's obvious is smooth normals didnt work out of the box for the lambertian. What I did is using original normal, and scaling contribution by |in*nor_s| / |in*nor_g|, kinda works but I am not sure. What with other materials? For specular and dielectric it seems to work with just smoothed normal in place of the geometric one.
  • Since I'm still using Java I have problems with Garbage Collector, I build uniform grid for 100000 - 200000 photons every pass on all 8 threads separately and that really kills the GC, even if I try to reuse the grid. Any suggestions?
  • Shading on hard corners, for example 90 degree corners between the walls. Right now I use simple hack to check for the angle between the photon and surface normal, but that makes them black, the blackness does shrink over time but doesn't seem to ever disappear. So I wonder if it wouldn't be a better choice to leave it alone converging to the right sollution in +inf time and 1/inf radius (?)
Other than that it's blazing fast. This image took around one hour to render:


But was already pretty good after minutes.

Monday, November 1, 2010

Couldn't resist the GPU hype,

so I wrote an open cl path tracer in C. It's very similar to Dade's SmallptGPU but it uses float4 though.
I don't have proper GPU to test it on, but I got tempted by sse operations that vector operations supposedly utilize.

A performance note:

While I get 2 fps on this scene with my core 2 duo (no ht), my friend with his radeon 4870 gets almost 60 fps.
I'm not yet sure if thats good enough.



(I misleadingly called frames samples, while they are samples per pixel, yea)

Thursday, October 14, 2010

Water caustics


One of the hardcore scenes to test. Forgive me the noise but my bvh is so slow :(.

Cheers.

Wednesday, October 13, 2010

A little update


Hi there,

What's new:
  • Added Beer's law to the glass material - you can tell how absorption varies with the distance traveled (for ex. monkey's ear is barely colored versus it's middle).
  • Pixel filtering - added variety of filters. The black border around the light source is due the negative values of mitchell filter.
  • Reimplemented simple bvh and .obj parser.
Btw. could somebody tell me:
when I specify my light intensity with pure rgb triplet as its emittance, for ex. (15, 15, 15) - what units are those? And how could I convert between other, perhaps more physically convenient, units? so I could compare my results with other renderers.

Cheers.


Monday, September 27, 2010

Sup?



Friend of mine has i7:


rendering time: 20 minutes, no direct lightning, just naive path tracing with metropolis sampling.

Sunday, September 26, 2010

Saturday, September 18, 2010

I'm back

Yet again starting from scratch. Playing with metropolis.



Naive path tracing on the left, same thing but with metropolis on the right.