edge sampling section for handout
This commit is contained in:
parent
2bf100bf94
commit
b182bfcd07
6 changed files with 150 additions and 9 deletions
|
|
@ -92,10 +92,38 @@ The geometry term $g(x,x^\prime)$ in equation~\ref{eq:rendering_integral} is the
|
|||
\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.
|
||||
The key observation is that these discontinuities only occur at the edges of meshes.
|
||||
|
||||
\section{Proposed solution: Edge sampling}
|
||||
This problem can be mitigated by not sampling a pixel uniformly, but importance sampling the edges of a mesh, thus capturing the Dirac delta spikes.
|
||||
The key observation is that these discontinuities only occur at the edges of meshes.
|
||||
Thus the problem can be mitigated by not sampling a pixel uniformly, but importance sampling the edges of a mesh, hence capturing the Dirac delta spikes.
|
||||
|
||||
\begin{figure}[h]
|
||||
\subfloat[area sampling]{
|
||||
\input{diagrams/area_sampling.tex}
|
||||
}
|
||||
\hfil
|
||||
\subfloat[edge sampling]{
|
||||
\input{diagrams/edge_sampling.tex}
|
||||
}
|
||||
\caption{The figure depicts the sampling situation in a single pixel. We are interested in the gradient with respect to the gray triangle moving up. Area sampling does not account for this color change whereas edge sampling does. Primary occlusion is handled correctly.}\label{fig:area_vs_edge_sampling}
|
||||
\end{figure}
|
||||
|
||||
Consider a situation as depicted in figure~\ref{fig:area_vs_edge_sampling}. When the gray triangle moves up, the white area decreases and the gray area increases. Thus white should contribute less to the pixel color. Area sampling does not account for this change, since all samples land on an area with the same color before and after movement. Edge sampling does account for this change because especially areas of discontinuity i.e.\ the edges are sampled. The samples will have a different colors after the triangle moves up, correctly capturing the gradient. Primary occlusion is handled correctly because the sample that intersected the blocker before, will also intersect the blocker after movement as it is independent of the triangle movement.
|
||||
|
||||
\subsection{Half spaces}
|
||||
|
||||
To understand why edge sampling correctly captures the gradient an explanation of what exactly happens at the point where a ray intersects an edge is required.
|
||||
|
||||
\begin{figure}[h]
|
||||
\centering
|
||||
\input{diagrams/halfspaces.tex}
|
||||
\caption{An edge separates the domain into two regions, whose contribution can be considered separately. The contribution of the upper half space increases while the contribution of the lower half space decreases with respect to the gray triangle moving right. Occlusion is handled correctly because the contribution of either half space is equal.}\label{fig:halfspaces}
|
||||
\end{figure}
|
||||
|
||||
As seen in figure~\ref{fig:halfspaces} the edge separates the space into two half spaces. These two halfspaces can now be considered separately and a gradient can be calculated from the color difference. It is also evident that occlusion is handled correctly. This arises from the fact that where occlusion occurs, the half spaces' contribution to color is equal. From that it follows that the gradient will be 0.\\
|
||||
Mathematically this yields that the Integral can be separated into two parts. One part that represents the discontinuous edges and one part that accounts for the original pixel integral over continuous regions.
|
||||
|
||||
\section{Results}
|
||||
|
||||
|
||||
% BIBLIOGRAPHY
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue