chktex fixes

This commit is contained in:
CDaut 2023-06-21 10:28:29 +02:00
parent ae77bbb072
commit 2bf100bf94

View file

@ -7,15 +7,15 @@
\makeatletter
\def\@maketitle{%
\newpage
\null
\null{}
\begin{center}%
{\LARGE \textsf \@title \par} % Adjust the font size and style of the title
{\LARGE \textsf \@title{} \par} % Adjust the font size and style of the title
\vskip 0.5em % Adjust the vertical spacing after the title
{\small \textsf{Proseminar Differentiable Programming} \par}
\vskip 0.5em % Adjust the vertical spacing after the subtitle
{\small \textsf \@author \par }
{\small \textsf \@author{} \par }
\vskip 0.5em % Adjust the vertical spacing after the author
{\small \textsf \@date \par} % Adjust the font size and style of the date
{\small \textsf \@date{} \par} % Adjust the font size and style of the date
\end{center}%
\par
\vskip -1em % Adjust the vertical spacing after the title block
@ -50,15 +50,15 @@
\maketitle
\begin{abstract}
Differentiable Programming is a technique frequently used to solve optimization problems by minimizing some kind of error function. To do this though the error function needs to be differentiable with respect to the parameters that are to be optimized. This is usually not the case with ray tracing. This report will explain why this problem occurs and present the method to tackle it developed in \cite{ACM:diffable_raytracing}.
Differentiable Programming is a technique frequently used to solve optimization problems by minimizing some kind of error function. To do this though the error function needs to be differentiable with respect to the parameters that are to be optimized. This is usually not the case with ray tracing. This report will explain why this problem occurs and present the method to tackle it developed in~\cite{ACM:diffable_raytracing}.
\end{abstract}
\section{Introduction}
One of the main tasks in Computer Graphics is image synthesis. This means ``given a 3D scene, output an image depicting the scene``. Often it is required for the image to be as realistic as possible, meaning as close to a picture of the scene as if it was set in the real world as possible. This is most commonly achieved using the ray tracing algorithm and is a well studied problem. Doing this in a differentiable way however is much less trivial. This stems from the fact that the rendering integral (equation \ref{eq:rendering_integral}) is not differentiable in certain well defined places. Because being able to ray trace an image differentiably has numerous applications a solution to this problem has been proposed in \cite{ACM:diffable_raytracing}. This report will go into how exactly this problem arises, how it can be mitigated and what some of the applications of differentiable ray tracing are.
One of the main tasks in Computer Graphics is image synthesis. This means ``given a 3D scene, output an image depicting the scene``. Often it is required for the image to be as realistic as possible, meaning as close to a picture of the scene as if it was set in the real world as possible. This is most commonly achieved using the ray tracing algorithm and is a well studied problem. Doing this in a differentiable way however is much less trivial. This stems from the fact that the rendering integral (equation~\ref{eq:rendering_integral}) is not differentiable in certain well defined places. Because being able to ray trace an image differentiably has numerous applications a solution to this problem has been proposed in~\cite{ACM:diffable_raytracing}. This report will go into how exactly this problem arises, how it can be mitigated and what some of the applications of differentiable ray tracing are.
\section{Ray Tracing}
To formalize the problem of photo realistic image synthesis, an equation has been proposed by Kajiya in 1986 \cite{ACM:rendering_equation}. This equation captures physical light transport for a scene and if solved yields the color for a given point in the scene accounting for most physical light transport phenomena.
To formalize the problem of photo realistic image synthesis, an equation has been proposed by Kajiya in 1986~\cite{ACM:rendering_equation}. This equation captures physical light transport for a scene and if solved yields the color for a given point in the scene accounting for most physical light transport phenomena.
\begin{figure}[h]
\centering
\begin{equation}
@ -73,27 +73,25 @@ To formalize the problem of photo realistic image synthesis, an equation has bee
\caption{The rendering equation capturing physical light transport. It assigns a value to the the Intensity of light transported from a point $x$ to a point $x^\prime$. The geometry term $g$ will be discussed later. The term $\epsilon$ accounts for the emissivity of the material at point $x$. The integral term represents all light scattered from any other point in the scene towards the point $x$. The integral domain $S$ contains all points in the scene.}
\end{figure}
This equation (equation \ref{eq:rendering_integral}) is now widely recognized as ``the rendering integral``. It can not be solved analytically and is thus most commonly approximated using Monte-Carlo integration - i.e. ray tracing. Ray tracing works by backtracking light rays from the light sources in the scene and thus simulate physically realistic lighting.\\
To do this, rays are cast from the camera, through each pixel in the camera frustum. The intersection point with the scene geometry $x$ is calculated for each ray and material properties (e.g. color, emissivity etc.) are taken into account to calculate the pixel color. From this point more rays are drawn towards each light source. If the light source is visible, its light contributes to the pixel color as well. To account for indirect lighting the ray ``bounces around``, yielding a color for some of the points scattering lights towards $x$. This approximates the integral term in equation \ref{eq:rendering_integral}.\\
This equation (equation~\ref{eq:rendering_integral}) is now widely recognized as ``the rendering integral``. It can not be solved analytically and is thus most commonly approximated using Monte-Carlo integration~-~i.e.\ ray tracing. Ray tracing works by backtracking light rays from the light sources in the scene and thus simulate physically realistic lighting.\\
To do this, rays are cast from the camera, through each pixel in the camera frustum. The intersection point with the scene geometry $x$ is calculated for each ray and material properties (e.g.\ color, emissivity etc.) are taken into account to calculate the pixel color. From this point more rays are drawn towards each light source. If the light source is visible, its light contributes to the pixel color as well. To account for indirect lighting the ray ``bounces around', yielding a color for some of the points scattering lights towards $x$. This approximates the integral term in equation~\ref{eq:rendering_integral}.\\
Differentiable ray tracing is the task of calculating the gradient of this process with respect to \emph{any} scene parameter.
\section{Problems with differentiability}
The geometry term $g(x,x^\prime)$ in equation \ref{eq:rendering_integral} is the main problem when it comes to differentiating the rendering integral. This term is 1 iff $x$ is visible from $x^\prime$ and 0 otherwise.
The geometry term $g(x,x^\prime)$ in equation~\ref{eq:rendering_integral} is the main problem when it comes to differentiating the rendering integral. This term is 1 iff $x$ is visible from $x^\prime$ and 0 otherwise.
\begin{figure}[h]
\centering
\include{handout/diagrams/diagramm_occlusion}
\caption{A simple occlusion scenario. An infinitesimal change in ray angle $d\omega$ is sufficient to determine whether the wall is visible or not.}
\label{fig:occlusion_rays}
\include{diagrams/diagramm_occlusion}
\caption{A simple occlusion scenario. An infinitesimal change in ray angle $d\omega$ is sufficient to determine whether the wall is visible or not.}\label{fig:occlusion_rays}
\end{figure}
\begin{figure}
\centering
\input{handout/diagrams/geometry_term_diff.tex}
\caption{The visibility of a point and the differentiation}
\label{fig:visibility_term}
\input{diagrams/geometry_term_diff.tex}
\caption{The visibility of a point and the differentiation}\label{fig:visibility_term}
\end{figure}
As illustrated in figure \ref{fig:occlusion_rays} an infinitesimal angle change $d\omega$ can lead to the blocker obstructing the wall or the wall being visible. The geometry term is thus a Heaviside step function which when differentiated yields a Dirac delta functional (see figure \ref{fig:visibility_term}). Since the Dirac delta functional only differs from 0 in $\omega_0$ one point, the probability of sampling it when using uniformly distributed Monte-Carlo integration is 0.
As illustrated in figure~\ref{fig:occlusion_rays} an infinitesimal angle change $d\omega$ can lead to the blocker obstructing the wall or the wall being visible. The geometry term is thus a Heaviside step function which when differentiated yields a Dirac delta functional (see figure~\ref{fig:visibility_term}). Since the Dirac delta functional only differs from 0 in $\omega_0$ one point, the probability of sampling it when using uniformly distributed Monte-Carlo integration is 0.
The key observation is that these discontinuities only occur at the edges of meshes.
\section{Proposed solution: Edge sampling}
@ -102,7 +100,7 @@ This problem can be mitigated by not sampling a pixel uniformly, but importance
% BIBLIOGRAPHY
\nocite{*} % List all entries of the .bib file, even those not cited in the main body
\printbibliography
\printbibliography{}
\end{document}