Skip to content

ELUMI/elumi-raytracer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Raytracer project for the Bachelor Thesis

The thesis can be found here:
http://www.cse.chalmers.se/~uffe/bachelor/kandidatarbetestartpaket/Elumi-a%20ray%20tracer%20-%20DATx02_12_34.pdf

Ohloh project page:
https://www.ohloh.net/p/elumi-raytracer

############################################################

                         Usage

raytracer [options]

Allowed options:
  -h [ --help ]              produce help message
  --no_opengl                Do not use OpenGL
  -i [ --input-file ] arg    Input file
  -o [ --output-file ] arg   Output file
  -s [ --settings-file ] arg Settings file
  
############################################################

                     Scene-file
The scene file uses xml-syntax. 

Descriptions:

- PhaseFunction:
  type = [isotropic | HG | Schlick]


Example:

<Object fileName="cornell.obj"/>
<Settings fileName="settings.xml"/>

<Camera>
  <Position x="0" y="0.717527" z="-2.69957"/>
  <Direction x="0" y="0" z="1"/>
  <Normal x="0" y="1" z="0"/>
</Camera>

<Light type="Point" intensity="1.5" falloff="Linear" visible="1">
  <Position x="5" y="1.2" z="2.9"/>
  <Color r="0.5" g="1" b="0.8"/>
</Light>

<Light type="Area" intensity="1.5" falloff="Quadratic" visible="0">
  <Position x="0.1" y="1.2" z="0.2"/>
  <Color r="1" g="1" b="1"/>
  <Axis1 x="0.5" y="0" z="0" samples="3"/>
  <Axis2 x="0" y="0" z="0.5" samples="3"/>
</Light>

<Light type="Spot" intensity="2" falloff="Linear" outer="45" inner="40">
  <Position x="-1.5" y="1.0" z="2.1"/>
  <Direction x="0" y="-1" z="0"/>
  <Color r="1" g="1" b="1"/>
</Light>

<Environment type="Cube">
    <Top src="land_top.png" />
    <Bottom src="land_bottom.png" />
    <Front src="land_front.png" />
    <Right src="land_right.png" />
    <Back src="land_back.png" />
    <Left src="land_left.png" />
</Environment>


<Environment type="Sphere">
    <Sphere src="data/scenes/textures/angmap24.jpg" />
</Environment>

<Volume type="uniform" attenuation="1.5" emission="1.1">
  <PhaseFunction type="isotropic" />
  <Position x="0" y="0.75" z="0"/>
  <U x="0.25" y="0" z="0"/>
  <V x="0" y="0.25" z="0"/>
  <W x="0" y="0" z="0.25"/>
</Volume>

############################################################

                     Settings-file
The settings file uses xml-syntax. See example:

<Screen width="1024" height="1024"/>
<Tracer version="4" pattern="1" batches="auto" first_bounce="0"/>
<Recursion maxDepth="10" attenuationThreshold="0.015625"/>
<Threading threads="auto"/>
<Tonemapping on="1" key="0.18" white="10"/>
<Tree version="3"/>
<Wireframe enable="0"/>
<Supersampling samples="1" pattern="0" />
<Photonmapper photonmap="1" photonmap_size="1024" final_gather_samples="0" photons="65536" radius="0.3" caustics="0.5" scaling="4" kernel="1" />
<Volume step_size="0.1" />

Description:
photonmap:
 0 GPU gatherer/arrayPM
 1 CPU gatherer/hashPM
 2 CPU gatherer/arrayPM


############################################################

                     mtl-file

Ka 0.01 0.01 0.01   // ambient rgb
Kd 0.1 0.1 0.1      // diffuse rgb
Ks 0.30 0.30 0.30   // specular rgb
Tf 0.10 0.10 0.10   // Transparancy rgb (but only 1 channel used in our impl.)
Ns 200              // Specularity constant
Ni 1.33             // Index of refraction
f 1.33              // Fresnel index (if not used, default is 0)
r_spread 0.05       // Glossy reflection
r_samples 10      
Ni_spread 0.05      // Glossy refraction
Ni_samples 10
map_Kd path         //Diffuse map
map_Ks path         //Specular map
map_Bump path            //Bump map. Used for parallax mapping
map_Norm path       //Normal map
map_R path       //Reflection map
map_D path          //Transparency map
axis 0           //Axis x,y, or z (0,1,2)
scale 0.1      //Scale texture (smaller is larger)
projector 0    //Projector function 0,1,2,3 (Plane,cube,sphere,cylinder)
corresponder 0   //Corresponder function 0,1,2,3 (repeat,mirror,clamp,border)
use_position    //Use position instead of normal (used mainly for sphere mapping)
relief      //Use relief mapping

############################################################

          Build instructions (BETA, not tested)

eclipse
* import / projects from git
* new / convert to cpp

* properties
 * settings
  * GCC C++ compiler
   * Includes
     * glm
     * glfw
     * glew
     * devil
   * Miscellaneous
    * -fopenmp
  * GCC C++ Linker
   * Libraries
    * -l (libraries)
     * png
     * IL (devil)
     * ILU (devil manipulations library, used for rotating environment maps)
     * boost_program_options
     * boost_thread
     * boost_chrono
     * boost_timer
     * boost_system
     * GLEW
     * # GL
     * # GLU
     * glfw
    * -L (search path)
     * glfw
     * glew
     * devil
 * Run/Debug settings
  * Edit
   * Arguments
    * sword2.obj test.png
   * Enviroment
    * LD_LIBRARY_PATH (separate with ;)
     * glfw
     * glew
     * devil

About

ELUMI - a ray tracer for rendering photo-realistic images

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •