
A small ray tracing project. The code is in C++ and licensed under the zlib/libpng license.
Right now I'm only using Monte Carlo ray tracing techniques; i.e. no photon mapping or other global solutions. As this is my first semi-serious work in the non-realtime area, I'm letting it evolve, rather than trying to do everything at once.
It seems to be working, so far.
Calad isn't currently usable, but resides in a public monotone repository on mtn.elmindreda.org, in the branch org.elmindreda.calad.
Features currently in progress:
Sitting at Jamaica ROM working away on the Moira port of Calad. More and more bits are compiling. Yay.
Also, there have been some changes since the last time I worked on Calad. Render times before this entry are on an 800 MHz PowerPC G3. Render times from this point forward are on a 1.6 GHz Core Duo.
Made a little real-time ray tracing Dock demo with Calad, for the Rushed Metal demo compo.
Note; the development of Calad has ceased temporarily, while I develop the Wendy engine. When that code base reaches a usable state, I will move Calad over to it, to take advantage of its facilities.
Development of Calad will then proceed.
Added a rudimentary POSIX command-line driver. Productivity much improved. CLI tools are nice.
Added render timing to the POSIX driver. Render times are no longer guesswork.
Added a new sample-based light interface, unifying directional, point, spot and area lights, without the renderer ever needing to tell them apart.
Added a simple sphere area light. It currently has a ridiculously stupid sampling selection. I'm working on it.
Started rendering my own thumbnails, instead of scaling down the full-size renders (Dicander, 2004).
Scene: File.
Settings: Regular 2x2 supersampling, 100 area light samples.
Render time: 1 minute 52 seconds.
Some people have asked what this area light thingy is all about. I'd like to illustrate with the following, hideously ugly render.
Scene: File.
Settings: Regular 2x2 supersampling, 100 area light samples.
Render time: 2 minutes 53 seconds.
The shadow on the left is made by an area light, while the one on the right is made by a point light. If you're still wondering why it's worth having area lights, then I can't help you.
Added a simple form of directional lights. Room for improvement exists.
Cleaned up various internal interfaces.
Added tons of support code and primitive/frustum intersection tests.
Rendering is down, pending interface stabilisation.
Made a quick and sloppy attempt at converting my latest scene to the famous POV-Ray renderer.
| Rendered by POV-Ray | Rendered by Calad |
|
Scene: File. |
Scene: File. |
Note that I didn't attempt to get a similar rendering output.
Instead, I tried feeding them as similar a dataset as possible.
Anyone who's more fluent in SDL is welcome to suggest improvements.
I'm guessing from the results that POV-Ray defines the camera's position as the primary ray convergence point, which would account for the difference in distance, since Calad no longer does this. Perhaps I should switch back.
Simplified the XML scene format a bit.
Fixed a bug in the refraction calculations.
Redesigned various internal interfaces.
Stress. Lots of it. No real progress today.
No new features today. Just played around, making something a bit more realistic than before.
Fixed a few bugs that arose during the making of today's image.
Scene: File.
Settings: Importance limit of 0.1, 10x10 depth of field supersampling.
Render time: Slow, all right?
The ruby's caustics are sorely missed.
Note to self; I should write the same scene in POV-Ray and compare the results.
Added support for multiple, named cameras in scenes.
Added rudimentary XML scene loading capability.
Added the specular refraction part of global transmissiveness. (That's transparency in English.)
Scene: File.
Settings: Importance limit of 0.1, 10x10 depth of field supersampling.
Render time: Cup-of-coffee-slow.
It's official; the new renderer now supports every single feature the previous one had, and it does them better.
Still haven't changed the aperture size unit...
Added oriented boxes as primitives.
Expanded local reflection model to full Phong.
Added depth of field. For now it's considered a supersampling method, so it cannot be combined with any other such method. This shows quite clearly close to the focal plane.
Started using other surface materials in test scenes.
Cleaned up the camera's image plane model, as a nice side-effect of implementing depth of field.
Scene: Two spheres, a plane and a box, with various materials. One point light source.
Settings: Recursion depth of 3, 10x10 depth of field supersampling, importance limit of 0.1, aperture width of 100 pixels.
Render time: Really, really slow.
Note to self; switch to a saner aperture size unit.
Resolved the silly specularity bug, and various others.
Corrected a stupid mistake in the local term of the lighting model.
Added local Phong-like model.
Scene: Two intersecting spheres, sharing a purple surface material. One point light source.
Render time: Still just as slow.
Added basic global specular reflection.
Scene: Two spheres and a plane, sharing a purple surface material. One point light source.
Settings: Recursion depth of 3.
Render time: Even slower, but pretty.
Added regular (brute-force) supersampling.
Scene: Two spheres and a plane, sharing a purple surface material. One point light source.
Settings: Recursion depth of 3, 3x3 supersampling.
Render time: Slow beyond belief, but even prettier.
Added adaptive depth control (Hall and Greenberg, 1983).
Scene: Two spheres and a plane, sharing a purple surface material. One point light source.
Settings: Recursion depth of 3, 3x3 supersampling, importance limit of 0.1.
Render time: Not noticeably faster, but slightly different results.
I know I'm still using the same surface material on all objects.
I do have a fully functional surface material system. I just happen to like purple.
Silly specularity bug plauges output.
Yay for the speed of square roots.
My beloved cat Pixel past away.
May she rest in peace.
Grief and madness.
Imported expat into project.
Decided on initial basic lighting model.
Stuck in XML format and surface property system design bog.
New renderer sort of almost working; casts primary rays.
Scene: A single sphere.
Render time: Slowest white circle ever.
Threw away previous, quick-and-dirty renderer.
Begun planning of new renderer.
Here is a rendering from the old renderer:
Scene: Three spheres, one diffuse, one reflective and refractive, one fully reflective. Six planes. One point light source.
Settings: Recursion depth of 20.
Render time: About three seconds.
© elmindreda