The crocodile package

[Tags: gpl, program]

This is an offline renderer written purely in Haskell, supporting ray tracing and photon mapping with an irradiance cache


[Skip to ReadMe]

Properties

Versions0.1, 0.1.1, 0.1.2
Change logNone available
Dependenciesbase (==4.*), bmp, bytestring, deepseq, ghc-prim, heap, HUnit, mersenne-random-pure64, mtl, parallel [details]
LicenseGPL-2
AuthorTom Hammersley
Maintainertomhammersley@gmail.com
CategoryGraphics
Home pagehttps://github.com/TomHammersley/HaskellRenderer/
Executablescrocodile
UploadedTue Sep 13 20:08:33 UTC 2011 by TomHammersley
Downloads542 total (23 in last 30 days)
Votes
0 []
StatusDocs not available [build log]
All reported builds failed as of 2015-05-26 [all 2 reports]

Downloads

Maintainers' corner

For package maintainers and hackage trustees

Readme for crocodile-0.1

Haskell Ray Tracer and Photon Mapper v0.0
-----------------------------------------

This is a parallel ray tracer and partially parallel photon mapper written in Haskell. 

Features:

Fully recursive raytracer with reflection and refraction
* Sphere primitive
* Plane primitive
* Triangle mesh primitive
* Parallelised ray tracing
* Distributed ray tracing giving depth of field and anti-aliasing
* Photon mapping
* Irradiance caching
* Gamma correction
* Tone mapping

Disclaimer
----------

I am a novice Haskell programmer. This code is not intended to be representative of best-practice Haskell programming.

If you see code that could be improved in terms of style, correctness, clarity, flexibility or efficiency, please, let me know! I'm eager to learn and I'd love to hear the opinion of those far more capable than me.

Why call it "crocodile"?
------------------------

My two-year old son currently has quite a penchant for crocodiles.

Usage
-----

Currently there is a default hard-coded scene of the Cornell Box. I build the program with:

scripts/build

and execute it with:

time ./crocodile -p -i -c +RTS -N -RTS

Cabal also works, of course

This will output a file called test.bmp containing the resulting image. Depending on the number of photons emitted, the photon gathering radius and the maximum number of photons gathered, this could take quite some time. You can tune the parameters in Main.hs.

Options
-------

-i outputs intermediate renderings for fast debug feedback (recommended)
-p enables the photon mapping pass
-v directly visualises the photon map
-c enable the irradiance cache

Bugs
----

The Photon Mapping is largely functional though it currently has some minor artefacts. Work is ongoing to fix them.
There are numerous TODO issues noted in the code.

Future planned work
-------------------

* Gradients for the irradiance cache
* Parsing of scene data files
* Optimisation! Particularly of photon mapping
* Parallelisation of photon gathering
* Extended shader model
* Alternative GI code paths - e.g. path tracing
* Caustic photon mapping

Tom Hammersley 12/5/2011
tomhammersley@gmail.com