Archive for the ‘enlight’ Category

Planes and patterns

Posted: December 17, 2012 in enlight
Tags: , ,

Implemented some more functionality in Enlight – now we have infinite primitives to play with, starting off with planes:

Image

Still no lighting yet, as you can see. But that should be fairly easy to add once the core primitives and tracing functions are all working nicely.

All the textures are defined using Clisk functions, which has proved to be a very effective way to quickly generate 3D textures (all of the textures in the above scene were simple one-liners).

The scene itself is defined using a Scene Description Language, which is a DSL roughly based on the POVRay format translated into Clojure s-expressions. I’m not entirely happy with this yet, will probably go through a few iterations before I push out a finalised version. Defining a sphere currently looks roughly like this:


[:sphere [1 1 1] :radius 2 :colour [1 0 1]]

 

 

 

Advertisements