| Submitted by , posted on 04 April 2002 |

Image Description, by I'm working on a realtime raytracer in my spare time and have decided to release a demo (WIN32 platform) and some images of what I'm doing. The raytracer gets its main speed increase from adaptive subsampling, i.e. I start by tracing the four corners of a N*N rectangle and compare color values. If the difference is too big, I subdivide the N*N into four N/2*N/2 rectangles and process those recursively and so on until I have reached pixel accuracy or the color differences have become too small to matter, in which case I let OpenGL draw the rectangle using interpolation. Texturemapping is done by the raytacer, not OpenGL.
The demo uses an initial rectangle size of 4*4 for the tracing since I want to show thin cylinders (casting thin shadows too) that sometimes will take up less than 4 pixels wide and risk flickering if I take a larger initial blockwidth. The demo runs fine in 320x240 on my PIII 900.
The top four images are stills from scenes in the demo, the bottom left is another scene and the bottom right is the same as the bottom left but showing only those pixels that are actually traced (shown as full white pixels here). All the black in that picture is where interpolated pixels go in the real picture.
You can find more pictures, a download and a full explanation of the engine at:
http://home.tiscali.be/slinline/trezebees.html
Cheers,
Nils Desle

[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.