hhergeth / CudaTracerLib

A library for ray tracing based rendering algorithms using CUDA
GNU General Public License v3.0
50 stars 9 forks source link

Analytic VolumeGrid transmittance #3

Closed hhergeth closed 8 years ago

hhergeth commented 8 years ago

Currently VolumeGrid::tau uses a point based interpolation estimation for computing the transmittance and sampling distances. This can be improved to a full analytic solution based on trilinear interpolation.

hhergeth commented 8 years ago

Not worth the effort. Too small of a difference and computationally a high cost.

Use the following to derive expressions for the integral: l[x, q, p] = q + (p - q)*x bi[x, y, a, b, c, d] = l[y, l[x, a, b], l[x, c, d]] tr[x, y, z] = l[z, bi[x, y, a, b, c, d], bi[x, y, e, f, g, h]] p[t_] = tr[ox + t * dx, oy + t * dy, oz + t * dz] Integrate[p[t], {t, 0, T}]