Lecture 06: What is the ray tracing. Camera rays

Computer graphics in Game development

Ivan Belyavtsev

4.02.2021

Cornell box

Original vs rasterizer

Original Rasterizer result

Wave–particle duality of light

From: https://me.me/i/light-s-olar-system-wave-particle-duality-intesifies-5a1956376a2d4ceab14afca19bae5409

Mathematical definition of ray

\[ray(t)=\vec{origin}+t*\hat{direction}\]

\[t>0\]

Turner Whitted demo (1979)

From: [1]

Ray tracing idea

From: [2]

Recall: rasterization pipeline

From: https://docs.microsoft.com/en-us/windows-hardware/drivers/display/pipelines-for-direct3d-version-11

Raytracing pipeline

From: [3][4]

Ray generation

Ray generation method generates primary rays (camera rays) and call Trace ray to evaluate the final color of each trace.

Dürer’s door

From: https://en.wikipedia.org/wiki/Ray_tracing_(graphics)#/media/File:D%C3%BCrer_-_Man_Drawing_a_Lute.jpg

by Albrecht Dürer from 1525 shows the use of a Dürer’s door

Pinehole camera

From: http://commons.wikimedia.org/wiki/Image:Pinhole-camera.png

Camera ray-casting

Ray casting from position, direction, right and up vectors

[5]

Miss shader

Miss shader is called when Trace ray haven’t found any intersection

From: [3][4]

Default scene

Miss sharer is used to generate a scene without geometry. Could be pure color, sky, terrain, etc

by Morgan McGuire

Lab: Ray generation. Miss shader

References

1.
Whitted T. An improved illumination model for shaded display. // Commun. ACM. 1980. Vol. 23, № 6. P. 343–349.
2.
McGuire M. The graphics codex. 2.14 ed. Casual Effects, 2018.
3.
Lefrançois M.-K., Gautron P. DX12 raytracing tutorial - part 2 [Electronic resource]. URL: https://developer.nvidia.com/rtx/raytracing/dxr/DX12-Raytracing-tutorial-Part-2.
4.
Parker S.G. et al. OptiX: A general purpose ray tracing engine // ACM SIGGRAPH 2010 papers. New York, NY, USA: Association for Computing Machinery, 2010.
5.
Shirley P. Ray tracing in one weekend. second. Amazon.com Services LLC, 2019. Vol. 1.
// reveal.js plugins