Free Path Sampling in High Resolution Inhomogeneous Participating Media
Budapest University of Technology and Economics, Hungary
Szirmay-Kalos LászlóMagdics MilánTóth Balázs
Problem statement• GI rendering in participating media:
– Free path between scattering points– Absorption or scattering– Scattering direction
Free Path Sampling
))(exp(1)(
d)()(0
ssPr
ttss
Optical depth
CDF of free path))(exp(1 s
r s
Sampling equation
Homogeneous case is simple
)1log( r
s
)exp(1)(
)(
ssPr
ss
sr)exp(1 s
Ray marching
• Complexity grows with the resolution• Independent of the density variation• Slow in high resolution low density media
)exp(1 si
i
Woodcock tracking
• Resolution independent• Complexity grows with the density variation • Slow in strongly inhomogeneous media
Accept with prob: (t)/max
)exp(1 maxs
Contribution of this paper• Sampling scheme for inhomogeneous media
– Generalization of Woodcock tracking and ray marching
– Involves them as two extreme cases– Offers new possibilities between them
• Application for high resolution voxel arrays• Application for procedurally generated media
of ”unlimited resolution”
High densityregion Low density
region
PhotonFreepath
Inhomogeneous media
Particle and itsscattering lobe
Spatial density variation Scattering lobe (albedo +Phase function) variation
Collision
In free path sampling onlydensity variation matters!
PhotonVirtualcollision
Realcollision
Virtual particle and itsscattering lobe
Mix virtual particles to modify the density but to keep the radiance
Probability of hitting a real particle:
(t)/((t)+virtual (t))=(t)/comb(t)
Sampling with virtual particles
• Find comb(t) = (t)+virtual(t)
– upper bounding function extinction comb(t),
– Analytic evaluation:
• Sample with comb(t)
• Real collision with probability (t)/comb(t)
s
tts0
comb d)()(
Challenges• For the volume density find an analytically
integrable sharp upperbound• Voxel arrays: constant or linear upper-bound
in super-voxels• Procedural definition: depends on the actual
procedure– We demonstrate it with Perlin noise
Procedural media (Perlin noise))1(S
)2(S
)3(S
)( pn
p
p
Upper bound: construction up to a limited scale
)1(max
)( ˆ)( kk Spn upper-bound
noise)(xn
p
original resolution
super-voxelresolution
)1(S
)2(S
)3(S
Line integration
super-voxels
original voxels
ray
min0 ss s
1s2s
3s
maxs
real depth
optical depth
),( 10 ss),( 21 ss
),( 32 ss
scattering point where )1log()( rs
ns
1ns
5123 voxel array, 32 million rays
Ray marching: 9 sec: Woodcock: 7 sec: New: 1.4 sec:
Million rays per second with respect to the super voxel resolution
Perlin noise clouds, 9 million rays
Scalability
Million rays per second
Videos
• 40963 effective resolution• 1283 super-voxel grid• 50 million photons/frame• 9 sec/frame
• 40963 effective resolution• 1283 super-voxel grid• 5 million photons/frame• 1 sec/frame
Conclusions• Handling of inhomogeneous media by mixing virtual
particles that– Simplify free path length sampling– Do not change the radiance
• Compromise between ray marching and Woodcock tracking– Much better than ray marching in high resolution media– Much better than Woodcock tracking in strongly
inhomogeneous media