neurohack

Introducing Luminous

Introducing Luminous
By George Moromisato
8 September 2007

Luminous

Procedural Image Creation Software

Download 

There is no good reason to create yet another ray tracer, particularly when there are so many good ray tracers out there. But lacking a good reason never stopped me from doing anything, and that's how I ended up writing a simple ray tracer many years ago.

I have to confess that even by my standards, this ray tracer was pretty crappy. For example, it was probably the only ray tracer in history that didn't support reflections. This is like making pizza without cheese—sure it can be done, but why would you want to?

But I didn't mind so much because I wasn't interested in ray tracing mirrored spheres; instead I wanted to use the ray tracer to volume-render through a Perlin noise function.

What does that mean? Volume-rendering is simple to explain: normal ray tracers work by casting a ray from the camera to the object being rendered (say, a block of wood). When the ray hits the block of wood, we figure out how much light is hitting it, what color the wood is, etc., and then combine it all that to create a pixel on the image. But that only works for solid objects (like wood).

Volume-rendering is used for non-solid objects, like clouds. Instead of computing a single point where the ray hits a solid surface, we have to compute many points as the ray passes through the cloud. The resulting image pixel is a combination of many hits as the ray passes through the volume of the cloud.

And what's a Perlin noise function? Perlin noise is a famous mathematical procedure for creating realistic turbulence—such as you might see in a cloud. How famous is it? Its inventor, Ken Perlin, won an Oscar for creating it. That's pretty famous!

Anyway, why was I so interested in creating computer-generated clouds? Well, if you can render clouds you can render almost any gaseous phenomena. And I was particularly interested in rendering rapidly expanding, self-luminescent gaseous phenomena—in other words, explosions!

I needed some realistic explosions for Transcendence and all this work was just to get some good looking explosions. When I finished, I realized that I could render lots of effects with the same techniques. The red dwarf star image and the stargate effect in Transcendence are both creating using this same ray tracer. Pretty cool for a ray tracer with no reflections, huh?

About a month ago, I found myself needing to create an image of a spiral galaxy (again for Transcendence), so I dusted off my old ray tracer. After a ton of new code and many refreshers on vectors and such, I ended up with some pretty neat-looking galaxies.

Well my ray tracer may not be able to create mirrored anything, but now that I've enhanced it to create explosions and galaxies, I thought that it might be fun to share it with the world.

And so I present Luminous.

It's a program that only a programmer could love because, well, you need to write programs to use it. As with many of my creations (I'm looking at you, Penumbra) it will appeal to a very small audience, mostly because of its steep learning curve, and also because it is slower than you can possibly imagine.

But other than that, I hope you enjoy it.

More...