\section{Results}
\label{sec:results}
%
We implemented Algorithms~\ref{alg:diffRadiances} and \ref{alg:edgeIntegral}, as well as Algorithms~\ref{alg:deltaL} and \ref{alg:inScatteredRadiance} in Appendix~\ref{sec:mc_ext}, on the CPU in C++ using the Embree ray tracer.

\paragraph{Performance}
As discussed in \S\ref{ssec:mc_discussion}, unbiased and consistent estimations of radiance derivatives are significantly more expensive than those of radiance values due to the need to trace side paths.
In practice, our estimation of a single derivative runs about $10\times$ slower than 
conventional volumetric path tracing for radiance estimation (with the same number of samples per pixel).
Fortunately, as our method allows multiple derivatives to be estimated jointly, the amortized overhead for multiple parameters is much lower.
For example, 
when computing derivatives with respect to 10 scene parameters, our method is only $2\times$ slower than handling one parameter.

\subsection{Validation \& Evaluation}
\label{ssec:res_eval}
%
To validate our derivations and implementation efficiency, we compare radiance
derivatives estimated in equal time with our method
(Algorithm~\ref{alg:diffRadiances}) and finite difference (FD).

Figure~\ref{fig:validate_v2} shows an example using the same Cornell-box-like scene as Figure~\ref{fig:per_component}.
As a comparison, columns (b1) and (c1) both display derivatives with respect to the vertical displacement of the light and the cube,%
\footnote{
	Compared to Figure~\ref{fig:validate_v2}, our derivatives images in Figure~\ref{fig:per_component} do not show ``edges'' around moving objects since each pixel in those images corresponds to the derivative of one radiance value (as oppose to integrated radiances over the pixel).
} resulted from our method and FD, respectively.
Columns (b2) and (c2), on the other hand, visualize derivatives with respect to the horizontal displacement of those objects.

In both cases, FD results obtained with larger spacing (top) suffer from severe bias around object boundaries.
Those with smaller spacing (bottom), on the contrary, suffer from higher noise while still being biased.
Our technique is capable of producing much cleaner and unbiased derivative estimations.

For more validation results, please see the supplemental material.

\input{fig_mainres_generic.tex}
\input{tab_perf.tex}

\subsection{Main Results}
\label{ssec:res_main}
%
We now show inverse rendering results using gradients estimated with our approach.
All these examples involve participating media/translucent objects and changing scene geometry, making previous methods inadequate.

In these examples, we take a target image $\mathcal{I}^\mathrm{target}$ as input and search for scene parameters $\bparam^*$ that minimize the difference between the target and the rendered image $\mathcal{I}(\bparam)$ generated using these parameters.
Namely,
%
\begin{equation}
	\bparam^* = \textstyle\arg\min_{\bparam} \big\| \mathcal{I}(\bparam) - \mathcal{I}^\mathrm{target} \big\|.
\end{equation}
%
In practice, we choose the norm $\| \cdot \|$ as the $\mathrm{L}_2$ difference between Gaussian pyramids of the corresponding images%
\footnote{%
	Our technique can be used with any differentiable metric, and we formulate the inverse rendering problem using the $\mathrm{L}_2$ norm for its simplicity.
	Additionally, the norm is calculated based on Gaussian pyramids to make the optimization less prone to local minima.
		This, however, does not guarantee the optimization to be convex in general. 
}.
We use the Adam method~\cite{kingma2014adam} to drive the gradient-descent processes.
Please refer to Table~\ref{tab:perf} for the performance numbers and optimization configurations, and to the supplement for more results and animated versions of Figures~\ref{fig:teaser}, \ref{fig:mainres_generic}, \ref{fig:mainres_imaging}, and \ref{fig:mainres_design}.

\paragraph{Generic inverse rendering}
Figure~\ref{fig:teaser} illustrates an inverse rendering example where the pose of a light-emitting dodecahedron is optimized.
From an initial configuration~(a) that is quite different from the target~(d), the optimization driven by derivatives estimated with our method~(b) manages to find the global optimum in 110 iterations, as demonstrated by the parameter difference plot.
Note that the optimization loss does not go to zero as noisy derivatives are used for faster iterations.

We show three more examples in Figure~\ref{fig:mainres_generic}.
The top row contains an example with an apple inside a cube with an absorbing medium and a rough dielectric interface.
We jointly optimize the location of the apple inside the cube as well as the surface roughness of the cube itself.
The second row of this image shows an example where the camera position and pose are optimized.
The last row has an example where the camera looks at a smoke indirectly through a glossy triangular reflector.
We optimize the 3D locations of each vertex of the reflector separately.

\paragraph{Imaging-inspired examples}
In Figure~\ref{fig:mainres_imaging}, we show two examples inspired by real-world imaging problems.
On the top of this figure, we show an example where a heterogeneous medium casts a colored shadow onto the ground.
We optimize for the orientation as well as the optical density (as a global scaling factor) of this medium jointly by only looking at the shadow, mimicking a non-line-of-sight (NLOS) imaging scenario~\cite{xin2019theory,o2018confocal,saunders2019computational,velten2012recovering}.
Using gradients estimated with our method, the global optimum is reached within 60 iterations.

The bottom of Figure~\ref{fig:mainres_imaging} shows an example where an object is embedded within a two-layer material modeled after human skin using measured properties~\cite{collier2003,walker2003,chang2009}.
We search for the location of the object, a common problem in biomedical imaging.
Optimization with our estimated derivatives converges to the global optimum in 50 iterations.

\paragraph{Design-inspired examples}
Figure~\ref{fig:mainres_design} contains two examples inspired by design applications using arbitrary images (i.e., not 3D renderings) as input. On the top of this figure, we show an example where the orientations and colors of two small spotlights are jointly optimized.
The input to this example is a simple drawing of the light beams.
On the bottom is an example containing micro-scale translucent grains.
We jointly optimize for the colors (i.e., single-scattering albedo) and physical sizes of these grains (in clusters) so that their macro-scale appearance matches the input image (i.e., the SIGGRAPH logo).

\input{fig_mainres_imaging.tex}
\input{fig_mainres_design.tex}
