|asaldanha 79171538fa Format readme better-er-er-er-er-er.||1 year ago|
|envmaps||4 years ago|
|models||1 year ago|
|papers||2 years ago|
|screens||2 years ago|
|shaders||2 years ago|
|sponza||4 years ago|
|stanford_buddha||4 years ago|
|textures||2 years ago|
|views||2 years ago|
|.hgignore||4 years ago|
|Benchmarks.hs||2 years ago|
|Bounce.hs||2 years ago|
|CookTorrance.hs||2 years ago|
|Filter.hs||4 years ago|
|Graphics.hs||2 years ago|
|Intersect.hs||2 years ago|
|KDTree.hs||2 years ago|
|LICENSE||2 years ago|
|Light.hs||2 years ago|
|Main.hs||2 years ago|
|Mesh.hs||2 years ago|
|Muli-Light.ttf||4 years ago|
|Muli-SemiBold.ttf||4 years ago|
|Obj.hs||2 years ago|
|ParallelImageMap.hs||4 years ago|
|PathSampler.hs||2 years ago|
|README.md||1 year ago|
|RandomDistributions.hs||2 years ago|
|Raytracer.hs||2 years ago|
|Resources.hs||2 years ago|
|Scene.hs||2 years ago|
|Scenes.hs||2 years ago|
|Util.hs||2 years ago|
|Vect.hs||4 years ago|
|pths.cabal||2 years ago|
|stack.yaml||2 years ago|
|stanford_buddha.zip||4 years ago|
A bidirectional monte-carlo path tracer based on Veach's original thesis.
You can use stack to build the application.
$ stack build -j8
Running the application.
$ stack exec pths -- --reso 1900x800 --scene "porcellino" +RTS -N13 `--reso[lution]` specifies the resolution as a <width>x<height `--scene` specifies one of the pre-built scenes `+RTS -N` at the end of the command line specifies the number of threads
There are some other undocumented parameters, but they are yet to actually function.
Initially, the scene will be loaded, and a kd-tree will be constructed, and all transformations in the scene will be baked in.
You will then see a window appear with your scene. You can move the position of the camera with wasd, adjust the direction of the camera with the mouse. Drag the mouse to change the orientation of the camera, and dragging directly left and right will adjust the yaw, dragging directly up and down will adjust the pitch, and you can drag circles to adjust the roll.
When you're ready, take an image with the space key. The progress will show up on the bottom with a black image--when the progress bar makes its way to the other side of the screen, one sample is complete.
The internal parameters of the simulation have to be adjusted in PathSampler.hs at the moment--the total camera and light paths are adjustable. You can move the mouse around to inspect the color of the pixel at that location.
Finally, you can escape the application using the ESC key.
Everything is avaiable to support scenes from the disk, except a simple loader from the disk hasn't been written yet. This may change if I find some time, but unfortunately it wont' change for the forseeable future.
To create a custom scene, simply build the application with a new scene.
See the examples in Scenes.hs--you can add meshes, apply materials with textures to those meshes, and add environment maps.
At the end of Scenes.hs will be a list of mappings from a identifier specified
==scene and the actual variable holding the Scene.
If you're interested in using this for your commmercial project and need support, please don't hesitate to contact me. You can find my contact details at asaldanha.com/resume.html.
If you're using this for a non-commercial project or for personal use, I'd be happy to support you for free, but obviously I can't make any guarantees. I will take feature requests and bug reports, if I have time I can fix them.
You can find the license and associated copyright at the root of the project, in the file called "LICENSE".