Presentation is loading. Please wait.

Presentation is loading. Please wait.

02/25/05© 2005 University of Wisconsin Last Time Meshing Volume Scattering Radiometry (Adsorption and Emission)

Similar presentations


Presentation on theme: "02/25/05© 2005 University of Wisconsin Last Time Meshing Volume Scattering Radiometry (Adsorption and Emission)"— Presentation transcript:

1 02/25/05© 2005 University of Wisconsin Last Time Meshing Volume Scattering Radiometry (Adsorption and Emission)

2 02/25/05© 2005 University of Wisconsin Today Participating Media –Scattering theory –Integrating Participating Media

3 02/25/05© 2005 University of Wisconsin Scattering Particles in the media act as little reflectors –They are too small to see, but they influence the light passing through Scattering has two effects –Out-scattering: light along a line is scattered in a different direction –In-scattering: light from some other direction is scattered into the direction of interest Out-scattering decreases radiance, in-scattering increases it

4 02/25/05© 2005 University of Wisconsin Scattering is Visually Important

5 02/25/05© 2005 University of Wisconsin Out-Scattering Math There is an out-scattering co-efficient  s (p,  ) –The probability density that light is scattered per unit distance –Just like absorption coefficient, but it’s not being converted, it’s being redirected Define attenuation coefficient:  t =  a +  s Define transmittance, T r, between two points:

6 02/25/05© 2005 University of Wisconsin Transmittance Properties Transmittance from a point to itself is 1 Transmittance multiplies along a ray –In a voxel-based volume, we can compute transmittance through each voxel and multiply to get total through volume

7 02/25/05© 2005 University of Wisconsin Optical Thickness Define optical thickness,  : If the medium is homogeneous,  t does not depend on p –Integration is easy and we get Beer’s law

8 02/25/05© 2005 University of Wisconsin Phase Function We need a function that tells us what directions light gets scattered in –The participating media equivalent of the BRDF The phase function, p(  ’), gives the distribution of outgoing directions,  ’, for an incoming direction,  –A probability distribution, so it must be normalized over the hemisphere:

9 02/25/05© 2005 University of Wisconsin In-Scattering The phase function tells us where light gets scattered To find out how much light gets scattered into a direction, integrate over all the directions it could be scattered from Incoming radiance Proportion scattered into direction  Proportion scattered

10 02/25/05© 2005 University of Wisconsin Source Term Given the emission radiance and the phase function, we can define a source term, S –The total amount of radiance added per unit length –Note the resemblance to the surface scattering equation

11 02/25/05© 2005 University of Wisconsin Isotropic vs. Anisotropic Media A medium is isotropic if the phase function depends only on the angle between the directions,  –Write p(cos  ) Most natural materials are like this, except crystal structures Phase functions are also reciprocal: p(  ’)=p(  ’  )

12 02/25/05© 2005 University of Wisconsin Isotropic vs. Anisotropic Phase Functions A phase function is isotropic if it scatters equally in all directions: p isotropic (  ’)=const There is only one possible isotropic phase function –Why? What is the additional constraint on phase functions? Homogeneous/inhomogeneous refers to spatial variation, isotropic/anisotropic refers to directional variation

13 02/25/05© 2005 University of Wisconsin Physically-Based Phase Functions Two common physically-based formulas Air molecules are modeled by Rayleigh scattering –Optical extinction coefficient varies with -4 –What phenomena does this explain? Scattering due to larger particles (dust, water droplets) is modeled with Mie scattering –Scattering depends less on wavelength, so what color is haze? Turbidity is a useful measurement: T=(t m +t h )/t m –t m is vertical optical thickness of molecular atmosphere –t h is vertical optical thickness of haze atmosphere

14 02/25/05© 2005 University of Wisconsin Henyey-Greenstein Function Single parameter, g, controls relative proportion of forward/backward scattering: g  (0,1)

15 02/25/05© 2005 University of Wisconsin Alternatives Linear combination of Henyey-Greenstein –Weights must sum to 1 to keep normalized Schlick Approximation –Avoid 3/2 power computation –k roughly 1.55g-.55g 3

16 02/25/05© 2005 University of Wisconsin Sampling Henyey-Greenstein Because of the isotropic medium assumption, the distribution is separable into one for  and one for  Given  1 and  2 : Given an incoming direction, use these to generate a scattered direction

17 02/25/05© 2005 University of Wisconsin PBRT Volume Models PBRT volumes must give –Extent (3D shape to intersect) –Functions to return scattering parameters –Function to return phase function at a point –Function to compute optical thickness between two points Simplest is homogeneous volume –Everything is constant, and optical thickness comes from Beer’s law

18 02/25/05© 2005 University of Wisconsin Homogeneous Medium

19 02/25/05© 2005 University of Wisconsin Homogeneous with Varying Density Assume that the same medium is present, but that the density varies All parameters are scaled by density –Except optical thickness, which may be hard to compute Options: –3D Grids – give sampled density on grid and interpolate –Exponential density from some ground plane: –Aggregates of volumes

20 02/25/05© 2005 University of Wisconsin Exponential Height Fog

21 02/25/05© 2005 University of Wisconsin Computing Optical Thickness Recall: Obviously we can use: The best way to get the T (j) is to use stratified sampling with a fixed offset –The offset is different for each query, but fixed among the T (j) t0t0 t1t1 u T(5)T(5)

22 02/25/05© 2005 University of Wisconsin Equation of Transfer Radiance arriving is radiance leaving a surface that is attenuated plus radiance that gets in-scattered and emitted on the way from the surface –The transmittance describes the out-scattering and adsorption –The source term describes the emission and in-scattering

23 02/25/05© 2005 University of Wisconsin Solving Transfer Equation The hard part is the integral –Transmittance is simple – it depends only on optical thickness, which we just saw how to compute –Implementation increases step for transfer that is NOT to the camera Several possible assumptions in the integral –Emission only – simple because radiance from other directions is not required –Single-scattering only – simple because only radiance from light sources is considered –Multiple – hard because you have to account for radiance from all directions, including other scattering events, so it blows up

24 02/25/05© 2005 University of Wisconsin Emission Only Choose points through the volume to evaluate emission Attenuate via transmittance Sum over points in Monte Carlo: –Point are chosen using uniform offset stratified sampling (a few slides back) within the part of the ray that the volume occupies –The transmittance can be computed cumulatively as we step along the ray

25 02/25/05© 2005 University of Wisconsin Segment of Interest Viewer could be inside Visible surface could be inside Could pass right through

26 02/25/05© 2005 University of Wisconsin Cumulative Transmittance

27 02/25/05© 2005 University of Wisconsin Emission Example

28 02/25/05© 2005 University of Wisconsin Single Scattering Evaluates Very similar to previous slide, except: –At each point, sample light sources and push through phase function to get and estimate of the inner integral –Have to account for transmittance between light and sample point –Actually, only sample one light for each sample point along the ray

29 02/25/05© 2005 University of Wisconsin Single Scattering Example

30 02/25/05© 2005 University of Wisconsin Multiple Scattering Can do it like path sampling –At each point along ray, sample multiple outgoing directions –For each sampled direction, find first hit surface Add in outgoing radiance from that surface – itself expensive to compute –For ray to first hit surface, recursively apply the algorithm Account for scattering within the volume into this dircection Very computationally inefficient Speedups: Bi-Directional, Volumetric Photon Mapping

31 02/25/05© 2005 University of Wisconsin Next Time Sky models Sub-surface scattering


Download ppt "02/25/05© 2005 University of Wisconsin Last Time Meshing Volume Scattering Radiometry (Adsorption and Emission)"

Similar presentations


Ads by Google