graviton

Graviton is my little pet, hobby ray tracer project. For fun and to learn mostly. News and screenshots will be posted, source code as well.
It's written in C with the use of SDL for graphical output, and is developed on a linux workstation.
I must say it's quite amazing that this beautiful theory combined with, relatively, little code can produce so complex, exact and nice looking images.

Current 'features':

Check out the TODO!

latest screenshot
Latest screenshot


Source release (2004-06-16)

Better late than never eh? Hehe. Nothing new is added or changed (well I did rip out the worthless scene format reader). But have fun anyways!
download 0.1

Bla (2004-04-26)

I think I fixed some error(s) in the reflection code (again). I also tried to use .ini to describe scenes. It didn't go very well, but I might try again later. Nothing else is new..looked a little at photon mapping and such cool things..pretty amazing stuff.

Fog (2004-03-27)

I have fog, yay! Just boring, all over, dull looking fog, but still. Now I think I'll add some simple option controlling, like a very simple scene description format. Also time to do some more cleaning up. fog

Debugging (2004-03-23)

Added nice, simple bitmap text-output for easy debugging and general info. This helped me fix a couple of little annoying bugs. Shading and shadows, again. Also added the ability to control the (one and only, as of now) light's x, y, z position with the keyboard and mouse. Implemented unique ID number for each object.

Auditing (2004-03-16)

Phew. It all began when I discovered that the shading compared to the light was reversed. So I started to go through what I thought was my elegant code . I discovered the bug, and many more. Most related to the so easily incorporated shadows feature, hehe. Also fixed some other color issues and did some small speed optimisations. Put in an FPS counter to see how slow this is, I get around 8 fps with three spheres, one plane, one moving point light, shadows and reflections on (1GHz CPU). small fixes

Shadows (2004-03-16)

After fiddling with reflections I wanted to remove the aliasing, so I read and tried to code some supersampling stuff. The result was horrible. I used a threshold value for differance between nearby colors and applied a simple box blur if necessary. Didn't work out, so I dropped it for the moment. Turned my attention to shadows instead, boom bang read a little and kazam! a little code gives me sweet looking shadows.

Reflections (2004-03-15)

Trying to implement reflections. It's supposed to be easy, and I think I've figured out the hard part. But it still looks wrong :-)
first try, second.
[a few moments later] Many thanks to Hipo for pointing out that I wasn't firing my rays properly. Now it looks nice: reflections, nicer. I also went through the sources and made sure it all compiles with -ansi.

First images (2004-02-2?)

Wee! The first images produced by Graviton. Ever!
spheres, planes.


Links

Very helpful stuff, thanks.
http://www.cfxweb.net/~lyc/tomtrace.html
http://www.cfxweb.net/~cfxamir/tutorials.html
http://www.2tothex.com/raytracing/index.html
http://polygone.flipcode.com/
http://home.hccnet.nl/w.vdongen/Raytracer/History.html
http://lycium.cfxweb.net/
http://fuzzyphoton.tripod.com/
http://www.cs.fit.edu/wds/classes/adv-graphics/raytrace/raytrace.html
http://www.nic.fi/~hipo/
http://astronomy.swin.edu.au/~pbourke/rendering/aliasing/

(c) 2004 Joel [ xhtml, css ] Okay, so it doesn't validate. Sorry.