Update assignment 5 report
authorLuke Lau <luke_lau@icloud.com>
Wed, 22 Jan 2020 11:35:13 +0000 (11:35 +0000)
committerLuke Lau <luke_lau@icloud.com>
Wed, 22 Jan 2020 11:35:13 +0000 (11:35 +0000)
assignment-5/report.latex

index eea4b473412cc7222ecff68009698991908b23a6..c1b306e14f50572e6cf10a681357f3c869da5916 100644 (file)
@@ -2,15 +2,15 @@
 \usepackage{fullpage}
 \usepackage{graphicx}
 \usepackage{minted}
+\usepackage{hyperref}
 \begin{document}
 \title{CS4052 Project - Physically Based Rendering}
 \author{Luke Lau 15336810}
 \maketitle
 
-
 \section{Physically Based Rendering}
-The project uses a physically based lighting model, which computes per pixel lighting by estimating
-how light rays interact with surfaces at a microscopic level, called the microfacet model. 
+This project uses a physically based lighting model, which computes per pixel lighting by estimating
+how light rays interact with surfaces at a microscopic level, known as the microfacet model. 
 
 \begin{center}
 \includegraphics[width=7cm]{microfacets_light_rays}
@@ -22,9 +22,6 @@ The former determines how much light gets caught in the bumps of the surface and
 reflected back. The latter is used for approximating how metals absorb refracted light without
 scattering.
 
-\begin{center}
-\end{center}
-
 There are 7 texture maps used when rendering each material. 4 are defined in the model and 3 are
 precomputed at the start of the program.
 \begin{minted}{glsl}
@@ -40,10 +37,9 @@ uniform sampler2D brdfMap;
 The Albedo map provides the base colour underneath the diffuse and specular layers, the normal
 map is just a standard normal map, and similarly for the ambient occlusion (ao) map.
 
-The model in the program is loaded from the GlTF2 format, a trendy new model format designed for
-easy transportation of physically based models and materials, maintained by the Khronos group (the
-same group behind OpenGL and Vulkan).
-Because it is physically based, it defines a metallic roughness map texture.
+The Newton's Cradle is loaded from a GlTF2 model, a trendy new model format designed for PBR materials,
+and is maintained by the Khronos group (the same group behind OpenGL and Vulkan).
+Because it is physically based, the specification expects a metallic-roughness map texture.
 The metallic value is stored in the blue channel of the texture whilst the roughness value is stored in the green channel (Inside the source code there is a small python script,
 \texttt{metallicRoughness.py} which combines two separate metallic/roughness maps into one suitable
 for the GlTF2 format. AssImp recently added partial support for GlTF2 models so I was able to read
@@ -88,7 +84,11 @@ the $k_d$ term, this term is not constant and depends on the viewing angle, $\om
 crazy to precompute this integral for every single combination of viewing angle and incoming light
 angle, so instead this is approximated with the split-sum-approximation\cite{splitsum}. This results
 in the equation in figure~\ref{eq:splitsum}, which has two terms: a filter for convoluting
-(\texttt{prefilterfrag.glsl}), and the BRDF equation (\texttt{brdffrag.glsl}).
+(\texttt{prefilterfrag.glsl}), and the bidirectional reflective distribution function (BRDF) (\texttt{brdffrag.glsl}).
+
+The BRDF is a function that takes in the incoming light direction, the outgoing view direction,
+the surface normal and the roughness of the material, and returns how much of the incoming light
+is reflected back at that viewing angle.
 
 \begin{figure}
        \begin{equation}
@@ -126,7 +126,6 @@ The nice thing about generating all these maps is that they can all reuse the sa
        \caption{Normal mapping and ambient occlusion providing depth to the materials.}
 \end{figure}
 
-
 \begin{figure}
        \centering
        \includegraphics[width=\textwidth]{fresnelEffect}
@@ -141,15 +140,14 @@ decided to load in the animations via the Assimp library. Many models typically
 animations via a skeletal bone system, where each vertex has a weight associated with each bone in
 the model, affecting how much it is transformed by when the corresponding bone moves.
 
-The first step of this was to add bones to the model I had created in blender. I created two bones,
+The first step was to add bones to the model I had created in blender. I created two bones,
 one for each swinging sphere, and then assigned the vertex weights of the two spheres and the bottom
 vertices of the ropes to their respective bones.
 
-The bones could then be animated using keyframes. By specifying their resting position and apex, I
-could then use Bezier curves to interpolate between them in such a way that gave the appearance of
-momentum. Thankfully, the GlTF2 exporter in Blender bakes the Bezier interpolation between the
-keyframes into many subdivided keyframes, so I was able to just linearly interpolate between them in
-my program.
+The bones could then be animated using keyframes. By specifying the starting and apex, I
+could use Bezier curves to interpolate between them in such a way that gave the appearance of
+momentum. Thankfully, the GlTF2 exporter in Blender bakes the Bezier interpolation into many
+subdivided keyframes, so I was able to just linearly interpolate between them in my program.
 
 \begin{figure}
        \centering
@@ -188,14 +186,14 @@ stable release. The support was only partial, so I also found myself adding and
 with the library, mainly relating to animations. My changes and pull requests for them can be found
 here on GitHub:
 
-https://github.com/assimp/assimp/pull/2243
-https://github.com/assimp/assimp/pull/2244
+\url{https://github.com/assimp/assimp/pull/2243}
+\url{https://github.com/assimp/assimp/pull/2244}
 
 \begin{thebibliography}{9}
        \bibitem{splitsum}
                Brian Karis, Epic Games,
                \textit{Real Shading in Unreal Engine 4}, \\
-               https://cdn2.unrealengine.com/Resources/files/2013SiggraphPresentationsNotes-26915738.pdf
+               \url{https://cdn2.unrealengine.com/Resources/files/2013SiggraphPresentationsNotes-26915738.pdf}
 \end{thebibliography}
 
 \end{document}