Pane by Kevin Beason (11/24/03) INTRODUCTION Pane is a global illumination ray tracer. It uses photon-mapping and ray-tracing to create an image, given a scene described in the Open Inventor file format. For more information about Pane, visit: http://www.csit.fsu.edu/~beason/pane/ REQUIREMENTS * g++ * make * Open Inventor Pane was developed on the Intel architecture running Redhat 9.0 (and 7.3) with SGI's Open Inventor. Open Inventor is required and can be found here: http://oss.sgi.com/projects/inventor/ I suggest compiling Inventor from CVS sources. COMPILING: To compile Pane: make Other options: make # uses -O6 optimization make DEBUG=1 # gdb works, no optimization make GPROF=1 # gprof works, no optimization make O3=1 # -O3 optimization make NOOPT=1 # no optimization Combinations of the above flags may also work. RUNNING: Run `pane --help` for command-line options. An important option is the "-u" option for specifying the conversion factor of world units-per-meter. This has a great deal to do with how bright your scene will be. Keep in mind there must be lightsources (either a point light or a surface with an emissiveColor), and the brightness is in watts. Try "emissiveColor 1 1 1" for a 60W light. When using the viewer, be sure to shoot photons (the 'P' key) before rendering. To run pane without an interactive viewer, use "-r". Examples: These examples use the included scene.iv, which is modeled after Dr. Henrik Jensen's version of the Cornell box: http://graphics.ucsd.edu/~henrik/images/imgs/cboxgi.jpg # simple render of Cornell box (no global illumination, # 1 light sample). ./pane -u40 -a0 -r # approximate global illumination (GI) render of Cornell box ./pane -u40 --approx -r # quick GI render of Cornell box (about 45 seconds) ./pane -u40 -r # Monte Carlo path traced image of Cornell box (about an hour) ./pane -u40 -a2 -s1000 -r # create animation of Cornell box, using keyframes in camlist.iv. # writes anim.001.ppm through anim.100.ppm. ./pane -u40 -r --animate --frames=100 -o anim.iv # Jensen's version of Cornell box ./pane -u40 -r -d1024x768 --gatherrays=400 -s4 --rindex=1.5 \ --photons=200000 --estimate=100 --cphotons=50000 --cestimate=50 Here is the break down of the above command: ./pane \ -u40 \ # 40 scene units per meter -r \ # off-screen render -d1024x768 \ # resolution of image --gatherrays=400 \ # gather rays for GI -s4 \ # 4 samples per pixel --photons=200000 --estimate=100 \ # global photon map parameters --cphotons=50000 --cestimate=50 \ # caustic photon map parameters --rindex=1.5 # glass index of refr. 1.5 # Per H. Christensen's Cornell box ./pane -u367 -r -d1024x1024 --photons=400000 \ --estimate=200 --gatherrays=3000 -s4 scene_christensen.iv TIPS General notes: You must have a light source. You can create a headlight in the viewer with the H key, and adjust it's power with +/-. Also see the light source notes below. Super-sample with "-s4", "-s16", etc., for 4 and 16 samples-per-pixel. Any number is okay. The default inventor material uses shininess 0.2. If you don't want your surfaces to appear shiny, use "--noshiny" or put "shininess 0" in the material definition(s). To make an animation, load your scene in Pane and position the camera at the key frames of your animation. After each camera positioning, press ESC, then 'c' to output the camera node. Insert this camera node into 'camlist.iv'. When done, render with '-r --animate --frames=100', where 100 can be any number greater than zero. Pane will automatically interpolate between the camera positions and render each frame. To preview the camera motion, just use '--frames=100 --animate'. Pane assumes 67 fps. Light Source notes: To create a point light, use a PointLight node. The intensity and color fields are honored. The emission is the "color" field, scaled by the "intensity" field, and is in 1 Watt units. For example, "color 1 1 1" would create roughly, a 60W light. To create an area light, make a triangle, or set of triangles, and set their emissiveColor to the power in 1 Watt units. For example, to simulate a flourescent light fixture, create two triangles that form a rectangle and give each half the power. To determine the lumens of a light of power [ x x x ], calculate lumens = x * 1.3291 (spectral efficiency) * 683 (lm/W). To calculate the power of a square light for a given lumens (assuming the light is really two triangles emitting half power), calculate x = lumens / 683 (lm/W) / 1.3291 (spec. eff.) / 2. Then make the light be "emissiveColor x x x". Two triangles of "emissiveColor 0.9639 0.9639 0.9639" combine to emit 1750 lumens, about the same as a 100W lightbulb. You can just use "emissiveColor 1 1 1" for simplicity. Material Property notes: Briefly: specularColor = specular reflectance diffuseColor = diffuse reflectance emissiveColor = emission, in 1W units for each spectrum (R,G,B) shininess = fraction of reflection that is specular transparency = fraction of light that is transmitted specularColor and diffuseColor are the specular and diffuse reflectances for R, G, and B. To make something plain white, use "shininess 0", and "diffuseColor 1 1 1". The shininess parameter determines the mix of specular and diffuse reflection for a surface. If you want something to be shiny use "shininess 1.0" and make sure it's specularColor is 1 1 1 unless you want it to be tinted. The transparency parameter determines how transparent the object is. If you want something to be like polished glass, use "transparency 1", "shininess 1.0", and "specularColor 1 1 1". To be like frosted glass, use the former except with "shininess 0". Other Algorithms -a0 Ray tracing. Does no indirect light, but does do caustics. -a1 Default. Uses Photon Mapping to calculate full global illumination solution. -a2 Uses Monte Carlo Path Tracing, with explicit direct lighting, to calculate full global illumination solution. It's like pure MCPT but always shoots one ray at the light, and is therefore faster. -a3 Uses Monte Carlo Path Tracing to calculate full global illumination solution. Very slow. Good luck, Kevin Beason beason@cs.fsu.edu