SlowGuess/NeurIPS_2023_OCR huggingface dataset:
Figure A2: Blender Qualitative Result Additional visualizations of rendered Blender dataset test views. We see that our PL-NeRF is able to achieve sharper and crisper texture (chair and hotdog surface), better capture fine geometric detail (hole in lego, rope in ship) and avoid blurriness caused by conflicting rays, e.g. grazing angle views as shown in the mic.
Metrics	Method	Nc	Ni	Avg.	Chair	Drums	Ficus	Hotdog	Lego	Mat.	Mic	Ship
PSNR↑	Surrogate	64	128	30.25	31.96	24.69	29.05	35.64	31.32	29.10	32.60	27.59
Precise	64	128	30.87	32.85	24.96	29.61	36.54	32.27	29.35	33.21	28.22
Precise	128	64	31.10	32.92	25.07	30.18	36.46	32.90	29.52	33.08	28.71
SSIM↑	Surrogate	64	128	0.940	0.962	0.914	0.957	0.973	0.953	0.943	0.978	0.841
Precise	64	128	0.946	0.969	0.921	0.961	0.977	0.962	0.947	0.982	0.848
Precise	128	64	0.948	0.969	0.923	0.965	0.977	0.966	0.948	0.981	0.857
LPIPS↓	Surrogate	64	128	5.50	3.85	8.52	4.15	2.70	2.94	4.04	2.30	15.5
Precise	64	128	4.77	2.94	7.54	3.85	2.27	2.25	3.39	1.59	14.3
Precise	128	64	4.39	2.85	7.10	3.03	2.28	1.81	3.21	1.73	13.1
Table A1: Ablation Study. Reported LPIPS scores are multiplied by  $10^{2}$ . We use  $N_{c}$  and  $N_{i}$  to denote the number of coarse and fine samples, respectively.
PSNR↑	SSIM↑	LPIPS↓
Const. (Vanilla)	27.96	0.909	8.58
Linear (Ours)	28.43	0.918	7.73
A.1.4 Additional Qualitative Results
We additionally show qualitative results from DTU dataset in Fig. A1. More qualitative results are also shown in Fig. A2.
Table A2: DTU Quantitative Results Metrics computed from the average of 15 scenes from DTU dataset. The reported LPIPS score is multiplied by  ${10}^{2}$  .
Blender	Avg.	Chair	Drums	Ficus	Hotdog	Lego	Mat.	Mic	Ship
PSNR↑	DIVeR	30.78	32.01	24.72	30.1	35.94	29.03	29.31	32.10	29.08
PL-DIVeR	30.88	32.92	24.7	30.23	35.94	33.42	32.06	33.08	28.99
SSIM↑	DIVeR	0.956	0.959	0.917	0.963	0.974	0.965	0.977	0.978	0.870
PL-DIVeR	0.947	0.969	0.916	0.963	0.966	0.966	0.977	0.981	0.871
LPIPS↓	DIVeR	3.39	2.79	6.13	2.34	1.92	1.46	1.77	2.16	7.77
PL-DIVeR	3.28	2.85	6.01	2.12	1.83	1.49	1.77	1.73	7.82
Table A3: Quantitative Results of DIVeR v.s. PL-DIVeR Reported LPIPS scores are multiplied by  ${10}^{2}$
A.1.5 PL-DIVER
We plug our method into DIVeR by using their voxel-based representation and feature integration, and dropping in our piecewise linear opacity formulation for volume rendering (PL-DIVeR). Results are shown in Table A3 demonstrating that our approach is on-par if not better across the different scenes in the Blender dataset. We highlight that this shows the improvement of using our piecewise linear opacity formulation, which is a drop-in replacement to existing methods.
A.1.6 Geometric Extraction
We also show quantitative results in geometric extraction improvement of PL-NeRF compared to the original Vanilla NeRF. Table A4 reports the distance between the surface of the ground truth model to the predicted meshes by sampling point clouds via ray casting. We see that our piecewise linear approach achieves a lower error compared to Vanilla NeRF on almost all the scenes in the Blender dataset.
A.1.7 Comparison with Less Samples
We run both our PL-NeRF and Vanilla NeRF with 64 coarse and 64 fine samples results in an average of (30.09, 0.939, 0.056) and (29.86, 0.937, 0.059) for (PSNR, SSIM, LPIPS), respectively, on the Blender dataset. This shows that under less number of samples our piecewise linear opacity formulation is better than the original piecewise constant opacity assumption.
Blender	Avg.	Chair	Drums	Ficus	Hotdog	Lego	Mat.	Mic	Ship
CD↓	Vanilla NeRF	10.43	5.162	6.842	29.94	7.555	7.474	6.833	5.214	11.44
PL-NeRF	10.10	4.676	7.754	29.58	7.004	6.825	6.061	5.213	10.44
Table A4: Geometry Extraction Error Distance between the surface of the GT to the predicted meshes. Scores are  $\times 10^{3}$
A.2 Volume Rendering: Walkthrough of Piecewise Constant Derivation from [15]
From [15], under the approximation that both opacity and color are piecewise constant, for  $s \in [s_i, s_{i+1}]$ , where  $\tau_i = \tau(s_i)$  and  $\tau(s) = \tau_i \forall s \in [s_i, s_{i+1}]$ , the probability of the interval  $P_i$  is derived as follows:
$$
\begin{array}{l} P _ {i} = \int_ {s _ {i}} ^ {s _ {i + 1}} \tau (s) T (s) d s \\ = \int_ {s _ {i}} ^ {s _ {i + 1}} \tau_ {i} \exp \left(- \int_ {0} ^ {s} \tau (u) d u\right) d s \\ = \int_ {s _ {i}} ^ {s _ {i + 1}} \tau_ {i} \exp \left(- \int_ {0} ^ {s _ {i}} \tau (u) d u\right) \exp \left(- \int_ {s _ {i}} ^ {s} \tau (u) d u\right) d s \\ = \int_ {s _ {i}} ^ {s _ {i + 1}} \tau_ {i} T (s _ {i}) \exp (- \int_ {s _ {i}} ^ {s} \tau_ {i} d u) d s \\ = \tau_ {i} T (s _ {i}) \int_ {s _ {i}} ^ {s _ {i + 1}} \exp \left(- \tau_ {i} (s - s _ {i})\right) d s \\ = \tau_ {i} T (s _ {i}) \frac {\exp \left(- \tau_ {i} (s - s _ {i})\right)}{- \tau_ {i}} \bigg | _ {s _ {i}} ^ {s _ {i + 1}} \\ = \tau_ {i} T (s _ {i}) \Big (1 - \exp \big (- \tau_ {i} (s _ {i + 1} - s _ {i})) \Big). \\ \end{array}
$$
Moreover, under the piecewise constant assumption, transmittance  $T$  is derived and given by:
$$
\begin{array}{l} T (s _ {i}) = \exp \left(- \int_ {0} ^ {s _ {i}} \tau (u) d u\right) \\ = \prod_ {j = 1} ^ {i} \exp \left(- \int_ {s _ {j - 1}} ^ {s _ {j}} \tau (u) d u\right) \\ = \prod_ {j = 1} ^ {i} \exp \left(- \int_ {s _ {j - 1}} ^ {s _ {j}} \tau_ {j - 1} \mathrm {d} u\right) \\ = \prod_ {j = 1} ^ {i} \exp \left(\tau_ {j - 1} \left(s _ {j} - s _ {j - 1}\right)\right). \\ \end{array}
$$
This is the formulation that is used in most, if not all, NeRF works, which has the drawbacks that we raised such as ray conflicts during NeRF optimization and non-invertible CDF causing imprecise importance sampling and vanishing gradients when defining a loss w.r.t. the samples. We propose to approach this issue by deriving the volume rendering equation under a piecewise linear approximation to opacity, which we detail in the next sections.
A.3 Volume Rendering: Our Piecewise Linear  $\tau$  Derivation
We now show our full derivation for the volume rendering equation, under the assumption that the opacity  $\tau(s)$  is piecewise linear, i.e. it is linear within each interval  $[s_i, s_{i+1}]$ , and piecewise constant color. We then derive the probability of an interval under this assumption.
A.3.1 Generalized form for  $P_{i}$
Recall the generalized form of  $P_{i}$  as derived in the main paper. First from the definition of transmittance, we have
$$
T (s) = \exp \left(- \int_ {0} ^ {s} \tau (u) \mathrm {d} u\right)
$$
This results in the exact expression for the probability  $P_{i}$  of an interval given as follows:
$$
P _ {i} = \int_ {s _ {i}} ^ {s _ {i + 1}} \tau (s) T (s) \mathrm {d} s = - \int_ {s _ {i}} ^ {s _ {i + 1}} T ^ {\prime} (s) \mathrm {d} s = T \left(s _ {i}\right) - T \left(s _ {i + 1}\right). \tag {15}
$$
A.3.2 Evaluating  $\tau(s)$  for  $s \in [s_i, s_{i+1}]$ .
Let  $\tau_{j} = \tau (s_{i})$ ,  $\tau_{i + 1} = \tau (s_{i + 1})$ , be sampled points along the ray. For  $s\in [s_i,s_{i + 1}]$ , assuming piecewise linear opacity  $\tau$ , i.e.  $\tau (s)$  is linear within each bin, we have
$$
\begin{array}{l} \tau (s) = (\frac {s _ {i + 1} - s}{s _ {i + 1} - s _ {i}}) \tau_ {i} + (\frac {s - s _ {i}}{s _ {i + 1} - s _ {i}}) \tau_ {i + 1} \\ = \frac {1}{s _ {i + 1} - s _ {i}} [ (\tau_ {i + 1} - \tau_ {i}) s + (s _ {i + 1} \tau_ {i} - s _ {i} \tau_ {i + 1}) ] \\ \end{array}
$$
A.3.3 Transmittance  $T(s_{i})$
We first derive expression for transmittance  $T(s_{i})$  under the piecewise linear  $\tau$  assumption.
$$
\begin{array}{l} T (s _ {i}) = \exp \left(- \int_ {0} ^ {s _ {i}} \tau (u) \mathrm {d} u\right) \\ = \prod_ {j = 1} ^ {i} \exp \left(- \int_ {s _ {j - 1}} ^ {s _ {j}} \tau (u) d u\right) \\ = \prod_ {j = 1} ^ {i} \exp \left(\frac {- 1}{s _ {j} - s _ {j - 1}} \int_ {s _ {j - 1}} ^ {s _ {j}} \left[ \left(\tau_ {j} - \tau_ {j - 1}\right) u + \left(s _ {j} \tau_ {j - 1} - s _ {j - 1} \tau_ {j}\right) \right] d u\right) \\ = \prod_ {j = 1} ^ {i} \exp \left(\frac {- 1}{s _ {j} - s _ {j - 1}} \left[ \left(\frac {\tau_ {j} - \tau_ {j - 1}}{2}\right) \left(s _ {j} ^ {2} - s _ {j - 1} ^ {2}\right) + \left(s _ {j} \tau_ {j - 1} - s _ {j - 1} \tau_ {j}\right) \left(s _ {j} - s _ {j - 1}\right) \right]\right) \\ = \prod_ {j = 1} ^ {i} \exp \left(- \left[ \left(\frac {\tau_ {j} - \tau_ {j - 1}}{2}\right) (s _ {j} + s _ {j - 1}) + (s _ {j} \tau_ {j - 1} - s _ {j - 1} \tau_ {j}) \right]\right) \\ = \prod_ {j = 1} ^ {i} \exp \left(- \frac {1}{2} \left[ \tau_ {j} s _ {j} + \tau_ {j} s _ {j - 1} - \tau_ {j - 1} s _ {j} - \tau_ {j - 1} s _ {j - 1} + 2 s _ {j} \tau_ {j - 1} - 2 s _ {j - 1} \tau_ {j} \right]\right) \\ = \prod_ {j = 1} ^ {i} \exp \left(- \frac {1}{2} \left[ \tau_ {j} s _ {j} - \tau_ {j} s _ {j - 1} + \tau_ {j - 1} s _ {j} - \tau_ {j - 1} s _ {j - 1} \right]\right) \\ \end{array}
$$
Thus we get
$$
\boxed {T (s _ {i}) = \prod_ {j = 1} ^ {i} \exp \left(- \frac {\left(\tau_ {j} + \tau_ {j - 1}\right) \left(s _ {j} - s _ {j - 1}\right)}{2}\right).} \tag {16}
$$
A.3.4 Probability of interval  $[s_i, s_{i+1}]$
From the generalized form for  $P_{i}$  as derived in the main paper, we plug in the expression for transmittance  $T(s_{i})$  as derived above to obtain:
$$
\begin{array}{l} P _ {i} = \int_ {s _ {i}} ^ {s _ {i + 1}} \tau (s) T (s) d s \\ = T \left(s _ {i}\right) - T \left(s _ {i + 1}\right) \\ = \prod_ {j = 1} ^ {i} \exp \left(- \frac {\left(\tau_ {j} + \tau_ {j - 1}\right) \left(s _ {j} - s _ {j - 1}\right)}{2}\right) - \prod_ {j = 1} ^ {i + 1} \exp \left(- \frac {\left(\tau_ {j} + \tau_ {j - 1}\right) \left(s _ {j} - s _ {j - 1}\right)}{2}\right) \\ \end{array}
$$
$$
\boxed {P _ {i} = T (s _ {i}) \cdot \left(1 - \exp \left[ - \frac {\left(\tau_ {i + 1} + \tau_ {i}\right) \left(s _ {i + 1} - s _ {i}\right)}{2} \right]\right).} \tag {17}
$$
A.3.5 Our Precision Importance Sampling
To sample from the ray distribution, inverse transform sampling is needed, that is, one draws  $u \sim U(0,1)$  then passes it to the inverse of a cumulative distribution (CDF), i.e. a sample  $x = F^{-1}(u)$ , where  $F$  is the CDF of the distribution. Unlike the piecewise constant case, where  $F$  is not invertible, needing for a surrogate function  $G$  derived from  $F$ , we show that under our piecewise linear opacity assumption, we can solve for the solution  $x$  for each corresponding  $u$ .
As illustrated in the main paper, since  $F$  is continuous and increasing, under our assumption that  $\tau > 0^5$ , then  $F$  is invertible. Now, without loss of generality, let sample  $u$  fall into the CDF interval  $[c_k, c_{k+1}]$ , where  $c_k = \sum_{j < k} P_j$ . We know that the probability of the corresponding interval is  $P_k$  as given by Eq. 17. Thus we have:
$$
\begin{array}{l} c _ {k + 1} - c _ {k} = P _ {k} \\ = \int_ {s _ {k}} ^ {s _ {k + 1}} T (s) \tau (s) d s \\ = T \left(s _ {k}\right) \cdot \left(1 - \exp \left(- \frac {\left(\tau_ {k + 1} + \tau_ {k}\right) \left(s _ {k + 1} - s _ {k}\right)}{2}\right)\right) \\ \end{array}
$$
We want to solve for sample  $x \in [s_k, s_{k+1}]$ , such that  $x = F^{-1}(u)$ . Equivalently, since we know that  $x \in [s_k, s_{k+1}]$ , then we reparameterize and let  $x = s_k + t$ , where  $t \in [0, s_{k+1} - s_k]$ . We are solving for  $x$  as follows:
$$
\begin{array}{l} u = \int_ {0} ^ {x} T (s) \tau (s) d s \\ = \int_ {0} ^ {s _ {k}} T (s) \tau (s) d s + \int_ {s _ {k}} ^ {x} T (s) \tau (s) d s \\ = c _ {k} + \int_ {s _ {k}} ^ {x} T (s) \tau (s) d s \\ u - c _ {k} = \int_ {s _ {k}} ^ {x} T (s) \tau (s) \mathrm {d} s \\ \end{array}
$$
Now, from the derivation of the general form for  $P_{i}$  in Eq. 15, we can similarly obtain
$$
\begin{array}{l} u - c _ {k} = T (s _ {k}) - T (x). \\ = T (s _ {k}) \cdot \left(1 - \exp \left(- \int_ {s _ {k}} ^ {x} \tau (u) \mathrm {d} u\right)\right). \\ \end{array}
$$
Thus, simplifying we get
$$
\frac {u - c _ {k}}{T (s _ {k})} = 1 - \exp \left(- \int_ {s _ {k}} ^ {x} \tau (u) \mathrm {d} u\right)
$$
$$
\begin{array}{l} \exp \left(- \int_ {s _ {k}} ^ {x} \tau (u) \mathrm {d} u\right) = 1 - \frac {u - c _ {k}}{T \left(s _ {k}\right)} \\ - \int_ {s _ {k}} ^ {x} \tau (u) \mathrm {d} u) = \ln \left(1 - \frac {u - c _ {k}}{T (s _ {k})}\right) \\ \end{array}
$$
which gives us the expression
$$
\int_ {s _ {k}} ^ {x} \tau (u) \mathrm {d} u = \ln \left(T \left(s _ {k}\right)\right) - \ln \left(T \left(s _ {k}\right) - \left(u - c _ {k}\right)\right). \tag {18}
$$
In practice, we can simply add a small  $\epsilon$ , say  $\epsilon = 10^{-6}$ , to the model output resulting in positive  $\tau$ , to make  $\tau$  positive everywhere.
This holds for  $T(s_k) \neq 0$ , which is true under our assumption that  $\tau > 0$ , and  $T(s_k) - (u - c_k) \geq 0$ , which we will show in Sec. A.3.8 below.
A.3.6 Evaluating  $-\int_{s_k}^x \tau(u) \, \mathrm{d}u$ .
We evaluate the expression  $-\int_{s_k}^x\tau (u)\mathrm{d}u$  in order to solve for the exact sample  $x$ . Recall, for  $s\in [s_k,s_{k + 1}]$ , we have
$$
\begin{array}{l} \tau (s) = (\frac {s _ {k + 1} - s}{s _ {k + 1} - k _ {i}}) \tau_ {k} + (\frac {s - k _ {i}}{s _ {k + 1} - s _ {k}}) \tau_ {k + 1} \\ = \frac {1}{s _ {k + 1} - s _ {k}} \left[ \left(\tau_ {k + 1} - \tau_ {k}\right) s + \left(s _ {k + 1} \tau_ {k} - s _ {k} \tau_ {k + 1}\right) \right] \\ \end{array}
$$
Let constants  $a = \tau_{k + 1} - \tau_k$ ,  $b = s_{k + 1}\tau_k - s_k\tau_{k + 1}$ ,  $d = \frac{1}{s_{k + 1} - s_k}$ , thus we can write  $\tau(s)$  as follows:
$$
\tau (s) = d (a s + b). \tag {19}
$$
Thus, from Eq 19 we have:
$$
\begin{array}{l} \int_ {s _ {k}} ^ {x} \tau (u) \mathrm {d} u = \int_ {s _ {k}} ^ {x} d (a u + b) \mathrm {d} u \\ = d \left(\int_ {s _ {k}} ^ {x} a u \mathrm {d} u + \int_ {s _ {k}} ^ {x} b \mathrm {d} u\right) \\ = d \left[ \frac {a u ^ {2}}{2} \right| _ {s _ {k}} ^ {x} + b (x - s _ {i}) ] \\ = d \left[ \frac {a \left(x ^ {2} - s _ {k} ^ {2}\right)}{2} + b \left(x - s _ {k}\right) \right] \\ = d \left[ \frac {a \left(\left(s _ {k} + t\right) ^ {2} - s _ {k} ^ {2}\right)}{2} + b \left(\left(s _ {k} + t\right) - s _ {k}\right) \right] \\ = d \left[ \frac {a \left(t ^ {2} + 2 s _ {k} t\right)}{2} + b t \right] \\ = d \left[ \frac {a}{2} t ^ {2} + \left(a s _ {k} + b\right) t \right] \\ = \frac {1}{s _ {k + 1} - s _ {k}} \left[ \frac {\tau_ {k + 1} - \tau_ {k}}{2} t ^ {2} + \left(\left(\tau_ {k + 1} - \tau_ {k}\right) s _ {k} + s _ {k + 1} \tau_ {k} - s _ {k} \tau_ {k + 1}\right) t \right] \\ = \frac {1}{s _ {k + 1} - s _ {k}} \left[ \frac {\tau_ {k + 1} - \tau_ {k}}{2} t ^ {2} + \left(s _ {k + 1} \tau_ {k} - s _ {k} \tau_ {k}\right) t \right] \\ = \frac {\tau_ {k + 1} - \tau_ {k}}{2 (s _ {k + 1} - s _ {k})} t ^ {2} + \tau_ {k} t \\ \end{array}
$$
Hence, plugging this in Eq. 18, we get the quadratic equation
$$
\frac {\tau_ {k + 1} - \tau_ {k}}{2 (s _ {k + 1} - s _ {k})} t ^ {2} + \tau_ {k} t - (\ln (T (s _ {k})) - \ln (T (s _ {k}) - (u - c _ {k}))) = 0.
$$
We want to solve for  $t \in [0, s_{k+1} - s_k]$ , and the roots of the quadratic equation is given by
$$
t = \frac {\left(s _ {k + 1} - s _ {k}\right) \left(- \tau_ {k} \pm \sqrt {\tau_ {k} ^ {2} + \frac {2 \left(\tau_ {k + 1} - \tau_ {k}\right) \left(\ln T \left(s _ {k}\right) - \ln \left(T \left(s _ {k}\right) - \left(u - c _ {k}\right)\right)\right)}{\left(s _ {k + 1} - s _ {k}\right)}\right)}{\left(\tau_ {k + 1} - \tau_ {k}\right)} \tag {20}
$$
That means to compute for the solution, we need to find the root
$$
\frac {\left(- \tau_ {k} \pm \sqrt {\tau_ {k} ^ {2} + \frac {2 (\tau_ {k + 1} - \tau_ {k}) (\ln T (s _ {k}) - \ln (T (s _ {k}) - (u - c _ {k}))}{(s _ {k + 1} - s _ {k})}}\right)}{\left(\tau_ {k + 1} - \tau_ {k}\right)} \in (0, 1)
$$
which we will show always exists and is unique.
A.3.7 Bounding  $\Delta = \tau_k^2 +\frac{2(\tau_{k + 1} - \tau_k)(\ln T(s_k) - \ln(T(s_k) - (u - c_k)))}{(s_{k + 1} - s_k)}$
Let us first bound the discriminant of the quadratic formula. We have
$$
\begin{array}{l} u - c _ {k} \leq c _ {k + 1} - c _ {k} \\ = \sum_ {j = 0} ^ {k} P _ {j} - \sum_ {j = 0} ^ {k - 1} P _ {j} = P _ {k} \\ = T \left(s _ {k}\right) \cdot \left(1 - \exp \left(- \frac {\left(\tau_ {k + 1} + \tau_ {k}\right) \left(s _ {k + 1} - s _ {k}\right)}{2}\right)\right) \\ \end{array}
$$
$$
\begin{array}{l} \ln (T(s_{k}) - (u - c_{k}))\geq \ln \Big(T(s_{k}) - T(s_{k})\cdot (1 - \exp \Big(-\frac{(\tau_{k + 1} + \tau_{k})(s_{k + 1} - s_{k})}{2}\Big))\Big) \\ = \ln (T (s _ {k}) \cdot \exp \left(- \frac {\left(\tau_ {k + 1} + \tau_ {k}\right) \left(s _ {k + 1} - s _ {k}\right)}{2}\right)) \\ = \ln (T (s _ {k})) - \frac {(\tau_ {k + 1} + \tau_ {k}) (s _ {k + 1} - s _ {k})}{2} \\ \end{array}
$$
$$
\ln T (s _ {k}) - \ln (T (s _ {k}) - (u - c _ {k})) \leq \frac {(\tau_ {k + 1} + \tau_ {k}) (s _ {k + 1} - s _ {k})}{2}
$$
$$
\begin{array}{l} \frac {2 \left(\tau_ {k + 1} - \tau_ {k}\right) \left(\ln T \left(s _ {k}\right) - \ln \left(T \left(s _ {k}\right) - \left(u - c _ {k}\right)\right)\right)}{\left(s _ {k + 1} - s _ {k}\right)} \leq \frac {2 \left(\tau_ {k + 1} - \tau_ {k}\right) \left(\frac {\left(\tau_ {k + 1} + \tau_ {k}\right) \left(s _ {k + 1} - s _ {k}\right)}{2}\right)}{\left(s _ {k + 1} - s _ {k}\right)} \\ = \tau_ {k + 1} ^ {2} - \tau_ {k} ^ {2} \\ \end{array}
$$
Hence, computing the discriminant we get:
$$
\Delta = \tau_ {k} ^ {2} + \frac {2 (\tau_ {k + 1} - \tau_ {k}) (\ln T (s _ {k}) - \ln (T (s _ {k}) - (u - c _ {k})))}{(s _ {k + 1} - s _ {k})} \leq \tau_ {k} ^ {2} + (\tau_ {k + 1} ^ {2} - \tau_ {k} ^ {2}) = \tau_ {k + 1} ^ {2}.
$$
Similarly,  $u - c_{k} \geq 0$ , where equality holds when  $u = c_{k}$ . This gives us  $\Delta \geq \tau_{k}^{2}$ .
Hence, we know that  $\tau_{k + 1}^2\geq \Delta \geq \tau_k^2$  . Since we need
$$
\frac {(- \tau_ {k} \pm \sqrt {\Delta})}{(\tau_ {k + 1} - \tau_ {k})} \in (0, 1), \text {a n d} \frac {(- \tau_ {k} - \sqrt {\Delta})}{(\tau_ {k + 1} - \tau_ {k})} \leq 0
$$
Thus to find the solution  $t$ , we need to take the positive root. We have
$$
\frac {(- \tau_ {k} + \sqrt {\Delta})}{(\tau_ {k + 1} - \tau_ {k})} \geq \frac {(- \tau_ {k} + \sqrt {\tau_ {k} ^ {2}}}{(\tau_ {k + 1} - \tau_ {k})} = 0
$$
$$
\frac {(- \tau_ {k} + \sqrt {\Delta})}{(\tau_ {k + 1} - \tau_ {k})} \leq \frac {(- \tau_ {k} + \sqrt {\tau_ {k + 1} ^ {2}})}{(\tau_ {k + 1} - \tau_ {k})} = 1
$$
This shows that the solution is within the desired interval. Hence, the solution is
$$
t = \frac {\left(s _ {k + 1} - s _ {k}\right) \left(- \tau_ {k} + \sqrt {\tau_ {k} ^ {2} + \frac {2 \left(\tau_ {k + 1} - \tau_ {k}\right) \left(\ln T \left(s _ {k}\right) - \ln \left(T \left(s _ {k}\right) - (u - c _ {k})\right)\right)}{\left(s _ {k + 1} - s _ {k}\right)}\right)}{\left(\tau_ {k + 1} - \tau_ {k}\right)} \tag {21}
$$
Hence, for the positive root, we know that  $t \in [0, s_{k-1} - s_k]$ .
A.3.8 Proof for  $T(s_k) \geq (u - c_k)$
$$
\begin{array}{l} c _ {k} = \sum_ {j = 0} ^ {k - 1} P _ {j} \\ = \sum_ {j = 0} ^ {k - 1} T (s _ {j}) \cdot (1 - \exp (- \frac {\left(\tau_ {j + 1} + \tau_ {j}\right) \left(s _ {j + 1} - s _ {j}\right)}{2})) \\ \end{array}
$$
$$
T (s _ {j}) = \prod_ {i = 1} ^ {j} \exp (- \frac {(\tau_ {i} + \tau_ {i - 1}) (s _ {i} - s _ {i - 1})}{2})
$$
Let  $a_{i} = \exp \left(-\frac{(\tau_{i} + \tau_{i - 1})(s_{i} - s_{i - 1})}{2}\right)$ , and  $T(s_0) = 1$ . Hence we have
$$
T (s _ {j}) = \prod_ {i = 1} ^ {j} a _ {i},
$$
$$
\begin{array}{l} c _ {k} = T (s _ {0}) (1 - a _ {1}) + \sum_ {j = 1} ^ {k - 1} (\prod_ {i = 1} ^ {j} a _ {i}) \cdot (1 - a _ {j + 1})) \\ = (1 - a _ {1}) + (a _ {1}) (1 - a _ {2}) + (a _ {1} a _ {2}) (1 - a _ {3}) + \dots \\ = 1 - a _ {1} a _ {2} \dots a _ {k} \\ \end{array}
$$
Since  $T(s_{k}) = a_{1}a_{2}\dots a_{k}$  and  $a_{i} > 0\forall i$  then
$$
\begin{array}{l} T \left(s _ {k}\right) + c _ {k} = a _ {1} a _ {2} \dots a _ {k} + \left(1 - a _ {1} a _ {2} \dots a _ {k}\right) \\ = 1 \\ \geq c _ {k + 1} \\ \geq u. \square \\ \end{array}
$$
Note that above proof and solutions hold for  $\tau_{k} \neq \tau_{k + 1}$  and  $T(s_{k}) \neq 0$ , which is all holds since we have  $\tau(s) > 0 \forall s$ , which is equivalent to  $F$  being an increasing function.
A.3.9 The solution for sample  $u$ :
Putting everything together, we have the solution  $t$  given as
$$
t = \frac {\left(s _ {k + 1} - s _ {k}\right) \left(- \tau_ {k} + \sqrt {\tau_ {k} ^ {2} + \frac {2 \left(\tau_ {k + 1} - \tau_ {k}\right) \left(\ln T \left(s _ {k}\right) - \ln \left(T \left(s _ {k}\right) - (u - c _ {k})\right)\right)}{\left(s _ {k + 1} - s _ {k}\right)}\right)}{\left(\tau_ {k + 1} - \tau_ {k}\right)}. \tag {22}
$$
From Sec A.3.8, we have  $T(s_{k}) = a_{1}a_{2}\dots a_{k}$  and  $c_{k} = 1 - a_{1}a_{2}\dots a_{k}$ , thus  $T(s_{k}) - (u - c_{k}) = 1 - u$ . Hence we can simplify it to
$$
t = \frac {(s _ {k + 1} - s _ {k}) (- \tau_ {k} + \sqrt {\tau_ {k} ^ {2} + \frac {2 (\tau_ {k + 1} - \tau_ {k}) (\ln T (s _ {k}) - \ln (1 - u))}{(s _ {k + 1} - s _ {k})}})}{(\tau_ {k + 1} - \tau_ {k})}
$$
$$
\boxed {t = \frac {\left(s _ {k + 1} - s _ {k}\right) \left(- \tau_ {k} + \sqrt {\tau_ {k} ^ {2} + \frac {2 \left(\tau_ {k + 1} - \tau_ {k}\right) \left(- \ln \frac {(1 - u)}{T \left(s _ {k}\right)}\right)}{\left(s _ {k + 1} - s _ {k}\right)}}\right)}{\left(\tau_ {k + 1} - \tau_ {k}\right)}.} \tag {23}
$$
A.4 Piecewise Quadratic and Higher Order Polynomials
Now, we first consider the full derivation for volume rendering equation under the assumption that opacity is piecewise quadratic and color is piecewise constant. Consider opacities  $\tau_{1},\ldots ,\tau_{n}$  queried at  $n$  samples  $s_1,\dots ,s_n$  along the ray. Here, we set  $s_0 = t_n$  and  $s_{n + 1} = t_f$  to the near and far plane, with  $\tau_0 = 0$  and  $\tau_{n + 1} = 10^{10}$  denoting empty and opaque space.
To interpolate opacity, because a quadratic function can only be uniquely defined with 3 points, we choose  $\tau(s)$  to be quadratic within each interval  $[s_j, s_{j+2}]$  for even values of  $j$ . To encapsulate all points, this forces  $n$  to be odd, e.g. using 127 coarse samples and 64 fine samples.
A.4.1 Derivation: Computing  $T(s)$
In the same way as Sec. A.3.3, we can derive transmittance, which is in closed-form. The only modification is that the formulae for integrals of opacity are different over left and right subintervals  $[s_j, s_{j+1}]$  and  $[s_{j+1}, s_{j+2}]$ , with  $j$  even (see the next section for a derivation of these integrals):
$$
T \left(s _ {2 i}\right) = \exp \left(- \int_ {s _ {0}} ^ {s _ {2 i}} \tau (u) \mathrm {d} u\right) = \prod_ {j = 1} ^ {i} \exp \left(- \int_ {s _ {2 j - 1}} ^ {s _ {2 j}} \tau (u) \mathrm {d} u\right) \exp \left(- \int_ {s _ {2 j}} ^ {s _ {2 j + 1}} \tau (u) \mathrm {d} u\right). \tag {24}
$$
Substituting the expressions in Eqs. 28 and 29 gives a closed form expression in terms of the  $s_j$ 's and  $\tau_j$ 's. We can similarly compute
$$
T \left(s _ {2 i + 1}\right) = \exp \left(- \int_ {s _ {2 i}} ^ {s _ {2 i + 1}} \tau (u) \mathrm {d} u\right) \prod_ {j = 1} ^ {i} \exp \left(- \int_ {s _ {2 j - 1}} ^ {s _ {2 j}} \tau (u) \mathrm {d} u\right) \exp \left(- \int_ {s _ {2 j}} ^ {s _ {2 j + 1}} \tau (u) \mathrm {d} u\right). \tag {25}
$$
Then the probability of the  $i$ th interval for each  $0 \leq i \leq n$  is, as before,
$$
P _ {i} = T \left(s _ {i}\right) - T \left(s _ {i + 1}\right). \tag {26}
$$
This leads to a closed-form expression for  $P_{i}$ . This means the behavior of  $P_{i}$  depends entirely on that of the opacity integral. However, due to the form of  $\int \tau(s) ds$  detailed in the next section, this means  $P_{i}$  involves a piecewise exponential of a rational function in  $\tau_{j}$ 's and  $s_{j}$ 's, which leads to poor numerical conditioning and thus optimization instability.
A.4.2 Derivation: Computing and Integrating  $\tau(s)$  on Intervals
We now compute  $\tau(s)$  and its integral on each interval. Fix the interval  $[s_j, s_{j+2}]$ , with  $j$  odd, and  $\tau_j = \tau(s_j)$ ,  $\tau_{j+1} = \tau(s_{j+1})$ ,  $\tau_{j+2} = \tau(s_{j+2})$ . By Lagrange interpolation, the quadratic  $\tau(s)$  passing through  $(s_j, \tau_j)$ ,  $(s_{j+1}, \tau_{j+1})$ ,  $(s_{j+2}, \tau_{j+2})$  is given by:
$$
\tau (s) = \frac {\tau_ {j}}{\alpha_ {j} \gamma_ {j}} (s - s _ {j + 1}) (s - s _ {j + 2}) - \frac {\tau_ {j + 1}}{\alpha_ {j} \beta_ {j}} (s - s _ {j}) (s - s _ {j + 2}) + \frac {\tau_ {j + 2}}{\beta_ {j} \gamma_ {j}} (s - s _ {j}) (s - s _ {j + 1}), \tag {27}
$$