| documentation download gallery jsnow |
| About: |
functional ray tracing
Two ray tracers called Glome exist: the original was written in Ocaml, but I've written a new incarnation in Haskell. Many features are similar on both, but each ray tracer supports a few features that the other lacks. Where necessary to avoid ambiguity, these will be referred to as Glome.ml and Glome.hs.
License: gpl version 2.
Author: Jim Snow
Named after: Fictional kingdom in C.S. Lewis's excellent but not particularly well-known book Till we have Faces. (Coincidently, it also happens to be the name of a 4-dimensional hypersphere.)
There is a tutorial for Glome.hs on the haskell wiki here. (This is a work-in-progress.)
|
|
| Features: |
- loads subset of NFF format used by spd (ml and hs) or PLY (used by the Stanford scanning repository) (ml only).
- uses kd-tree optimized with surface area heuristic (ml only) or a bih tree without SAH (ml and hs)
- joystick support (sort of): hold down first button to move, second to rotate, third to toggle kd-tree visualization mode (ml only)
- photon mapping (ml only)
- csg difference and intersection (hs)
- transformation matrices (hs)
- spheres, triangles (hs,ml), cylinders, cones, discs, boxes (hs only)
- portals (hs only, not robust)
- reflection, diffuse illumination, shadows (ml,hs), blinn highlights, perlin noise textures (hs only)
|
| Requirements: |
Glome.ml
- ocaml compiler
- lablgl package (bindings for GL and GLUT)
- make
|
Glome.hs
- ghc compiler
- GL and GLUT bindings (included in core distribution)
|
| Limitations and bugs: |
- no normal mapping for polygon patches (works in hs)
- view rotation via joystick doesn't work correctly
- kd-tree construction is slow
- memory utilization is high
- no threading (shared-memory concurrency is not supported by ocaml, in haskell it causes excessive memory consumption)
- standard lighting model disabled in Glome.ml 0.4
- not particularly fast in general
- the stack can overflow sometimes (if this happens, set a bigger limit with "ulimit -s N")
|
| More information: |
NEW! Glome Tutorial
Discussion over at ompf.org. I describe the photon mapping implementation in this thread. Haskell port announced in this thread.
If you do something interesting with Glome, I'd like to hear about it. Also, if you have any questions, bug reports, or feature requests, please don't hesitate to contact me.
|
| Downloads: |
Glome.ml
- glome-0.1.tar.bz2 Dec 2006 (initial release)
- glome-0.2.tar.bz2 Jan 11 2007 (name changed to glome, added triangle support, joystick)
- glome-0.3.tar.bz2 Jan 17 2007 (new kdtree compiler (warning: it can overflow the stack on large scenes), code reorganization (no more objects), speed improvements, some of the kdtree stats are broken)
- glome-0.4.tar.bz2 Jan 26 2008 (added bih implementation, rudimentary ply parser, basic photon mapping)
|
Glome.hs
Hackage page
- glome.hs-0.1.tar.gz Mar 25 2008 (haskell port: supports bih, NFF files, no kd-tree, ply, or photon mapping support)
- glome.hs-0.2-bug.tar.gz Mar 27 2008 (for bug report: generates bad output with -fasm -O2 good bad)
- glome.hs-0.3.tar.gz Apr 16 2008 (added support for cylinders, cones, disks, csg difference and intersection, transformations, bounding objects, perlin noise, blinn highlights, command line file options, many bug fixes) (note: there is a bug in the transformation code that can cause some things in a bih structure not to be rendered)
- glome.hs-0.4.tar.gz Apr 18 2008 (converted to cabal, fixed a handful of bugs)
- glome-hs-0.4.1.tar.gz Apr 19 2008 (code cleanup, cabal fixes, now hosted on hackage)
- glome-hs-0.5.tar.gz May 19 2008 (transition to type classes, packet tracing, flatten_transform is broken in this release, dependency on "binary" accidently left on; if you don't have the binary library installed, simply remove it from the Build-Depends: line in glome-hs.cabal)
- glome-hs-0.51.tar.gz May 24 2008 (fixed bogus dependency and flatten_transform, performance improvements, added rayint_debug) (this version segfaults on Fedora Core 8 for me, but works on an Ubuntu box, both with ghc 6.8.2) (update: the segfault is likely to to pointSmooth being enabled, try disabling this in Glome.hs)
|
| Gallery: |
The standard SPD sphereflake, rendered with an early version of Glome.ml (originally called "behold"):
SPD tetrahedron scene, with the acceleration structure visible:
Dragon from the Stanford scanning repository, BIH structure visible:
Early attempt at photon mapping (Glome.ml). I ported the Cornell box to SPD, using a point light instead of an area light.
Another attempt at photon mapping:
Glome.hs demonstration of a variety of geometry types. The scene is coded directly in Haskell, without any external datafiles.
|
| Links: |
General information:
My competitors:
Other stuff:
|
| Cruft: |
|