# Exact-NeRF: An Exploration of a Precise Volumetric
Parameterization for Neural Radiance Fields

Brian K. S. Isaac-Medina1, Chris G. Willcocks1, Toby P. Breckon1, 2
Department of {1Computer Science, 2Engineering}, Durham University, UK
{brian.k.isaac-medina, christopher.g.willcocks<EMAIL_ADDRESS>
###### Abstract

Neural Radiance Fields (NeRF) have attracted significant attention due to
their ability to synthesize novel scene views with great accuracy. However,
inherent to their underlying formulation, the sampling of points along a ray
with zero width may result in ambiguous representations that lead to further
rendering artifacts such as aliasing in the final scene. To address this
issue, the recent variant mip-NeRF proposes an Integrated Positional Encoding
(IPE) based on a conical view frustum. Although this is expressed with an
integral formulation, mip-NeRF instead approximates this integral as the
expected value of a multivariate Gaussian distribution. This approximation is
reliable for short frustums but degrades with highly elongated regions, which
arises when dealing with distant scene objects under a larger depth of field.
In this paper, we explore the use of an exact approach for calculating the IPE
by using a pyramid-based integral formulation instead of an approximated
conical-based one. We denote this formulation as Exact-NeRF and contribute the
first approach to offer a precise analytical solution to the IPE within the
NeRF domain. Our exploratory work illustrates that such an exact formulation
(Exact-NeRF) matches the accuracy of mip-NeRF and furthermore provides a
natural extension to more challenging scenarios without further modification,
such as in the case of unbounded scenes. Our contribution aims to both address
the hitherto unexplored issues of frustum approximation in earlier NeRF work
and additionally provide insight into the potential future consideration of
analytical solutions in future NeRF extensions.

Figure 1: Comparison of Exact-NeRF (ours) with mip-NeRF 360 [2]. Our method is
able to both match the performance and obtain superior depth estimation over a
larger depth of field.

##  1 Introduction

Novel view synthesis is a classical and long-standing task in computer vision
that has been thoroughly re-investigated via recent work on Neural Radiance
Fields (NeRF) [23]. NeRF learns an implicit representation of a 3D scene from
a set of 2D images via a Multi-Layer Perceptron (MLP) that predicts the visual
properties of 3D points uniformly sampled along the viewing ray given its
coordinates and viewing direction. This parameterization gives NeRF the dual
ability to both represent 3D scenes and synthesize unseen views. In its
original formulation, NeRF illustrates strong reconstruction performance for
synthetic datasets comprising object-centric scenes and no background
(bounded) and forward-facing real-world scenes. Among its applications, NeRF
has been used for urban scene representation [32, 36, 29], human body
reconstruction [19, 3], image processing [22, 14, 20] and physics [10, 17].

Nonetheless, the underlying sparse representation of 3D points learnt by the
MLP may cause ambiguities that can lead to aliasing and blurring. To overcome
these issues, Barron _et al_. proposed mip-NeRF [1], an architecture that uses
cone tracing instead of rays. This architecture encodes conical frustums as
the inputs of the MLP by approximating the integral of a sine/cosine function
over a region in the space with a multivariate Gaussian. This re-
parameterization notably increases the reconstruction quality of multi-scale
datasets. However, this approximation is only really valid for bounded scenes,
where the conic frustums do not suffer from large elongations attributable to
a large depth of field within the scene.

The NeRF concept has been extended to represent increasingly difficult scenes.
For instance, mip-NeRF 360 [2] learns a representation of unbounded scenes
with a central object by giving more capacity to points that are near the
camera, modifying the network architecture and introducing a regularizer that
penalizes ‘floaters’ (unconnected depth regions in free space) and other small
unconnected regions. In order to model distant regions, mip-NeRF 360
transforms the multivariate Gaussians with a contraction function. This
modification allows a better representation and outperforms standard mip-NeRF
for an unbounded scenes dataset. However, the modification of the Gaussians
requires attentive analysis to encode the correct information in the
contracted space, which includes the linearization of the contraction function
to accommodate the Gaussian approximations. This leads to a degraded
performance of mip-NeRF 360 when the camera is far from the object.
Additionally, mip-NeRF 360 struggles to render thin structures such as tree
branches or bicycle rays.

Motivated by this, we present Exact-NeRF as an exploration of an alternative
exact parameterization of underlying volumetric regions that are used in the
context of mip-NeRF (Fig. 1). We propose a closed-form volumetric positional
encoding formulation (Sec. 3) based on pyramidal frustums instead of the
multivariate Gaussian approximation used by mip-NeRF and mip-NeRF 360. Exact-
NeRF matches the performance of mip-NeRF on a synthetic dataset, but gets a
sharper reconstruction around edges. Our approach can be applied without
further modification to the contracted space of mip-NeRF 360. Our naive
implementation of Exact-NeRF for the unbounded scenes of mip-NeRF 360 has a
small decrease in performance, but it is able to get cleaner reconstructions
of the background. Additionally, the depth map estimations obtained by Exact-
NeRF are less noisy than mip-NeRF 360. Our key contribution is the formulation
of a general integrated positional encoding framework that can be applied to
any shape that can be broken into triangles (_i.e_., a polyhedron). We intend
that our work serves as a motivation to investigate different shapes and
analytical solutions of volumetric positional encoding. The code is available
at https://github.com/KostadinovShalon/exact-nerf.

##  2 Related Work

Already numerous work has focused on improving NeRF since its original
inception [23], such as decreasing the training time [6, 13, 5, 9, 37],
increasing the synthesis speed [11, 38, 31], reducing the number of input
images [27] and improving the rendering quality [18, 1, 2, 39, 21, 33]. With
the latter, one of the focuses is to change the positional encoding to account
for the volumetric nature of the regions that contribute to pixel rendering
[1, 2].

###  2.1 Positional Encoding

NeRF uses a positional encoding (PE) on the raw coordinates of the input
points in order to induce the network to learn higher-frequency features [28].
However, the sampled points in NeRF are intended to represent a region in the
volumetric space. This can lead to ambiguities that may cause aliasing. In
this sense, mip-NeRF [1] uses a volumetric rendering by casting cones instead
of rays, changing the input of the MLP from points to cone frustums. These
regions are encoded using an integrated positional encoding (IPE), which aims
to integrate the PE over the cone frustums. Given that the associated integral
has no closed-form solution, they formulate the IPE as the expected value of
the positional encoding in a 3D Gaussian distribution centred in the frustum.
The IPE reduces aliasing by reducing the ambiguity of single-point encoding.
Mip-NeRF 360 [2] uses a contracted space representation to extend the mip-NeRF
parameterization to 360° unbounded scenes, since they found that the
approximation given in mip-NeRF degrades for elongated frustums which arise in
the background. Additionally, and similar to DONeRF [26], mip-NeRF 360 samples
the intervals of the volumetric regions using the inverse of the distance in
order to assign a bigger capacity to nearer objects. By contrast, in this work
we explore the use of pyramid-based frustums in order to enable an exact
integral formulation of the IPE which can be applied for both bounded and
unbounded scenes alike.

###  2.2 NeRF and Mip-NeRF parameterization

NeRF uses an MLP $f$ with parameters $\Theta$ to get the colour
$\mathbf{c}\in\mathbb{R}^{3}$ and density $\sigma\in\left[0,+\infty\right)$
given a point $\mathbf{x}\in\mathbb{R}^{3}$ and a viewing direction
$\hat{\mathbf{v}}\in S^{2}$, where $S^{2}$ is the unit sphere, such that:

$\left(\mathbf{c},\sigma\right)=f(\mathbf{x},\hat{\mathbf{v}};\Theta)\,,$ (1)

whereby NeRF uses the positional encoding

$\displaystyle\begin{split}\gamma(\mathbf{x})=&\left[\sin(2^{0}\mathbf{x}),\ldots,\sin(2^{L-1}\mathbf{x}),\right.\\\
&\left.\cos(2^{0}\mathbf{x}),\ldots,\cos(2^{L-1}\mathbf{x})\right]^{\top},\end{split}$
(2)

and $\gamma:\mathbb{R}\rightarrow\mathbb{R}^{2L}$ is applied to each
coordinate of $\mathbf{x}$ and each component of $\hat{\mathbf{v}}$
independently.

[] []

Figure 2: Cone and pyramid tracing for volumetric NeRF parameterizations. (a)
Mip-NeRF [1] uses cone frustums to parameterize a 3D region. Since the IPE of
these frustums does not have a closed-form solution, it is approximated by
modelling the frustum as a multivariate Gaussian. (b) Exact-NeRF casts a
square pyramid instead of a cone, allowing for an exact parameterization of
the IPE by using the vertices $v_{i}$ of the frustum and the pose parameters
$\mathbf{o}$ and $\mathbf{R}$.

The sampling strategy of NeRF consists of sampling random points along the ray
that passes through a pixel. This ray is represented by
$\mathbf{r}(t)=t\mathbf{d}+\mathbf{o}$, where $\mathbf{o}$ is the camera
position and $\mathbf{d}$ is the vector that goes from the camera centre to
the pixel in the image plane. The ray is divided into $N$ intervals and the
points $\mathbf{r}(t_{i})$ are drawn from a uniform distribution over each
interval, such that:

$t_{i}\sim\mathcal{U}\left[t_{n}+\frac{i-1}{N}(t_{f}-t_{n}),t_{n}+\frac{i}{N}(t_{f}-t_{n})\right]\,,$
(3)

where $t_{n}$ and $t_{f}$ are the near and far planes. In this sense, the
colour and density of each point over the ray are obtained by
$(\mathbf{c}_{i},\sigma_{i})=f(\gamma(\mathbf{r}(t_{i})),\gamma(\mathbf{d}/\lVert\mathbf{d}\rVert);\Theta)$.

Finally, the pixel colour $\hat{C}(\mathbf{r})$ is obtained using numerical
quadrature,

$\begin{split}\hat{C}(\mathbf{r})=\sum^{N}_{i=1}T_{i}(1-\exp(-\sigma_{i}\delta_{i}))\\\
T_{i}=\exp\left(-\sum_{j=1}^{i-1}\sigma_{j}\delta_{j}\right)\,,\end{split}$
(4)

where $\delta_{i}=t_{i+1}-t_{i}$. This process is carried out hierarchically
by using coarse $\hat{C}_{c}$ and fine $\hat{C}_{f}$ samplings, where the 3D
points in the latter are drawn from the PDF formed by the weights of the
density values of the coarse sampling. The loss is then the combination of the
mean-squared error of the coarse and fine renderings for all rays
$\mathbf{r}\in\mathcal{R}$, _i.e_.,

$\mathcal{L}=\sum_{\mathbf{r}\in\mathcal{R}}\lVert\hat{C}_{c}(\mathbf{r})-C(\mathbf{r})\rVert_{2}^{2}+\lVert\hat{C}_{f}(\mathbf{r})-C(\mathbf{r})\rVert_{2}^{2}\,.$
(5)

Here we find mip-NeRF [1] is similar to NeRF, but it utilises cone tracing
instead of ray tracing. This change has the direct consequence of replacing
ray intervals by conical frustums
$F(\mathbf{d},\mathbf{o},\dot{\rho},t_{i},t_{i+1})$, where $\dot{\rho}$ is the
radius of the circular section of the cone at the image plane (Fig. 2a). This
leads to the need for a new positional encoding that summarizes the function
in Eq. 2 over the region defined by the frustum. The proposed IPE is thus
given by:

$\gamma_{I}(\mathbf{d},\mathbf{o},\dot{\rho},t_{i},t_{i+1})=\frac{\iiint_{F}\gamma(\mathbf{x})dV}{\iiint_{F}dV}\,.$
(6)

Since the integral in the numerator of Eq. 6 has no closed-form solution, mip-
NeRF proposes to approximate it by considering the cone frustums as
multivariate Gaussians. Subsequently, the approximated IPE $\gamma^{*}$ is
given by:

$\displaystyle\begin{split}\gamma^{*}&(\boldsymbol{\mu},\boldsymbol{\Sigma})=\mathbb{E}_{x\sim\mathcal{N}(\mathbf{P}\boldsymbol{\mu},\mathbf{P}\mathbf{\Sigma}\mathbf{P}^{\top})}\left[\gamma(\mathbf{x})\right]\\\
&=\begin{bmatrix}\sin(\mathbf{P}\boldsymbol{\mu})\circ\exp(-(1/2)\text{diag}(\mathbf{P}\mathbf{\Sigma}\mathbf{P}^{\top}))\\\
\cos(\mathbf{P}\boldsymbol{\mu})\circ\exp(-(1/2)\text{diag}(\mathbf{P}\mathbf{\Sigma}\mathbf{P}^{\top}))\end{bmatrix}\,,\end{split}$
(7)

where $\boldsymbol{\mu}=\mathbf{o}+\mu_{t}\mathbf{d}$ is the centre of the
Gaussian for a frustum defined by $\mathbf{o}$ and $\mathbf{d}$ with mean
distance along the ray $\mu_{t}$, $\mathbf{\Sigma}$ is the covariance matrix,
$\circ$ denotes element-wise product and:

$\mathbf{P}=\begin{bmatrix}1&0&0&2&0&0&&2^{L-1}&0&0\\\
0&1&0&0&2&0&\ldots&0&2^{L-1}&0\\\
0&0&1&0&0&2&&0&0&2^{L-1}\end{bmatrix}^{\top}\,.$ (8)

This formulation was empirically shown to be accurate for bounded scenes where
a central object is the main part of the scene and no background information
is present. However, the approximation deteriorates for highly elongated
frustums. To avoid this, mip-NeRF 360 [2] instead uses a contracted space
where points that are beyond the unit sphere are mapped using the function:

$f(\mathbf{x})=\begin{cases}\mathbf{x}&\lVert\mathbf{x}\rVert\leq 1\\\
\left(2-\frac{1}{\lVert\mathbf{x}\rVert}\right)\frac{\mathbf{x}}{\lVert\mathbf{x}\rVert}&\lVert\mathbf{x}\rVert>1\end{cases}\,.$
(9)

Subsequently, the new $\boldsymbol{\mu}$ and $\boldsymbol{\Sigma}$ values are
given by $f(\boldsymbol{\mu})$ and
$\mathbf{J}_{f}(\boldsymbol{\mu})\boldsymbol{\Sigma}\mathbf{J}_{f}(\boldsymbol{\mu})^{\top}$,
where $\mathbf{J}_{f}$ is the Jacobian matrix of $f$. Empirically, this re-
parameterization now allows learning the representation of scenes with distant
backgrounds (_i.e_. over a longer depth of field).

##  3 Exact-NeRF

In this paper, we present Exact-NeRF as an exploration of how the IPE
approximations of earlier work [1, 2] based on conic parameterization can be
replaced with a square pyramid-based formulation in order to obtain an exact
IPE $\gamma_{E}$, as shown in Fig. 2. The motivation behind this formulation
is to match the volumetric rendering with the pixel footprint, which in turn
is a rectangle.

Figure 3: Parameterization of triangular faces. The vertices are sorted
counter-clockwise, so the normal vector to their plane points outside the
frustum.

###  3.1 Volume of pyramidal frustums

A pyramidal frustum can be defined by a set of 8 vertices
$\mathcal{V}=\left\\{\mathbf{v}_{i}\right\\}_{i=1}^{8}$ and 6 quadrilateral
faces $\mathcal{F}=\left\\{f_{j}\right\\}_{j=1}^{6}$. In order to get the
volume in the denominator of Eq. 6, we use the divergence theorem:

$\iiint\nabla\cdot FdV=\oiint_{\partial S}F\cdot d\mathbf{S}\,,$ (10)

with $F=\frac{1}{3}\left[x,y,z\right]^{\top}$, yielding to the solution for
the volume as:

$V=\iiint dV=\frac{1}{3}\oiint_{\partial S}\left[x,y,z\right]d\mathbf{S}\,.$
(11)

Without losing generality, we divide each face into triangles, giving a set of
triangular faces $\mathcal{T}$ such that the polyhedra formed by faces
$\mathcal{F}$ and $\mathcal{T}$ are the same. Each triangle $\tau$ is defined
by three points $\mathbf{P}_{\tau,0},\mathbf{P}_{\tau,1}$ and
$\mathbf{P}_{\tau,2}$, with $\mathbf{P}_{\tau,i}\in\mathcal{V}$, such that the
cross product of the edges
$\mathbf{E}_{\tau,1}=\mathbf{P}_{\tau,1}-\mathbf{P}_{\tau,0}$ and
$\mathbf{E}_{\tau,2}=\mathbf{P}_{\tau,2}-\mathbf{P}_{\tau,0}$ points outside
the frustum (Fig. 3). As a result, Eq. 11 equates to the sum of the surface
integral for each triangle $\tau\in\mathcal{T}$,

$V=\frac{1}{3}\sum_{\tau\in\mathcal{T}}\iint_{\tau}\left[x,y,z\right]d\mathbf{S}\,.$
(12)

The points lying in the triangle
$\triangle\mathbf{P}_{\tau,0}\mathbf{P}_{\tau,1}\mathbf{P}_{\tau,2}$ can hence
be parameterized as:

$\mathbf{P}_{\tau}(u,v)=\mathbf{P}_{\tau,0}+u\mathbf{E}_{\tau,1}+v\mathbf{E}_{\tau,2}\,,$
(13)

such that $0\leq u\leq 1,0\leq v\leq 1$ and $u+v\leq 1$. The differential term
of Eq. 12 is then:

$\displaystyle d\mathbf{S}$
$\displaystyle=\left(\frac{\partial\mathbf{P}_{\tau}}{\partial
u}\times\frac{\partial\mathbf{P}_{\tau}}{\partial v}\right)dudv$ (14)
$\displaystyle d\mathbf{S}$
$\displaystyle=\left(\mathbf{E}_{\tau,1}\times\mathbf{E}_{\tau,2}\right)dudv\triangleq\mathbf{N}_{\tau}dudv\,.$
(15)

By substituting Eq. 15 into Eq. 12, and noting that
$\left[x,y,z\right]=\mathbf{P}_{\tau}(u,v)$, we obtain:

$V=\frac{1}{3}\sum_{\tau\in\mathcal{T}}\int_{0}^{1}\int_{0}^{1-v}\mathbf{P}_{\tau}(u,v)^{\top}\mathbf{N}_{\tau}dudv\,.$
(16)

Since the dot product of any point $\mathbf{P}_{\tau}$ in a face $\tau$ with a
vector $\mathbf{N}_{\tau}$ normal to $\tau$ is constant, the product inside
the integral of Eq. 16 is constant. Subsequently, $\mathbf{P}_{\tau}(u,v)$ can
be replaced with any point, such as $\mathbf{P}_{\tau,0}$. Finally, the
required volume is obtained as:

$\displaystyle\begin{split}V&=\frac{1}{3}\sum_{\tau\in\mathcal{T}}\mathbf{P}_{\tau,0}^{\top}\mathbf{N}_{\tau}\int_{0}^{1}\int_{0}^{1-v}dudv\\\
&=\frac{1}{6}\sum_{\tau\in\mathcal{T}}\mathbf{P}_{\tau,0}^{\top}\mathbf{N}_{\tau}\,.\end{split}$
(17)

###  3.2 Integration over the PE Function

Following from earlier, we can obtain the numerator of the IPE in Eq. 6 using
the divergence theorem. We will base our analysis on the sine function and the
$x$ coordinate, _i.e_., $\gamma(x)=\sin(2^{l}x)$. Substituting
$F=\left[-\frac{1}{2^{l}}\cos(2^{l}x),0,0\right]^{\top}$ in Eq. 10 we obtain:

$\iiint\sin(2^{l}x)dV=\oiint_{\partial
S}\left[-\frac{1}{2^{l}}\cos(2^{l}x),0,0\right]d\mathbf{S}\,.$ (18)

Following the same strategy of dividing the surface into triangular faces as
in the earlier volume calculation, Eq. 18 can be written as:

$\iiint\sin(2^{l}x)dV=\sum_{\tau\in\mathcal{T}}\frac{1}{2^{l}}\sigma_{x,\tau}\mathbf{N}_{\tau}\cdot\hat{\textbf{\i}}\,,$
(19)

where $\hat{\textbf{\i}}$ is the unit vector in the $x$ direction and:

$\sigma_{x,\tau}=\int_{0}^{1}\int_{0}^{1-v}-\cos(2^{l}x_{\tau}(u,v))dudv\,.$
(20)

From Eq. 13, the $x$ coordinate can be parameterized as:

$x_{\tau}(u,v)=x_{\tau,0}+u(x_{\tau,1}-x_{\tau,0})+v(x_{\tau,2}-x_{\tau,0})\,.$
(21)

Substituting Eq. 21 in Eq. 20 and solving the integral, we obtain:

$\begin{split}\sigma_{x,\tau}=\frac{1}{2^{2l}}&\left(\frac{\cos(2^{l}x_{\tau,0})}{(x_{\tau,0}-x_{\tau,1})(x_{\tau,0}-x_{\tau,2})}\right.\\\
&\left.+\frac{\cos(2^{l}x_{\tau,1})}{(x_{\tau,1}-x_{\tau,0})(x_{\tau,1}-x_{\tau,2})}\right.\\\
&\left.+\frac{\cos(2^{l}x_{\tau,2})}{(x_{\tau,2}-x_{\tau,0})(x_{\tau,2}-x_{\tau,1})}\right)\,.\end{split}$
(22)

Furthermore, Eq. 22 can be written as:

$\sigma_{x,\tau}=\frac{1}{2^{2l}}\frac{\det\left(\begin{bmatrix}\mathbf{1}&\boldsymbol{x}_{\tau}&\cos(2^{l}\boldsymbol{x}_{\tau})\end{bmatrix}\right)}{\det\left(\begin{bmatrix}\mathbf{1}&\boldsymbol{x}_{\tau}&\boldsymbol{x}_{\tau}^{\circ
2}\\\ \end{bmatrix}\right)}\,,$ (23)

where $\mathbf{1}=\left[1,1,1\right]^{\top}$,
$\boldsymbol{x}_{\tau}=\left[x_{\tau,0},x_{\tau,1},x_{\tau,2}\right]^{\top}$
and $(\cdot)^{\circ n}$ is the element-wise power.

In general, we can also obtain the expression in Eq. 19 for the $k$-th
coordinate of $\mathbf{x}$ as:

$\iiint\sin(2^{l}\mathbf{x}_{k})dV=\frac{1}{2^{3l}}\sum_{\tau\in\mathcal{T}}{\sigma_{k,\tau}\mathbf{N}_{\tau}\cdot\mathbf{e}_{k}}\,,$
(24)
$\sigma_{k,\tau}=\frac{\det\left(\begin{bmatrix}\mathbf{1}&\mathbf{X}_{\tau}^{\top}\mathbf{e}_{k}&\cos(2^{l}\mathbf{X}_{\tau}^{\top}\mathbf{e}_{k})\end{bmatrix}\right)}{\det\left(\begin{bmatrix}\mathbf{1}&\mathbf{X}_{\tau}^{\top}\mathbf{e}_{k}&(\mathbf{X}_{\tau}^{\top}\mathbf{e}_{k})^{\circ
2}\\\ \end{bmatrix}\right)}\,,$ (25)

where
$\mathbf{X}_{\tau}=\begin{bmatrix}\mathbf{P}_{\tau,0}&\mathbf{P}_{\tau,1}&\mathbf{P}_{\tau,2}\end{bmatrix}$
and $\mathbf{e}_{k}$ are the vectors that form the canonical basis in
$\mathbb{R}^{3}$. Similarly, the integral over the cosine function is defined
as:

$\iiint\cos(2^{l}\mathbf{x}_{k})dV=\frac{1}{2^{3l}}\sum_{\tau\in\mathcal{T}}{\xi_{k,\tau}\mathbf{N}_{\tau}\cdot\mathbf{e}_{k}}\,,$
(26)

where:

$\xi_{k,\tau}=-\frac{\det\left(\begin{bmatrix}\mathbf{1}&\mathbf{X}_{\tau}^{\top}\mathbf{e}_{k}&\sin(2^{l}\mathbf{X}_{\tau}^{\top}\mathbf{e}_{k})\end{bmatrix}\right)}{\det\left(\begin{bmatrix}\mathbf{1}&\mathbf{X}_{\tau}^{\top}\mathbf{e}_{k}&(\mathbf{X}_{\tau}^{\top}\mathbf{e}_{k})^{\circ
2}\\\ \end{bmatrix}\right)}\,.$ (27)

Finally, we get the exact IPE (EIPE) of the frustum used by our Exact-NeRF
approach by dividing Eqs. 24 and 26 by Eq. 17 as follows:

$\gamma_{E}(\mathbf{x},l;\mathcal{V})=\frac{6}{2^{3l}}\begin{bmatrix}\frac{\sum_{\tau\in\mathcal{T}}\boldsymbol{\sigma}_{\tau}\circ\mathbf{N}_{\tau}}{\sum_{\tau\in\mathcal{T}}\mathbf{P}_{\tau,0}^{\top}\mathbf{N}_{\tau}}\\\
\frac{\sum_{\tau\in\mathcal{T}}\boldsymbol{\xi}_{\tau}\circ\mathbf{N}_{\tau}}{\sum_{\tau\in\mathcal{T}}\mathbf{P}_{\tau,0}^{\top}\mathbf{N}_{\tau}}\,,\end{bmatrix}$
(28)

where
$\boldsymbol{\sigma}_{\tau}=\begin{bmatrix}\sigma_{1,\tau}&\sigma_{2,\tau}&\sigma_{3,\tau}\end{bmatrix}^{\top}$
and
$\boldsymbol{\xi}_{\tau}=\begin{bmatrix}\xi_{1,\tau}&\xi_{2,\tau}&\xi_{3,\tau}\end{bmatrix}^{\top}$.
It’s worth mentioning that Eq. 28 fails when a coordinate value repeats in any
of the points of a triangle (_i.e_., there is a triangle $\tau$ such that
$\mathbf{P}_{\tau,i}=\mathbf{P}_{\tau,j}$ for a $i\neq j$). For these cases,
l’Hopital’s rule can be used to evaluate this limit (see Supplementary
Material).

Figure 4: Qualitative comparison between mip-NeRF and Exact-NeRF (ours) for
the blender dataset. Our method matches the mip-NeRF rendering capability but
also produces slightly sharper renderings (see the bass drum hole and the back
leaves of the ficus).

Despite starting our analysis with squared pyramids, it can be noted that Eq.
28 is true for any set of vertices $\mathcal{V}$, meaning that this
parameterization can be applied for any shape with known vertices. This is
particularly useful for scenarios where the space may be deformed and frustums
may not be perfect pyramids, such as in mip-Nerf 360 [2]. Additionally, it can
be noted that our EIPE is multiplied by a factor of $2^{-3l}$, meaning that
when $L\rightarrow\infty$ then $\gamma_{E}\rightarrow 0$ which hence makes our
implementation robust to large values of $L$. This property of our Exact-NeRF
formulation is consistent with that of the original mip-NeRF [1].

##  4 Implementation Details

Exact-NeRF is implemented using the original code of mip-NeRF, which is based
on JAXNeRF [4]. Apart from the change of the positional encoding, no further
modification is made. We use the same sampling strategy of ray intervals
defined in Eq. 3, but sampling $N+1$ points to define $N$ intervals. In order
to obtain the vertices of the pyramid frustums, we use the coordinates of the
corners of each pixel and multiply them by the $t_{i}$ values to get the front
and back faces of the frustums. Double precision (64-bit float) is used for
calculating the EIPE itself, as it relies upon arithmetic over very low
numerical decimals that are otherwise prone to numerical precision error (see
Eq. 22). After calculation, the EIPE result is transformed back to single
precision (32-bit float).

We compare our implementation of Exact-NeRF against the original mip-NeRF
baseline on the benchmark Blender dataset [23], down-sampled by a factor of 2.
We follow a similar training strategy as in mip-NeRF: training both models for
800k iterations (instead of 1 million, as we observed convergence at this
point) with a batch size of 4096 using Adam optimization [15] with a
logarithmically annealed learning rate, $5\times 10^{-4}\rightarrow 5\times
10^{-6}$. All training is carried out using 2 $\times$ NVIDIA Tesla V100 GPU
per scene.

Additionally, we compare the use of the EIPE against mip-NeRF 360 on the
dataset of Barron _et al_. [2]. Similarly, we used the reference code from
MultiNeRF [24], which contains an implementation of mip-NeRF 360 [2], RefNeRF
[33] and RawNeRF [22]. Pyramidal frustum vertices are contracted using Eq. 9
and the EIPE is obtained using the Eq. 28 with the mapped vertices. We trained
using a batch size of 8192 for 500k iterations using 4 $\times$ NVIDIA Tesla
V100 GPU per scene. Aside from the use of the EIPE, all other settings
remained unchanged from mip-NeRF 360 [2].

##  5 Results

Mean PSNR, SSIM and LPIPS [40] metrics are reported for our Exact-NeRF
approach, mip-NeRF [1] and mip-NeRF 360 [2]. Additionally, we also report the
DISTS [7] metric since it provides another perceptual quality measurement.
Similar to mip-NeRF, we also report an average metric: the geometric mean of
the MSE = $10^{-\text{PSNR}/10}$, $\sqrt{1-\text{SSIM}}$, the LPIPS and the
DISTS.

Model | PSNR $\uparrow$ | SSIM $\uparrow$ | LPIPS $\downarrow$ | DISTS $\downarrow$ | Avg $\downarrow$
---|---|---|---|---|---
Mip-NeRF | 34.766 | 0.9706 | 0.0675 | 0.0878 | 0.0242
Exact-NeRF (ours) | 34.707 | 0.9705 | 0.0667 | 0.0822 | 0.0242

Table 1: Quantitative results comparing mip-NeRF and Exact-NeRF performance on
the Blender dataset.

Blender dataset: In Tab. 1 we present a quantitative comparison between Exact-
NeRF and mip-NeRF. It can be observed that our method matches the
reconstruction performance of mip-NeRF, with a marginal decrease of the PSNR
and SSIM and an increment in the LPIPS and DISTS metrics, but with identical
average performance. This small decrement in the PSNR and SSIM metrics can be
explained by the loss of precision in the calculation of small quantities
involved in the EIPE. Alternative formulations using the same idea could be
used (see Supplementary Material), but the intention of Exact-NeRF is to
create a general approach for any volumetric positional encoding using the
vertices of the volumetric region. Fig. 4 shows a qualitative comparison
between mip-NeRF and Exact-NeRF. It can be observed that Exact-NeRF is able to
match the reconstruction performance of mip-NeRF. A closer examination reveals
that Exact-NeRF creates sharper reconstructions in some regions, such as the
hole in the bass drum or the leaves in the ficus, which is explained by mip-
NeRF approximating the conical frustums as Gaussians. This is consistent with
the increase in the LPIPS and DISTS, which are the perceptual similarity
metrics.

Model | PSNR $\uparrow$ | SSIM $\uparrow$ | LPIPS $\downarrow$ | DISTS $\downarrow$ | Avg $\downarrow$
---|---|---|---|---|---
Mip-NeRF 360 | 27.325 | 0.7942 | 0.6559 | 0.2438 | 0.1077
Exact-NeRF (ours) | 27.230 | 0.7881 | 0.6569 | 0.2452 | 0.1088

Table 2: Comparison of the performance of Exact-NeRF with mip-NeRF 360 on the
unbounded dataset of Barron _et al_. [2]. Figure 5: Qualitative comparison
between mip-NeRF 360 and Exact-NeRF (ours). (a) Our model, similar to mip-
NeRF, struggles with tiny vessels. (b) Exact-NeRF shows cleaner renderings and
(c) higher quality background reconstruction.

Mip-NeRF 360 dataset: Tab. 2 shows the results for the unbounded mip-NeRF 360
dataset. Despite Exact-NeRF having marginally weaker reconstruction metrics,
it shows a competitive performance without any changes to the implementation
of the EIPE used earlier with the bounded blender dataset, _i.e_., the
contracted vertices were directly used without any further simplification or
linearization, as in mip-NeRF 360 [2]. Similar to the blender dataset results,
this decrement can be explained with the loss of precision, which suggests
that an alternative implementation of Eq. 28 may be needed. A qualitative
comparison is shown in Fig. 5. It can be observed that tiny vessels are more
problematic for Exact-NeRF (Fig. 5a), which can be explained again by the loss
of precision. However, it is noted in Fig. 5b that the reconstruction of far
regions in mip-NeRF 360 is noisier than Exact-NeRF (see Fig. 5b, grill and the
car), which is a consequence of the poor approximation of the Gaussian region
for far depth of field objects in the scene. Fig. 5c reveals another example
of a clearer region in the Exact-NeRF reconstruction for the background
detail. Fig. 6 shows snapshots of the depth estimation for the bicycle, bonsai
and garden scenes. Consistent with the colour reconstructions, some background
regions have a more detailed estimation. It is also noticed (not shown) that
despite Exact-NeRF having a smoother depth estimation, it may show some
artifacts in the form of straight lines, which may be caused by the shape of
the pyramidal frustums. It is worth reminding that our implementation of the
EIPE in mip-NeRF 360 is identical to the EIPE in mip-NeRF.

Figure 6: Depth estimation for mip-NerF 360 and Exact-NeRF. Our approach shows
better depth estimations for background regions (highlighted in the black
boxes), although some artifacts in form of straight lines may appear, which is
inherent in our pyramidal shapes. Figure 7: Numerical underflow artifacts in
Exact-NeRF.

Impact of Numerical Underflow As seen in Sec. 3, Exact-NeRF may suffer from
numerical underflow when the difference of a component of two points
$\Delta=x_{\tau,i}-x_{\tau,j}$ is too close to zero ($\Delta\rightarrow 0$).
In the case of this difference being precisely zero, the limit can be found
using l’Hopital’s rule, as is further developed in Appendix A.1. However, if
this value is not zero but approximately zero, numerical underflow could lead
to exploding values in Eq. 22. This error hinders the training of the MLP
since the IPE is bounded to the interval $\left[-1,1\right]$ by definition
(Eq. 6). An example of the effect of numerical underflow in our method applied
under the mip-NeRF 360 framework is shown in Fig. 7. The black lines are the
location of such instances where underflow occurs. The curvature of these
lines is a direct consequence of the contracted space used in mip-NeRF 360. In
order to eliminate this effect, we use double precision for the calculation of
the EIPE. Additionally, all differences of a coordinate which are less than
$1\times 10^{-6}$ are set to zero and reformulated using l’Hopital’s rule.

##  6 Conclusion

In this work, we present Exact-NeRF, a novel precise volumetric
parameterization for neural radiance fields (NeRF). In contrast to conical
frustum approximation via a multivariate Gaussian in mip-NeRF [1], Exact-NeRF
uses a novel pyramidal parameterization to encode 3D regions using an Exact
Integrated Positional Encoding (EIPE). The EIPE applies the divergence theorem
to compute the exact value of the positional encoding (an array of sine and
cosines) in a pyramidal frustum using the coordinates of the vertices that
define the region. Our proposed EIPE methodology can be applied to any such
architecture that performs volumetric positional encoding from simple
knowledge of the pyramidal frustum vertices without the need for further
processing.

We compare Exact-NeRF against mip-NeRF on the blender dataset, showing a
matching performance with a marginal decrease in PSNR and SSIM but an overall
improvement in the perceptual metric, LPIPS. Qualitatively our approach
exhibits slightly cleaner and sharper reconstructions of edges than mip-NeRF
[1].

We similarly compare Exact-NeRF with mip-NeRF 360 [2]. Despite Exact-NeRF
showing a marginal decrease in performance metrics, it illustrates the
capability of the EIPE on a different architecture without further
modification. Exact-NeRF obtains sharper renderings of distant (far depth of
field) regions and areas where mip-NeRF 360 presents some noise, but it fails
to reconstruct tiny vessels in near regions. The qualitative depth estimations
maps also confirm these results. The marginal decrease in performance of our
Exact-NeRF method can be attributed to numerical underflow and some artifacts
caused by the choice of a step-function-based square pyramidal
parameterization. In addition, our results suggest using a combined encoding
such that the EIPE is used for distance objects, where it is more stable and
accurate. Although alternative solutions can be obtained by restricting the
analysis to rectangular pyramids, our aim is to introduce a general framework
that can be applied to any representation of a 3D region with known vertices.
The investigation of more stable representations and the performance of
different shapes for modelling 3D regions under a neural rendering context
remains an area for future work.

## Acknowledgments

This work is partially supported by the Mexican Council of Science and
Technology (CONACyT).

## References

  * [1] Jonathan T Barron, Ben Mildenhall, Matthew Tancik, Peter Hedman, Ricardo Martin-Brualla, and Pratul P Srinivasan.  Mip-nerf: A multiscale representation for anti-aliasing neural radiance fields.  In Proceedings of the IEEE Conf. Comput. Vis. Pattern Recog., pages 5855–5864, 2021.
  * [2] Jonathan T Barron, Ben Mildenhall, Dor Verbin, Pratul P Srinivasan, and Peter Hedman.  Mip-nerf 360: Unbounded anti-aliased neural radiance fields.  In Proceedings of the IEEE Conf. Comput. Vis. Pattern Recog., pages 5470–5479, 2022.
  * [3] Abril Corona-Figueroa, Jonathan Frawley, Sam Bond Taylor, Sarath Bethapudi, Hubert P. H. Shum, and Chris G. Willcocks.  Mednerf: Medical neural radiance fields for reconstructing 3d-aware ct-projections from a single x-ray.  In Proceedings of the 2022 44th Annual International Conference of the IEEE Engineering in Medicine & Biology Society, pages 3843–3848, 2022\.
  * [4] Boyang Deng, Jonathan T. Barron, and Pratul P. Srinivasan.  JaxNeRF: an efficient JAX implementation of NeRF.  https://github.com/google-research/google-research/tree/master/jaxnerf, 2020\.
  * [5] Kangle Deng, Andrew Liu, Jun-Yan Zhu, and Deva Ramanan.  Depth-supervised nerf: Fewer views and faster training for free.  In Proceedings of the IEEE Conf. Comput. Vis. Pattern Recog., pages 12882–12891, June 2022.
  * [6] Arnab Dey, Yassine Ahmine, and Andrew I. Comport.  Mip-NeRF RGB-d: Depth assisted fast neural radiance fields.  Journal of WSCG, 30(1-2):34–43, 2022.
  * [7] Keyan Ding, Kede Ma, Shiqi Wang, and Eero P Simoncelli.  Image quality assessment: Unifying structure and texture similarity.  Proceedingf the IEEE Trans. Pattern Anal. Mach. Intell., 2020.
  * [8] Keyan Ding, Kede Ma, Shiqi Wang, and Eero P Simoncelli.  Comparison of full-reference image quality models for optimization of image processing systems.  Int. J. Comp. Vis., 129(4):1258–1281, 2021.
  * [9] Sara Fridovich-Keil, Alex Yu, Matthew Tancik, Qinhong Chen, Benjamin Recht, and Angjoo Kanazawa.  Plenoxels: Radiance fields without neural networks.  In Proceedings of the IEEE Conf. Comput. Vis. Pattern Recog., pages 5501–5510, June 2022.
  * [10] Shanyan Guan, Huayu Deng, Yunbo Wang, and Xiaokang Yang.  Neurofluid: Fluid dynamics grounding with particle-driven neural radiance fields.  In Proceedings of the Int. Conf. on Mach. Learning, 2022.
  * [11] Peter Hedman, Pratul P. Srinivasan, Ben Mildenhall, Jonathan T. Barron, and Paul Debevec.  Baking neural radiance fields for real-time view synthesis.  In Proceedings of the Int. Conf. Comput. Vis., pages 5875–5884, October 2021.
  * [12] Alain Horé and Djemel Ziou.  Image quality metrics: Psnr vs. ssim.  In 2010 20th Int. Conf. on Pattern Recog., pages 2366–2369, 2010\.
  * [13] Tao Hu, Shu Liu, Yilun Chen, Tiancheng Shen, and Jiaya Jia.  Efficientnerf efficient neural radiance fields.  In Proceedings of the IEEE Conf. Comput. Vis. Pattern Recog., pages 12902–12911, June 2022.
  * [14] Xin Huang, Qi Zhang, Ying Feng, Hongdong Li, Xuan Wang, and Qing Wang.  Hdr-nerf: High dynamic range neural radiance fields.  In Proceedings of the IEEE Conf. Comput. Vis. Pattern Recog., pages 18398–18408, 2022.
  * [15] Diederik P Kingma and Jimmy Ba.  Adam: A method for stochastic optimization.  In Proceedings of the Int. Conf. Learn. Represent., 2015.
  * [16] Zoran Kotevski and Pece Mitrevski.  Experimental comparison of psnr and ssim metrics for video quality estimation.  In Danco Davcev and Jorge Marx Gómez, editors, ICT Innovations 2009, pages 357–366, Berlin, Heidelberg, 2010. Springer Berlin Heidelberg.
  * [17] Aviad Levis, Pratul P Srinivasan, Andrew A Chael, Ren Ng, and Katherine L Bouman.  Gravitationally lensed black hole emission tomography.  In Proceedings of the IEEE Conf. Comput. Vis. Pattern Recog., pages 19841–19850, 2022.
  * [18] Chen-Hsuan Lin, Wei-Chiu Ma, Antonio Torralba, and Simon Lucey.  Barf: Bundle-adjusting neural radiance fields.  In Proceedings of the Int. Conf. Comput. Vis., 2021.
  * [19] Matthew Loper, Naureen Mahmood, Javier Romero, Gerard Pons-Moll, and Michael J. Black.  SMPL: A skinned multi-person linear model.  Proceedings of the ACM Trans. Graph., 34(6):248:1–248:16, Oct. 2015\.
  * [20] Li Ma, Xiaoyu Li, Jing Liao, Qi Zhang, Xuan Wang, Jue Wang, and Pedro V Sander.  Deblur-nerf: Neural radiance fields from blurry images.  In Proceedings of the IEEE Conf. Comput. Vis. Pattern Recog., pages 12861–12870, 2022.
  * [21] Ricardo Martin-Brualla, Noha Radwan, Mehdi SM Sajjadi, Jonathan T Barron, Alexey Dosovitskiy, and Daniel Duckworth.  Nerf in the wild: Neural radiance fields for unconstrained photo collections.  In Proceedings of the IEEE Conf. Comput. Vis. Pattern Recog., pages 7210–7219, 2021.
  * [22] Ben Mildenhall, Peter Hedman, Ricardo Martin-Brualla, Pratul P Srinivasan, and Jonathan T Barron.  Nerf in the dark: High dynamic range view synthesis from noisy raw images.  In Proceedings of the IEEE Conf. Comput. Vis. Pattern Recog., pages 16190–16199, 2022.
  * [23] Ben Mildenhall, Pratul P Srinivasan, Matthew Tancik, Jonathan T Barron, Ravi Ramamoorthi, and Ren Ng.  Nerf: Representing scenes as neural radiance fields for view synthesis.  Communications of the ACM, 65(1):99–106, 2021.
  * [24] Ben Mildenhall, Dor Verbin, Pratul P. Srinivasan, Peter Hedman, Ricardo Martin-Brualla, and Jonathan T. Barron.  MultiNeRF: A Code Release for Mip-NeRF 360, Ref-NeRF, and RawNeRF.  https://github.com/google-research/multinerf, 2022.
  * [25] Peter Ndajah, Hisakazu Kikuchi, Masahiro Yukawa, Hidenori Watanabe, and Shogo Muramatsu.  Ssim image quality metric for denoised images.  In Proceedings of the 3rd WSEAS Int. Conf. on Visualization, Imaging and Simulation, pages 53–58, 2010.
  * [26] Thomas Neff, Pascal Stadlbauer, Mathias Parger, Andreas Kurz, Joerg H. Mueller, Chakravarty R. Alla Chaitanya, Anton S. Kaplanyan, and Markus Steinberger.  DONeRF: Towards Real-Time Rendering of Compact Neural Radiance Fields using Depth Oracle Networks.  Computer Graphics Forum, 40(4), 2021.
  * [27] Michael Niemeyer, Jonathan T. Barron, Ben Mildenhall, Mehdi S. M. Sajjadi, Andreas Geiger, and Noha Radwan.  Regnerf: Regularizing neural radiance fields for view synthesis from sparse inputs.  In Proceedings of the IEEE Conf. Comput. Vis. Pattern Recog., 2022\.
  * [28] Nasim Rahaman, Aristide Baratin, Devansh Arpit, Felix Draxler, Min Lin, Fred Hamprecht, Yoshua Bengio, and Aaron Courville.  On the spectral bias of neural networks.  In Proceedings of the Int. Conf. on Mach. Learning, pages 5301–5310. PMLR, 2019.
  * [29] Konstantinos Rematas, Andrew Liu, Pratul P Srinivasan, Jonathan T Barron, Andrea Tagliasacchi, Thomas Funkhouser, and Vittorio Ferrari.  Urban radiance fields.  In Proceedings of the IEEE Conf. Comput. Vis. Pattern Recog., pages 12932–12942, 2022.
  * [30] Mahmood Sharif, Lujo Bauer, and Michael K Reiter.  On the suitability of lp-norms for creating and preventing adversarial examples.  In Proceedings of the IEEE Conf. Comput. Vis. Pattern Recog. Workshops, pages 1605–1613, 2018.
  * [31] Vincent Sitzmann, Semon Rezchikov, Bill Freeman, Josh Tenenbaum, and Fredo Durand.  Light field networks: Neural scene representations with single-evaluation rendering.  Adv. Neural Inform. Process. Syst., 34:19313–19325, 2021.
  * [32] Matthew Tancik, Vincent Casser, Xinchen Yan, Sabeek Pradhan, Ben Mildenhall, Pratul P Srinivasan, Jonathan T Barron, and Henrik Kretzschmar.  Block-nerf: Scalable large scene neural view synthesis.  In Proceedings of the IEEE Conf. Comput. Vis. Pattern Recog., pages 8248–8258, 2022.
  * [33] Dor Verbin, Peter Hedman, Ben Mildenhall, Todd Zickler, Jonathan T. Barron, and Pratul P. Srinivasan.  Ref-NeRF: Structured view-dependent appearance for neural radiance fields.  Proceedings of the IEEE Conf. Comput. Vis. Pattern Recog., 2022\.
  * [34] Zhou Wang, A.C. Bovik, H.R. Sheikh, and E.P. Simoncelli.  Image quality assessment: from error visibility to structural similarity.  IEEE Transactions on Image Processing, 13(4):600–612, 2004.
  * [35] Zhou Wang and Alan C. Bovik.  Mean squared error: Love it or leave it? a new look at signal fidelity measures.  IEEE Signal Processing Magazine, 26(1):98–117, 2009.
  * [36] Yuanbo Xiangli, Linning Xu, Xingang Pan, Nanxuan Zhao, Anyi Rao, Christian Theobalt, Bo Dai, and Dahua Lin.  Bungeenerf: Progressive neural radiance field for extreme multi-scale scene rendering.  In Proceedings of the Eur. Conf. Comput. Vis., 2022.
  * [37] Guo-Wei Yang, Wen-Yang Zhou, Hao-Yang Peng, Dun Liang, Tai-Jiang Mu, and Shi-Min Hu.  Recursive-nerf: An efficient and dynamically growing nerf.  IEEE Transactions on Visualization and Computer Graphics, pages 1–14, 2022.
  * [38] Alex Yu, Ruilong Li, Matthew Tancik, Hao Li, Ren Ng, and Angjoo Kanazawa.  Plenoctrees for real-time rendering of neural radiance fields.  In Proceedings of the Int. Conf. Comput. Vis., pages 5752–5761, October 2021.
  * [39] Kai Zhang, Gernot Riegler, Noah Snavely, and Vladlen Koltun.  Nerf++: Analyzing and improving neural radiance fields.  arXiv preprint arXiv:2010.07492, 2020.
  * [40] Richard Zhang, Phillip Isola, Alexei A Efros, Eli Shechtman, and Oliver Wang.  The unreasonable effectiveness of deep features as a perceptual metric.  In Proceedings of the IEEE Conf. Comput. Vis. Pattern Recog., 2018\.

##  Appendix A Additional Formulation

In this section, we will present some additional formulations used in our
model that do not affect the results presented in the paper. Notwithstanding
that our proposed EIPE works for any polyhedron (which is the reason why it
can be used under the mip-NeRF 360 [2] architecture without further
treatment), we also present an alternative formulation of the EIPE for the
particular case of strictly square pyramids.

###  A.1 Indeterminate cases for the EIPE

By simplifying Eq. 22 we obtain:

$\sigma_{x,\tau}=\frac{\begin{aligned}
&(x_{\tau,2}-x_{\tau,1})\cos(2^{l}x_{\tau,0})\\\
+&(x_{\tau,0}-x_{\tau,2})\cos(2^{l}x_{\tau,1})\\\
+&(x_{\tau,1}-x_{\tau,0})\cos(2^{l}x_{\tau,2})\end{aligned}}{2^{2l}(x_{\tau,1}-x_{\tau,0})(x_{\tau,2}-x_{\tau,0})(x_{\tau,2}-x_{\tau,1})}\,.$
(29)

From Eq. 29 we observe that an indetermination occurs for the case of two
points in the triangle $\tau$ sharing the same coordinate, such that
$x_{\tau,i}=x_{\tau,j},i\neq j$. In order to get a valid value for these
cases, we get the limit when those two coordinates approach. We can write Eq.
29 as:

$\sigma_{x,\tau}=\frac{f(x_{\tau,0},x_{\tau,1},x_{\tau,2})}{2^{2l}g(x_{\tau,0},x_{\tau,1},x_{\tau,2})}\,.$
(30)

Then, we obtain the value for the case of $x_{\tau,0}=x_{\tau,1}$ using
l’Hopital’s rule:

$\displaystyle\lim_{x_{\tau,0}\rightarrow
x_{\tau,1}}\frac{f(x_{\tau,0},x_{\tau,1},x_{\tau,2})}{2^{2l}g(x_{\tau,0},x_{\tau,1},x_{\tau,2})}=$
(31) $\displaystyle\lim_{x_{\tau,0}\rightarrow
x_{\tau,1}}\frac{\frac{\partial}{\partial
x_{\tau,0}}f(x_{\tau,0},x_{\tau,1},x_{\tau,2})}{2^{2l}\frac{\partial}{\partial
x_{\tau,0}}g(x_{\tau,0},x_{\tau,1},x_{\tau,2})}=$ (32)
$\displaystyle\lim_{x_{\tau,0}\rightarrow
x_{\tau,1}}\frac{\begin{pmatrix}-2^{l}(x_{\tau,2}-x_{\tau,1})\sin(2^{l}x_{\tau,0})\\\
+\cos(2^{l}x_{\tau,1})-\cos(2^{l}x_{\tau,2})\end{pmatrix}}{2^{2l}(x_{\tau,2}-x_{\tau,1})(2x_{\tau,0}-x_{\tau,1}-x_{\tau,2})}=$
(33)
$\frac{2^{l}(x_{\tau,2}-x_{\tau,1})\sin(2^{l}x_{\tau,1})-\cos(2^{l}x_{\tau,1})+\cos(2^{l}x_{\tau,2})}{2^{2l}(x_{\tau,2}-x_{\tau,1})^{2}}\,.$
(34)

Similarly, from Eq. 33, we evaluate the case $x_{\tau,0}=x_{\tau,2}$:

$\frac{-2^{l}(x_{\tau,2}-x_{\tau,1})\sin(2^{l}x_{\tau,2})+\cos(2^{l}x_{\tau,1})-\cos(2^{l}x_{\tau,2})}{2^{2l}(x_{\tau,2}-x_{\tau,1})^{2}}\,.$
(35)

For the case when $x_{\tau,1}=x_{\tau,2}$, we differentiate with respect to
$x_{\tau,1}$ to obtain the corresponding value:

$\displaystyle\lim_{x_{\tau,1}\rightarrow
x_{\tau,2}}\frac{f(x_{\tau,0},x_{\tau,1},x_{\tau,2})}{2^{2l}g(x_{\tau,0},x_{\tau,1},x_{\tau,2})}=$
(36) $\displaystyle\lim_{x_{\tau,1}\rightarrow
x_{\tau,2}}\frac{\begin{pmatrix}-\cos(2^{l}x_{\tau,0})+\cos(2^{l}x_{\tau,2})\\\
+2^{l}(x_{\tau,2}-x_{\tau,0})\sin(2^{l}x_{\tau,1})\end{pmatrix}}{2^{2l}(x_{\tau,2}-x_{\tau,0})(x_{\tau,0}+x_{\tau,2}-2x_{\tau,1})}=$
(37)
$\frac{-2^{l}(x_{\tau,2}-x_{\tau,0})\sin(2^{l}x_{\tau,1})+\cos(2^{l}x_{\tau,0})-\cos(2^{l}x_{\tau,2})}{2^{2l}(x_{\tau,2}-x_{\tau,0})^{2}}\,.$
(38)

Finally, when $x_{\tau,0}=x_{\tau,1}=x_{\tau,2}$, we use again the l’Hopital’s
rule on Eq. 33 and differentiate again with respect to $x_{\tau,0}$ to obtain:

$\lim_{x_{\tau,0}\rightarrow x_{\tau,1}\rightarrow
x_{\tau,2}}\sigma_{x,\tau}=-\frac{1}{2}\cos(2^{l}x_{\tau,0})\,.$ (39)

Using the same approach, we can find the following expressions for
$\xi_{x,\tau}$ (Eq. 27):

$\lim_{x_{\tau,0}\rightarrow
x_{\tau,1}}\xi_{x,\tau}=\frac{\begin{pmatrix}2^{l}(x_{\tau,2}-x_{\tau,1})\cos(2^{l}x_{\tau,1})\\\
+\sin(2^{l}x_{\tau,1})-\sin(2^{l}x_{\tau,2})\end{pmatrix}}{2^{2l}(x_{\tau,2}-x_{\tau,1})^{2}}$
(40) $\lim_{x_{\tau,0}\rightarrow
x_{\tau,2}}\xi_{x,\tau}=\frac{\begin{pmatrix}-2^{l}(x_{\tau,2}-x_{\tau,1})\cos(2^{l}x_{\tau,2})\\\
-\sin(2^{l}x_{\tau,1})+\sin(2^{l}x_{\tau,2})\end{pmatrix}}{2^{2l}(x_{\tau,2}-x_{\tau,1})^{2}}$
(41) $\lim_{x_{\tau,1}\rightarrow
x_{\tau,2}}\xi_{x,\tau}=\frac{\begin{pmatrix}-2^{l}(x_{\tau,2}-x_{\tau,0})\cos(2^{l}x_{\tau,2})\\\
-\sin(2^{l}x_{\tau,0})+\sin(2^{l}x_{\tau,2})\end{pmatrix}}{2^{2l}(x_{\tau,2}-x_{\tau,0})^{2}}$
(42) $\lim_{x_{\tau,0}\rightarrow x_{\tau,1}\rightarrow
x_{\tau,2}}\xi_{x,\tau}=\frac{1}{2}\sin(2^{l}x_{\tau,0})\,.$ (43)

Similar expressions can be obtained for the $y$ and $z$ coordinates.

Figure 8: Parameterization of the square pyramid using the pixel width
$\omega$.

###  A.2 Alternative EIPE for Squared Pyramids

As mentioned earlier, our EIPE in Eq. 28 can be used for any shape whose
vertices are known. However, the computational cost increases if the 3D shape
is complex since a larger number of triangular faces will need to be
processed. For more efficient methods, we can focus our analysis on specific
shapes. Particular to our scenario, we can obtain an alternative EIPE
exclusively for a square pyramid (note that this will not be the case for the
contraction function in mip-NeRF 360) with a known camera pose
$[\mathbf{R}|\mathbf{o}]$ and pixel width $\omega$ (similar to $\dot{r}$ in
mip-NeRF). From Fig. 8, we calculate the volume of the frustum as

$\displaystyle V$ $\displaystyle=\int_{t_{i}}^{t_{i+1}}\int_{-\omega
z/2}^{\omega z/2}\int_{-\omega z/2}^{\omega
z/2}dx^{\prime}dy^{\prime}dz^{\prime}$ (44) $\displaystyle V$
$\displaystyle=\frac{\omega^{2}}{3}\left(t_{i+1}^{3}-t_{i}^{3}\right)\,.$ (45)

The numerator in Eq. 6 for the $x$ coordinate can be obtained in the same way:

$\displaystyle I_{x}=\int_{t_{i}}^{t_{i+1}}\int_{-\omega z/2}^{\omega
z/2}\int_{-\omega z/2}^{\omega
z/2}\sin(2^{l}x)dx^{\prime}dy^{\prime}dz^{\prime}\,.$ (46)

Since the camera pose is known, we can express $x$ as

$x=r_{11}x^{\prime}+r_{12}y^{\prime}+r_{13}z^{\prime}+o_{1}\,,$ (47)

where $r_{ij}$ is an element of the rotation matrix $\mathbf{R}$ and $o_{1}$
is the first element of $\mathbf{o}$. Substituting Eq. 47 in Eq. 46 (and
omitting the integration limits for clarity):

$I_{x}=\iiint\sin(2^{l}(r_{11}x^{\prime}+r_{12}y^{\prime}+r_{13}z^{\prime}+o_{1}))dx^{\prime}dy^{\prime}dz^{\prime}\,.$
(48)

The solution to the integral in Eq. 48 is then:

$\displaystyle I_{x}$
$\displaystyle=\frac{1}{2^{3l}r_{11}r_{12}}\left[\frac{C_{1}}{\zeta_{1}}-\frac{C_{2}}{\zeta_{2}}-\frac{C_{3}}{\zeta_{3}}+\frac{C_{4}}{\zeta_{4}}\right]\,,$
(49) $\displaystyle C_{j}$
$\displaystyle=\cos\left(2^{l}(t_{i+1}\zeta_{j}+o_{1})\right)-\cos\left(2^{l}(t_{i}\zeta_{j}+o_{1})\right)\,,$
(50) $\displaystyle\zeta_{j}$
$\displaystyle=\boldsymbol{\eta}_{j}^{\top}\begin{bmatrix}r_{11}\\\ r_{12}\\\
r_{13}\end{bmatrix}\,,$ (51) $\displaystyle\boldsymbol{\eta}_{1}$
$\displaystyle=\begin{bmatrix}\frac{\omega}{2}\\\ \frac{\omega}{2}\\\
1\end{bmatrix}\\!,\boldsymbol{\eta}_{2}=\begin{bmatrix}-\frac{\omega}{2}\\\
\frac{\omega}{2}\\\
1\end{bmatrix}\\!,\boldsymbol{\eta}_{3}=\begin{bmatrix}\frac{\omega}{2}\\\
-\frac{\omega}{2}\\\
1\end{bmatrix}\\!,\boldsymbol{\eta}_{4}=\begin{bmatrix}-\frac{\omega}{2}\\\
-\frac{\omega}{2}\\\ 1\end{bmatrix}\,.$ (52)

Similarly to the EIPE in Eq. 28, an indeterminate value arises in Eq. 49 for
$r_{11}=0$ and $r_{12}=0$. For these cases, l’Hopital’s rule can be used as in
Sec. A.1 or Eq. 48 can be solved by substituting $r_{11}=0$ and $r_{12}=0$. We
omit these calculations for brevity.

(a)

(b)

(c)

(d)

(e)

(f)

Figure 9: Numerical comparison between the IPE and our EIPE. (a) EIPE vs IPE
for different values of $\mu_{t}$ and (b) their difference. (c) EIPE vs IPE
with respect to the length of the frustum $\delta_{i}$ and (d) their
difference.

##  Appendix B Numerical Analysis between IPE and EIPE

We compare the exact value of the EIPE with the approximation in Eq. 7 used by
mip-NeRF [1]. In Fig. 9(a) we contrast the value of the EIPE vs the IPE for
frustums of length $\delta_{i}=0.02$ at different positions along the ray
$\mathbf{d}$ and at different positional encoding frequencies $L$. The values
of $\mathbf{d}$, $\mathbf{o}$ and $\mathbf{R}$ correspond to a random pixel of
a random image of the blender dataset. It is seen that the approximation is
precise for frustums that are near the camera (small $\mu_{t}$), but it
degrades the further it gets. It is also observed that this effect grows
faster for larger values of $L$. This trend is more noticeable in the plot of
the error between the EIPE and IPE (Fig. 9(b)), where the magnitude of the
error is a periodic function approximately bounded by two lines whose pendant
seems to grow proportional with $L$. Furthermore, it is observed that the
frequency of the error is also proportional to $L$. Figs. 9(c) and 9(d) show a
similar analysis for small values of $\mu_{t}$ and $\delta_{i}=5\times
10^{-4}$, which correspond to small frustums. In these instances, it is
observed that numerical errors occur, which is consistent with the analysis of
the Impact of Numerical Underflow in Sec. 5. A similar analysis for a fixed
value of $\mu_{t}=3$ and varying $\delta_{i}$ is shown in Figs. 9(e) and 9(f).
Here, a more drastic error is seen when $\delta_{i}$ increases, which is
consistent with the observation made in [2] that the IPE does not approximate
well for very elongated Gaussians. Additionally, rapid changes in the IPE are
observed for small variations in the length of the frustum (see Fig. 9(e) IPE
$L=3$ and IPE $L=4$), which might not be desired. On the other hand, our EIPE
is more robust to these elongations, meaning that it could be a more reliable
parameterization for distant objects.

Despite the increasing error in the approximation of the IPE for larger values
of $L$, this effect gets mitigated by the nature of the IPE itself, which
gives more importance to the components of the positional encoding with
smaller frequencies. However, in scenarios with distant backgrounds where more
elongated frustum arise, such as in the bicycle scene, Exact-NeRF seems to
perform better (Sec. 5). Given that the scenes in the blender and mip-NeRF 360
datasets are composed of one central object only, it is difficult to evaluate
the performance of the IPE and EIPE formulations for distant objects or
scenarios with several objects.

Figure 10: Additional results of Exact-NeRF for the blender dataset.

##  Appendix C Additional Results on the Blender Dataset

We present more qualitative comparisons in Fig. 10 between different scenes of
the blender dataset. The reconstructions of both mip-NeRF and Exact-NeRF are
almost identical, but a few differences can be noted, _e.g_., the apron of the
chair and the holes in the lego scene are slightly sharper in our
reconstruction; the details in the cymbals of the drum are more similar with
the ground truth; the reconstruction of the water in the ship scene is more
accurate with our method. Besides these minimal differences, our exploratory
work demonstrates that analytical solutions to a volumetric positional
encoding exist if the shape of the frustum is changed.

##  Appendix D Limitation of Existing Metrics

Following the approach from previous NeRF research, we report PSNR, SSIM and
LPIPS as our evaluation metrics. PSNR and SSIM are two of the first evaluation
metrics for image reconstruction. Traditionally, PSNR (based on the MSE
metric) has been used to assess the quality of lossy compression algorithms.
Since the PSNR is obtained via the pixel-wise absolute error, it cannot
measure the structural and/or perceptual similarity between the reconstructed
and reference images. SSIM was proposed as an alternative metric since it
quantifies the relation between the pixels and their neighbourhood (_i.e_.,
the structural information). Several works have focused on the weakness of
these metrics [34, 35, 16, 30, 25], where the main criticism is that images
subject to different compression artifacts and distortion effects (such as
additive Gaussian blurring) exhibit similar PSNR and SSIM values. Additional
work [12] has shown analytical and experimental relations between both
metrics, meaning that they are not independent. In order to overcome these
effects, recent image quality assessment methods have been proposed. Ding _et
al_. [8] have carried out a comprehensive comparison between different
metrics, where deep neural networks-based metrics such as LPIPS [40] and DISTS
[7] showed to be the most reliable quality metrics for perceptual similarity.
These metrics compare two images by measuring the distance of their feature
maps from a pretrained neural network. These results motivated us to include
the DISTS metric in our experiments (Tabs. 1 and 2). Our method obtains a
better performance in the LPIPS and DISTS metrics, thus improving the
perceptual quality.