Semestr:
March 2018 April 2018 May 2018 June 2018
Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
1 2 3 1 2 3 4 5 6 7 1 2 3 4 5 1 2
4 5 6 7> 8 9 10 8 9 10 11 12 13 14 6 7 8 9 10 11 12 3 4 5 6 7 8 9
11 12 13 14 15 16 17 15 16 17 18 19 20 21 13 14 15 16 17 18 19 10 11 12 13 14 15 16
18 19 20 21 22 23 24 22 23 24 25 26 27 28 20 21 22 23 24 25 26
25 26 27 28 29 30 31 29 30 27 28 29 30 31
^ ^ ^ ^
Lectures:
1. Introduction, requirements, program, literature
2. What we need to know to write Ray Tracing: Task 1 (below)
Classical Whitted style ray tracing.
Types of rays: primary, reflected, refracted, shadow
Ray-object intersection methods for:
implicit surfaces and triangles
RJ Segura, FR Feito - "Algorithms to test ray-triangle intersection.
Comparative study" 9th International Conference in Central Europe on
Computer... 2001 wscg.zcu.cz.
PDF
Tomas Moller, Ben Trumbore -
"Fast, minimum storage ray/triangle intersection", 1997
Page with PDF and code
3. Acceleration structures (next lecture 5th April)
Literatura: punkty 4 & 5 poniżej (prace doktorskie I.Walda i V.Havrana)
For reading scenes assimp library
(packaged in most of linux distributions)
can be used otherwise writing simple parser of OBJ files is also possible.
Use the existing code from examples for vector operations as well as
intersections with triangles (examples: pbrt, embree, links below).
Take care to place comments in the code documenting origin of the parts
not written by yourself.
We execute program with a rendering task configuration file:
RT plik.rtc
Text file contains in following lines:
comment, file.obj, file.png, k, xres yres, VPx VPy VPz, LAx LAy LAz,
UPx UPy Upz, yview, ...
First 7 lines are obligatory. We defined meaning of first 9 lines but
the configuration file can be extended by adding more lines
(e.g. rendering method and its parameters). With OpenGL interface
you can change view parameters and write new configuration file.
Symbols:
k - recursion level (k=0 only primary rays: 1 ray per pixel, k=1 primary rays plus shadow rays from first intersection, ...)
xres x yres - image resolution
VP - View Point
LA - Look At
UP - Vector Up, default [0.0 1.0 0.0]
yview - vertical view angle defined by proportion of image height to focal
distance.
Default value yview=1.0 gives an angle like in classic camera with
image sensor of height y=24mm and focal length f=24mm.
For yview=0.5 we have normal lens (not wide angle not tele) with f=48 y=24.
Angles in x direction are defined by yangle and image aspect ratio
(inferred from image dimensions).
Since obj files do not contain light sources we can add point lights in
.rtc configuration file adding after line 9 one or more lines starting
with letter 'L' followed by 3 floats describing position of light,
3 bytes (0-255) describing RGB color and float describing intensity. E.g.:
L 5.0 8.0 20.0 255 255 200 100.0
If there are no lights or the recursion level is 0 the objects
should be renderd in their own diffuse color.
Task 1a: option
For task 1 there is an option that you can add an ray casting engine
Embree (API is described in doc/ directory of Embree) to compare it
as a reference to you later implementation of acceleration structures.
Task 2: Acceleration structures (for month of may)
Make your ray tracer fast with many objects, for the tests you can
expect 50k, 200k triangles or more. To do it implement one of
the acceleration structures: kd-tree or BVH (grids could be negotiated).
Final versions will be tested on the same scenes and additional points
can be granted for best performance.
Additional comment:
See view_test scene
for view angle and orientations testing (obj uses righthanded
coordinate system). Compare your output if it matches reference view
and the lightness level. The image should not be completely black or
white. Light intensity in .rtc file takes into account standard
diffuse reflection with physical attenuation by inverse squared
distance.
Task 3: Physically correct path tracer (final date: 14.VI.2018)
Based on ray tracing engine from previous task implement
basic Monte Carlo renderer: path tracer. Is should render images
in high dynamic range EXR format
(OpenEXR library) in physical units.
Requirements:
Physically correct BRDF reflection model (not standard Phong eg.
corrected)
Area light sources with emission
defined in material properties in physically sound photometric
(or radiometric) units. In .mtl material file we have Ke
tag. If Ke>0 we assume it describes irradiance/illuminance of
the light source (in units W/m2 or lm/m2).
We can assume that all coordinates are given in meters.
Path termination by russian roulette
Importance sampling eg. diffuse term by cosine function
Set of example rendered scenes should be also included