Submitted by , posted on 17 February 2004



Image Description, by


This is the first image correctly generated using my photon mapping software. Long time readers may remember rtChess (google it if you don't) which used my speedy ray tracer. Well I ripped the RT code out and made a library of it and sqeezed another 40% performance over the version in rtChess. Over the last year of my limited spare time, I implemented photon mapping on top of this fantastic ray tracing code. I am disappointed with the speed of the photon mapped rendering, and will be working on that soon. I suspect a hidden bug, as the O(n) doesn't seem to scale properly.

In this image, eye rays are cast into the scene and secondary rays are used for the reflections. All diffuse illumination is taken from the photon map. There are about 10000 direct illumination photons plus the indirect ones (don't have a count) with 511 being used in the radiance estimate. The photon map takes seconds to build, but the rendering takes 6 minutes or so (this is more than the 10 seconds I'll be shooting for) on my Athlon 700 with no interpolation.

About the library:

Primitives are implemented as subclasses of rtPrimitive and include:
  • Triangle
  • Quad
  • Quadric - completely general
  • Sphere (derived from Quadric - hides the complexity)
  • Torus (with 4 parameters - major & minor radius, and the 2 radii of the cross section)
  • CSG (Quadrics only, but more are planned - just need to fill in some functions)
  • Quadratic Lathe - this was used to easily create most of the rtChess pieces from sketches.
  • Textures are procedural - this subsystem is due for an update though.
    Very efficient spatial index designed for animated scenes - updates are fast.
    Render to memory.
    Adaptive interpolation to speed RT
    RT can render several million primitives at interactive rates.
    Multi-thread ready - we tested it at one time with impressive results, but took it out.
    *NEW* photon mapping to provide global illumination (this is thread safe too). All library code 100% written from scratch over the last 10 years.

    I have always thought the end-game in graphics would be RT, but there was no good way to do global illumination. I thought RT might form a basis for global illumination, and that has turned out to be true. I have progressively less time to work on this project, so it is for sale to the right buyer. Barring that, you might find it under the GPL some day.

    Thanks,
    Paul



    [prev]
    Image of the Day Gallery
    www.flipcode.com

    [next]


     


    Copyright 1999-2008 (C) FLIPCODE.COM and/or the original content author(s). All rights reserved.
    Please read our Terms, Conditions, and Privacy information.