240 likes | 347 Views
Propagating the VLF – Problems and Solutions I. Pankaj Khanna p.khanna@cs.ucl.ac.uk. Introduction. Current state of the VLF Area Emitters only Specular and Diffuse planar polygons Energy conserving (all equations balance) Does all L(S|D)* paths No diffuse texture maps Easy to add though.
E N D
Propagating the VLF – Problems and Solutions I Pankaj Khanna p.khanna@cs.ucl.ac.uk
Introduction • Current state of the VLF • Area Emitters only • Specular and Diffuse planar polygons • Energy conserving (all equations balance) • Does all L(S|D)* paths • No diffuse texture maps • Easy to add though
Implementing the VLF • Murphy’s Laws: • Nature always sides with the hidden flaw • The hidden flaw never stays hidden for long. • Murphy’s Law of thermodynamics: Things get worse under pressure. • If anything can go wrong, it will. • Every solution breeds new problems. • If anything simply cannot go wrong, it will anyway. • If everything seems to be going well, you have obviously overlooked something
Outline of this section • Discretisation artefacts • Discretisation of directions • Accounting for variance • Propagating with discretised directions • Discretisation of surfaces • Visibility issues • Diffuse transfer of radiance • Validity of transfer • Mechanism of transfer • Continued in Section II by Insu
Discretisation of directions • What constitutes an “ideal” discretisation? • Unfortunately an ideal discretisation does not exist • Recursive subdivision of tetrahedron produces variance in solid-angle size and shape • Results in non-uniform distribution • Aliasing and sampling problems
Using discrete directions • Discrete directions have different significance depending on the nature of transport being performed • Radiance to/from Diffuse surface • A single direction (PSF) actually corresponds to the set of directions contained in that direction’s solid-angle • Radiance to Specular surfaces • A specular surface has direction-dependent propagation and viewing attributes and can not be generalised over the solid angle • Has error proportional to the number of discretised directions • SpecularDiffuse transfer can however be taken to be over the solid-angle
Normalising solid-angle area variance • Radiance sent along a PSF direction should be proportional to the area of the solid-angle associated to that discretised direction • Normalise energy transfer per PSF direction by factor based on corresponding solid-angle • For Level 5, 2049 directions, SAMIN=0.0016, SAMAX=0.005 • Energy conservation still required • Normalisation= SAPSF/(SAPSF) Without normalisation Please note that illustrative images here and henceforth may have several inaccuracies as they were taken at various stages of the development of the VLF Normalised
“Holes” due to discretised directions • Energy is only propagated along discretised directions (PSFs) • Error multiplies on successive iterations
“Holes” • Problem is more severe with fewer directions and smaller emitters 513 directions 2049 directions Iteration 1 Iteration 2
Filling the holes • Discretised directions actually represent solid-angles for diffuse surfaces • Need to sample the solid angles during radiance transfer • How to sample? • How do we combine the samples? • Where do we put the sampled results?
Filling holes with a jittered transfer • Send energy along original and a few additional sampled directions within the solid-angle • Random or stratified sampling • Select samples over the solid-angle and rotate all directions by the corresponding angle to obtain a jittered set of discretised directions • Use largest solid-angle & assume symmetry
Jittered transfer • Jittered transfer is only used for transfer to diffuse surfaces • Specular surfaces receive radiance only during Jitter 0 • Combining samples from jittered transfer • Use a Gaussian Kernel • Small to prevent blurring out of details • Need to manage filtering at edges of map • Needs to be energy conserving • Results of transfer stored in Diffuse Maps as described earlier • More details later…
Constant time direction-lookup artefacts • Lookup involves referring to an OpenGL rasterised image • Map needs to be of sufficiently high resolution to avoid aliasing 512x512 1024x1024 2048x2048
Discretisation and the constant • IrradianceRadiance conversion requires division by • Discretisation of directions & points into patch areas lead • is replaced by a constant obtained by summing projected area of a cell along all PSF directions • Level 3, 129 directions, discretised ‘’= 0.8291 • Level 4, 513 directions, discretised ‘’= 5.2369 • Level 5, 2049 directions, discretised ‘’= 20.9565
Visibility • Visibility in tiles is at low resolution – need more detail for radiance transfer • Analytical computation • OpenGL visibility (Pbuffers) • Super-sampled exchange (visibility) buffers No super-sampling Super-sampled visibility
Visibility for jittered transfer • Visibility (face-lists) stored in tiles is no longer valid • Produces incorrect list of polygons to rasterise for visibility exchange buffer • More severe with fewer directions • 3 possible options • Recomputing visibility by OpenGL rasterisation is expensive but also most accurate Visibility from Original PSF Visibility from Nearest PSF Recomputed Visibility (OpenGL)
Transfer to Diffuse surfaces • Transfer of irradiance between 2 diffuse surfaces can be described by: • (CosACosB)/r2 • In words this is: • (CosACosB) : product of projected areas • : total projected area of source cell • r2 : term expressing angular spread with distance
Validity of diffuse transfer in the VLF • All parts of the previous equation are represented in the radiant transfer between two diffuse surfaces • Actual projected areas are used in determining mapping of radiance • A constant equivalent to “” is obtained and used for the given discretisation • The r2-term that represents the spread of the propagating solid-angle with distance is explicitly represented in the VLF approach of propagation along discretised directions
Transfer along a PSF Tile • Transfer of radiance from a sender to a receiver takes place in the PSF direction via a temporary radiance tile • All senders push radiance into the temp tile • Temp tile pushes radiance into receiver
Mapping radiance • Radiance maps need to be sampled for each Tile-cell (per PSF) • The mapping is not one-to-one
Radiance sampling strategies • Point-sampling • Sampling by determining cell overlaps • DiscreteContinuousResampleDiscrete • Uses (slow) Liang-Barsky clipping • Currently the main bottleneck but high accuracy Point-sampled Area-overlap
Jittered diffuse transfer (an overview) for (each Jitter) { if (Jitter>0) jitter the VLF for (each PSF, Tile) { if (Jitter>0) compute polygons in this tile for (each diffuse receiver R) { compute visibility exchange buffer for R for (each sender S) { Map radiance (URM) from sender S to temp radiance tile } // S Map temp radiance tile onto receiver’s DMN } // R } // PSF, Tile } // Jitter divide radiance in DMNs by NumJitters to normalise transfer apply gaussian filter to diffuse DMNs and add to DMT