Nori is a minimalistic ray tracer written in C++. It runs on Windows,
Linux, and Mac OS and provides a foundation for homework assignments
in the course Advanced Computer Graphics taught at EPFL.
Nori是用于在教学上的光线追踪渲染器,里面有5个编程作业。
开发环境
- MacBook Pro (13-inch, 2017, Four Thunderbolt 3 Ports)
- Processor 3.1GHz Dual-Core Intel Core i5
- Memory 16GB
- Graphics 1536MB
- Softwares
Assignment 1 : Downloading and Compiling Nori
- 实现NormalIntegrator

支持多个网格体
代码目前支持单一个mesh的场景,作业4开始需要支持多个mesh的场景,因此可以在作业一后优先支持多个mesh的扩展。支持多个mesh的场景的扩展代码,仔细阅读Accel后是一个比较简单的任务。
- 扩展accel.h/accel.cpp
- 实现空的area.cpp
- 修改scene_pa4_cbox/cbox-whitted.xml的integrator的名字为normals
- ./nori box-whetted.xml

Assignment 2 : Ray Tracing Acceleration Data Structures
performance comparison
- width x height: 68x68 with 2 sample per pixel(spp)
- brute force method took 1.8m to render the scene.
- ochre method
- took 378.ms and 8.9MB to build octree with 7408 nodes and 27248 leafs given depth <= 6 and triangles <= 10
- took 28.ms to render the scene
Results
scenes/pa2/ajax-normals.xml
- 768 x 768 with 32 spp
- took 376ms and 8.0MB to build octree
- took 29.8s to render the scene
27 triangles per node(including leafs)

scenes/pa4/cbox/cbox-whitted.xml
- change integrator from whitted to normals
- 800 x 600 with 512 spp
- took 10ms and 466KB to build octree with 1233 nodes and 6051 leafs
- took 1.7m to render the scene
- 5 triangles per node

Notes
- the intersection of bounding box and triangles
- the vertices of triangles may be not in bounding box
Assignment 3 : Monte Carlo Sampling and Ambient Occlusion
Monte Carlo Sampling
Square


Tent


Disk


Sphere


HemiSphere


CosineHemiSphere


Beckmann


Two simple rendering algorithms
Point lights

- rendering with position : -20 30 -20, energy : 3.76e3 3.76e3 3.76e3

Ambient occlusion


- scenes_pa4_cbox/cbox-whitted.xml
- integrator = ao

Notes
Assignment 4 : Distribution and Whitted-style Ray Tracing
Area lights
Pass
Distribution Ray Tracing
- scenes_pa4_motto/motto-diffuse.xml

- scenes_pa4_cbox/cbox-distributed.xml

- scenes_pa4_tests/test-mesh.xml

- scenes_pa4_tests/test-mesh-furnace.xml

- notes
- sample a barycentric coordinates by Barycentric Coordinate for Surface Sampling
- the three vertices of triangle may not be passed in the intersection.
Dielectrics
Pass.
Whitted-style ray tracing
- scenes_pa4_cbox/cbox-whitted.xml

- change the bsdf of two spheres

- scenes_pa4_motto/motto-dielectric.xml

- notes
- stuck very long in the return value of the sample function in dielectric
- https://graphics.stanford.edu/courses/cs148-10-summer/docs/2006--degreve--reflection_refraction.pdf
- https://www.scratchapixel.com/lessons/3d-basic-rendering/introduction-to-shading/reflection-refraction-fresnel
- https://blog.demofox.org/2020/06/14/casual-shadertoy-path-tracing-3-fresnel-rough-refraction-absorption-orbit-camera/
Assignment 5 : Path Tracing, Microfacet Models, and Multiple Importance Sampling
Microfacet BRDF
- Ajax-smooth.xml

- Ajax-rough.xml

Path_mats Brute force path tracer
- cbox_mats.xml


- veach_mats.xml


- table_mats.xml


path_ems Path tracer with next event estimation
- cbox_ems.xml

- veach_ems.xml

- table_ems.xml
