Saturday, January 9, 2010

Metropolis Light Transport and stuff.


Hi!

Long time no see. Like always I was rewriting it from scratch a couple of times. But nevertheless it's still java and now it uses metropolis sampling to help that poor path tracing converge.

Btw. I did MLT on yesterday evening after 2 beers (it had to be Ballmer peak).

Altough the implementation is still very fresh it easily outperforms standard path tracing, what is to be seen especially when difficult caustics are involved.

I've implemented spectral rendering too, it was very easy actually, cause all computations on wavelengths are linear just like rgb. But then I realised that even if it does feel more physically correct to do so, whats the point? 3d applications are operating in rgb color space, and because I cant represent a rgb color as spectrum interchangeably I have to approximate it, so as long as I'm not running a physical simulation or something I don't see the benefits (please correct me if I'm wrong), thus I abandoned that.

I was also working on dispersion (rgb rendering), but that feature needs a little more work (I've included an old pure path tracing rendering with dispersion visible)

Edit:

Monday, June 29, 2009

Explicit direct lightning

gives a lot,

unmatched quality:

A fireflies happen to appear from time to time (there is one on the ceiling for example) and, what's funny, it's a random thing while my PRNG has constant seed values.
I'm almost sure its because all threads share one random number generator and what seem to happen they are at times calling random procedure ALMOST in the same time, reassigning the values unpredictably.

Edit:

Monday, June 22, 2009

Blah

Seems my sRGB conversion was causing that fireflies from previous images.

Btw. I was wondering why the farthest I've ever get in ray tracing (excluding fixed path MLT in C++) was when I was using OCaml. Say what You want, but that functional language thing fitted ray tracing very well. Also, but that's maybe caused by my nature - now when I have dozens of ways to implement something I start to wonder what way to choose, what would lead to better design. Too many options confuse me, and slow me down big time.




I've set emitter colour to rgb approximation of 2600K, it makes some nice, realistic atmosphere.

It's still naive path tracing, though.

Multithreading and some GUI

Hi there,

I've added some multithreading and was playing with gui in swing.

As far as everything was a very pleasant experience, I'm concerned that
I got only ~190% load on my two cores, what means that the speedup is not exactly 2x.

So I've tested sunflowand noticed
that it also doesn't get anywhere near 200% - 180%-190% most likely. So I don't know...

Sunday, June 14, 2009

Java path tracing

Hello I'm back.

My current weapon of choice is Java though.

The renderer supports:
  • median split BVH,
  • thin lens and pinhole camera models,
  • sphere and Triangle primitives,
  • naive path tracing with lambertian surfaces only,
  • rendering in a progressive manner.
Performance is not that bad. I designed it to take full advantage of the new feature of java called Escape Analysis, so I'm not reusing objects (what leads to ugly code btw.) but creating them like crazy.

What sucks though is that there is no 1.6.0_14 java for Mac OS X yet, but I've tested in on windows and it works very well.

Some first, naive path tracing, renderings: