Personal tools

Glome

From HaskellWiki

(Difference between revisions)
Jump to: navigation, search
(8 intermediate revisions by one user not shown)
Line 2: Line 2:
 
Glome is a ray tracer written by Jim Snow. Originally it was written in Ocaml, but the more recent versions are written in Haskell.
 
Glome is a ray tracer written by Jim Snow. Originally it was written in Ocaml, but the more recent versions are written in Haskell.
   
Glome renders into an OpenGL window, and thus requires HOpenGL, though the libraries GlomeVec and GlomeTrace do not.
+
Glome consists of the vector library GlomeVec, the ray tracing library GlomeTrace and an application called GlomeView.
   
===GlomeVec===
+
GlomeView renders into an SDL window, and thus requires SDL. The ray tracing engine itself, though, has few dependencies.
GlomeVec is the vector library used by Glome. On Oct 25, 2009, it was released as a separate library.
+
  +
(There is a deprecated package available on Hackage called glome-hs, which renders into an OpenGL window. It probably won't work with recent versions of GlomeTrace.)
  +
  +
If everything works, you should see an image something like this when you run Glome the first time:
  +
  +
[[Image:Glome-testscene-small.png]]
  +
  +
(Use +RTS -N4 or whatever if you want to use more than one core.)
  +
  +
Glome does not have a scene description language of its own (save for a rather rudimentary NFF parser), so the most convenient way to describe a scene is directly in Haskell. One can edit the file TestScene.hs included in GlomeView, then re-compile.
  +
  +
==News==
  +
* Oct 25, 2009: GlomeVec library released
  +
* Jan 20, 2010: GlomeTrace library released
  +
* Jan 22, 2010: New version of GlomeVec to (hopefully) fix GlomeTrace compile * failure
  +
* Jan 27, 2014: New version of GlomeVec, GlomeTrace, and GlomeView fixing several bugs that caused CSG to render incorrectly.
  +
  +
==GlomeVec==
  +
GlomeVec is the vector library used by Glome. Originally, it was part of Glome, but now it is a separate library. It isn't implemented in any particularly clever way, but it has many useful routines for graphics built-in, like transformation matrices.
   
 
GlomeVec is also used by a separate project, [[IcoGrid]]
 
GlomeVec is also used by a separate project, [[IcoGrid]]
  +
  +
GlomeVec also includes a basic solid texture library. Right now, it has an implementation of perlin noise and a couple of simple textures like stripes.
   
 
==GlomeTrace==
 
==GlomeTrace==
GlomeTrace is a library that provides ray-tracing algorithms and a variety of geometry primitives. It was released as a separate library on Jan 20, 2010.
+
GlomeTrace is a library that provides ray-tracing algorithms and a variety of geometry primitives. Originally, it was part of Glome, but now it is a stand-alone library.
   
 
Supported base primitives include: sphere, triangle, cone, cylinder, disc, plane, and box.
 
Supported base primitives include: sphere, triangle, cone, cylinder, disc, plane, and box.
Line 23: Line 25:
   
 
*[[Glome tutorial]]
 
*[[Glome tutorial]]
  +
  +
==Features Lacking in Glome==
  +
  +
This is a sort of to-do list
  +
  +
*Antialiasing
  +
*Refraction
  +
*Photon mapping
  +
*PLY file parser
  +
*Rendering to a file
  +
*Support for portals
  +
*Ability to tag objects and have ray intersection return the tag to tell you what you hit.
   
 
==Questions==
 
==Questions==
Line 28: Line 42:
 
Send any questions to the author: jsnow@cs.pdx.edu
 
Send any questions to the author: jsnow@cs.pdx.edu
 
In particular, I'd like to know if the test image is failing to render on you platform, or if it is failing to build.
 
In particular, I'd like to know if the test image is failing to render on you platform, or if it is failing to build.
  +
  +
==Other Notable Renderers==
  +
  +
These are some successful open-source ray tracers. They're worth looking at for anyone interested in writing their own.
  +
  +
* [http://www.povray.org/ POV-Ray] - fairly slow, high-quality renderer with many features. This is the renderer that has had the most influence on the design of Glome.
  +
* [http://igad.nhtv.nl/~bikker/ Arauna] - high performance renderer used for realtime games, faster than Glome by two or three orders of magnitude.
  +
* [http://www.pbrt.org/ PBRT] - topic of an excellent book on ray tracing.
   
 
==Links==
 
==Links==
   
* [http://hackage.haskell.org/package/glome-hs Glome on Hackage]
+
* [https://github.com/jimsnow/glome Glome repositories on github]
  +
* [http://hackage.haskell.org/package/GlomeView Glome Viewer on Hackage]
 
* [http://hackage.haskell.org/package/GlomeVec GlomeVec on Hackage]
 
* [http://hackage.haskell.org/package/GlomeVec GlomeVec on Hackage]
 
* [http://hackage.haskell.org/package/GlomeTrace GlomeTrace on Hackage]
 
* [http://hackage.haskell.org/package/GlomeTrace GlomeTrace on Hackage]
 
* [http://en.wikipedia.org/wiki/Bounding_interval_hierarchy BIH on Wikipedia]
 
* [http://en.wikipedia.org/wiki/Bounding_interval_hierarchy BIH on Wikipedia]
  +
* [http://tog.acm.org/resources/RTNews/html/ Ray Tracing News]
  +
* [http://tog.acm.org/resources/SPD/ The Standard Procedural Database]
  +
* [http://www-graphics.stanford.edu/data/3Dscanrep/ Stanford Scanning Repository]
  +
* [http://ompf2.com resurrected OMPF forum]

Revision as of 21:10, 27 January 2014

Contents

1 About

Glome is a ray tracer written by Jim Snow. Originally it was written in Ocaml, but the more recent versions are written in Haskell.

Glome consists of the vector library GlomeVec, the ray tracing library GlomeTrace and an application called GlomeView.

GlomeView renders into an SDL window, and thus requires SDL. The ray tracing engine itself, though, has few dependencies.

(There is a deprecated package available on Hackage called glome-hs, which renders into an OpenGL window. It probably won't work with recent versions of GlomeTrace.)

If everything works, you should see an image something like this when you run Glome the first time:

Glome-testscene-small.png

(Use +RTS -N4 or whatever if you want to use more than one core.)

Glome does not have a scene description language of its own (save for a rather rudimentary NFF parser), so the most convenient way to describe a scene is directly in Haskell. One can edit the file TestScene.hs included in GlomeView, then re-compile.

2 News

  • Oct 25, 2009: GlomeVec library released
  • Jan 20, 2010: GlomeTrace library released
  • Jan 22, 2010: New version of GlomeVec to (hopefully) fix GlomeTrace compile * failure
  • Jan 27, 2014: New version of GlomeVec, GlomeTrace, and GlomeView fixing several bugs that caused CSG to render incorrectly.

3 GlomeVec

GlomeVec is the vector library used by Glome. Originally, it was part of Glome, but now it is a separate library. It isn't implemented in any particularly clever way, but it has many useful routines for graphics built-in, like transformation matrices.

GlomeVec is also used by a separate project, IcoGrid

GlomeVec also includes a basic solid texture library. Right now, it has an implementation of perlin noise and a couple of simple textures like stripes.

4 GlomeTrace

GlomeTrace is a library that provides ray-tracing algorithms and a variety of geometry primitives. Originally, it was part of Glome, but now it is a stand-alone library.

Supported base primitives include: sphere, triangle, cone, cylinder, disc, plane, and box.

Composite primitives (those which are containers for other primitives) include groups, csg differenc and intersection, transformed instances, textured objects, and bounding objects.

In addition, there is an implementation of the BIH acceleration structure, which automatically builds a bounding volume hierarchy around unsorted lists of primitives. This greatly improves the performance for large scenes.

GlomeTrace depends on GlomeVec, but it doesn't have any other unusual dependencies.

5 Documentation

6 Features Lacking in Glome

This is a sort of to-do list

  • Antialiasing
  • Refraction
  • Photon mapping
  • PLY file parser
  • Rendering to a file
  • Support for portals
  • Ability to tag objects and have ray intersection return the tag to tell you what you hit.

7 Questions

Send any questions to the author: jsnow@cs.pdx.edu In particular, I'd like to know if the test image is failing to render on you platform, or if it is failing to build.

8 Other Notable Renderers

These are some successful open-source ray tracers. They're worth looking at for anyone interested in writing their own.

  • POV-Ray - fairly slow, high-quality renderer with many features. This is the renderer that has had the most influence on the design of Glome.
  • Arauna - high performance renderer used for realtime games, faster than Glome by two or three orders of magnitude.
  • PBRT - topic of an excellent book on ray tracing.

9 Links