Interactive Raytracer (CS-184 Project)
So, this is a raytracer. It uses a progressive rendering method and allows the user full view navigation from the display (zoom, dolly, translate and rotate). Additionally, it can render in 2 or 4 parallel threads. A quick feature overview would include reflection, refraction, smooth (phong normal) mesh shading, rudimentary photon mapping, approximate subsurface scattering, jittered antialiasing, and uv-mapped texturing.
Screenshots
Here is a mini gallery showing some if this assignment's output:
videos are real-time screen captures on a core 2 quad (multi-threaded using the '-t 4' option).
|
This is a screencapture of navigating a (non-standard) cornell box. It combines direct illumination and photon mapping (hence the hard shadows). There is one point light in this scene. Here is a lossless still of the scene: here. ![]() This is a photon map only render (which has soft-shadows). This is a screencapture showing a high-poly (34,730 tri) mesh with smooth shading (interpolating normals). This is just direct illumination. High res version here. If you're curious about it, here is what the photon map would look like: here. ![]() 'Tis a scene involving 40,874 triangles and 4 spheres. The robot is smooth shaded and has reflections, the green ball in front of it has refraction and the other polygons are flat-shaded. Additionally the scene is antialiased by a 3x3 jittered grid. It took 44 seconds to render in 4 threads. ![]() A demonstration of uv-mapped textures. This has 4x4 antialiasing. ![]() For comparison, a version without antialiasing. ![]() Some weird green webbed foot thing with a subsurface scatter color of red. This uses the photon map to calculate an approximation for SSS (it doesn't actually scatter photons and I'm not actually sure if the algorithm I've come up with is very sane -- it looks sorta convincing though ;). ![]() The same scene but from in back of the foot (so only the backscattering is visible). There are options for scattering color and how much front and back scattering there is. |
Feature List
- LMB: orbit, MMB: pan, RMB: up-down dolly, right-left zoom
- Output to PNG with the '-o <filename>' option. The resolution can be specified with '-res <w> <h>'
- Loads a '.er' (for EvRay :P) file which describes a scene to be rendered with the '-i <filename>' option. See the sample files from the downloads section for details. There is also an incomplete Blender export script.
- Multithreading support: '-t 2' uses 2 threads, '-t 4' uses 4 threads.
- Antialiasing: -aa <#> will create a #2 jittered aa grid.
- Supports orthographic and perspective cameras.
- Object support: Sphere, Ellipsoid, Triangle Mesh.
- Object options: Cast Shadows, Bounce rays.
- Transform support: Scale, Translate, Rotate (axis-angle & euler)
- Light support: Point, Direction.
- Light options: No specular, No diffuse, Negative, Don't cast shadows.
- Material support: Lambert, Phong (mesh flat or smooth), Cell
- Material options: receive shadows, reflection, refraction, subsurface scattering.
- Texture support: UV-mapped image textures on meshes (only supports rgba pngs right now).
- Photon Mapping modes: map only, mix (with direct), add (to direct), sss only. Only supports point lights.
- Approximate Subsurface Scattering: needs photon mapping enabled (however you can use the sss photon mode to only use photons for SSS approximation.
Download
Here is the binary compiled an a relatively recent linux (2.6.26, glibc 2.8):
-> evray-linux <-
This is an export script for Blender, put it in your .blender/scripts (or equivalent)
directory for all that exporty goodness (which actually isn't that good or complete):
-> export_evray.py <-
Here is a tarball of some sample scene files. Extract these directly into the directory
where you are running evray from or it will complain on including images and importing
mtl files:
-> samples.tgz <-


