\section{Basic terms}
\begin{frame}
    \centering
    \Huge
    Basic terms
\end{frame}
\subsection{Raytracing}
\begin{frame}{Raytracing}
    \begin{center}
        \begin{minipage}{0.4\linewidth}
            \flushleft{} Turn 3D model...
            \includegraphics[width=\linewidth]{img/proseminar_workbench.png}
        \end{minipage}
        \pause{}
        $\rightarrow$
        \hspace{10mm}
        \begin{minipage}{0.4\linewidth}
            \flushright{} \ldots into a physically accurate image
            \includegraphics[width=0.8\linewidth]{proseminar_cycles.png}
        \end{minipage}
    \end{center}
\end{frame}

\begin{frame}{Raytracing}
    \begin{block}{Task}
        \begin{itemize}
            \item Determine the color of each Pixel in the scene
            \item Color (light intensity) is given by the rendering integral:\\
            \[
                \underbrace{I(x,x^{\prime})}_{\text{Light transport intensity from }x \text{ to } x^{\prime}}=
                \underbrace{g(x,x')}_{\text{geometry term}}
                \left[
                \underbrace{\epsilon(x,x')}_{\text{emissive light}}+\underbrace{\int_S \rho(x,x',x'')I(x',x'')dx''}_{\text{light scattered towards the point}}
                \right]
            \]
            %\begin{itemize}
                %\item Attempts to capture the physical light transport phenomenon in a single equation
            %\end{itemize}
            [\cite{ACM:rendering_equation}]
            \item Problem: This equation is not analytically solvable\\
            $\rightarrow$ Solve numerically using Monte-Carlo integration (i.e.\ raytracing)
        \end{itemize}
    \end{block}
\end{frame}

\begin{frame}{Raytracing}
    \setbeamercovered{transparent}
    \begin{block}{Principle (simplified)}
        \begin{itemize}
            \item Cast rays from the camera towards the scene
            \item Calculate geometry intersection
            \item Trace rays from intersection point to all light sources
            \item Calculate color from emission and the sampled reflected light, taking geometry into account  (e.g.\ occlusion)
            \item Have the ray ``bounce around' to account for indirect lighting
        \end{itemize}
    \end{block}
    \pause{}
    \begin{block}{Variables}
    Scene depends on lots of variables:
        \begin{itemize}
            \item Material properties (roughness, emission strength, color, transmissiveness\ldots)
            \item Vertex positions
        \end{itemize}
    \end{block}
\end{frame}

\begin{frame}{Visualization}
    \input{diagrams/raytracing_anim}    
\end{frame}

\begin{frame}{Image synthesis~-~optical phenomena}
    \centering
    \includegraphics[width=0.38\linewidth]{proseminar_cycles_annotated.png}
\end{frame}

\subsection{Differentiable rendering}
\begin{frame}{Differentiable rendering}
    \begin{itemize}
        \item Given: Function mapping a 3D-scene to a real number (e.g.\ error function)
        \item Target: Calculate gradient of that function
        \item Required: Differentiate with respect to any scene parameter
    \end{itemize}
\end{frame}