02941 physically based rendering
play

02941 Physically Based Rendering Volume Rendering Jeppe Revall - PowerPoint PPT Presentation

02941 Physically Based Rendering Volume Rendering Jeppe Revall Frisvad June 2020 What happens in a volume? Some light is absorbed. Some light scatters away (out-scattering). Some light scatters back into the line of sight


  1. 02941 Physically Based Rendering Volume Rendering Jeppe Revall Frisvad June 2020

  2. What happens in a volume? ◮ Some light is absorbed. ◮ Some light scatters away (out-scattering). ◮ Some light scatters back into the line of sight (in-scattering). (absorption + out-scattering = extinction) ◮ Historical origins: Bouguer [1729, 1760] A measure of light. Exponential extinction. Lambert [1760] Cosine law of perfectly diffuse reflection and emission. Lommel [1887] Testing Lambert’s cosine law for scattering volumes. Describing isotropic in-scattering mathematically. Chwolson [1889] A theory for subsurface light diffusion (similar to Lommel’s). Schuster [1905] Scattering in foggy atmospheres (plane-parallel media). Reinventing the theory in astrophysics. King [1913] General equation which includes anisotropic scattering (phase function). Chandrasekhar [1950] The first definitive text on radiative transfer.

  3. How to describe scattering? ◮ We follow a ray of light passing through a scattering medium. ◮ The parameters describing the medium are σ a the absorption coefficient [m − 1 ] σ s the scattering coefficient [m − 1 ] σ t the extinction coefficient [m − 1 ] ( σ t = σ a + σ s ) p the phase function [sr − 1 ] ε the emission properties [Wsr − 1 m − 3 ] (radiance per meter). ◮ The radiative transfer equation (RTE) ( � ω · ∇ ) L ( x , � ω ) = − σ t ( x ) L ( x , � ω ) � ω ′ , � ω ′ ) d ω ′ + σ s ( x ) p ( x , � ω ) L ( x , � 4 π + ε ( x , � ω ) , where L is radiance at the position x along the ray in the direction � ω and ε is emission.

  4. The direct transmission term ◮ ( � ω · ∇ ) L ( x , � ω ) is the directional derivative along the ray. ◮ Absorption: − σ a ( x ) L ( x , � ω ). ◮ Out-scattering: − σ s ( x ) L ( x , � ω ). ◮ Extinction: ( − σ a ( x ) − σ s ( x )) L ( x , � ω ) = − σ t ( x ) L ( x , � ω ). ◮ This is Bouguer’s law of exponential attenuation. ◮ The radiative transfer equation (RTE) ( � ω · ∇ ) L ( x , � ω ) = − σ t ( x ) L ( x , � ω ) � ω ′ , � ω ′ ) d ω ′ + σ s ( x ) p ( x , � ω ) L ( x , � 4 π + ε ( x , � ω ) , where L is radiance at the position x along the ray in the direction � ω and ε is emission.

  5. The diffusion term ◮ ( � ω · ∇ ) L ( x , � ω ) is the directional derivative along the ray. ω ′ to the ray direction � ◮ In-scattering is from all directions � ω . ω ′ is weighted by the phase function p . ◮ In-scattering from � ◮ In-scattering in total is weighted by the scattering coefficient σ s . ◮ The radiative transfer equation (RTE) ( � ω · ∇ ) L ( x , � ω ) = − σ t ( x ) L ( x , � ω ) � ω ′ , � ω ′ ) d ω ′ + σ s ( x ) p ( x , � ω ) L ( x , � 4 π + ε ( x , � ω ) , where L is radiance at the position x along the ray in the direction � ω and ε is emission.

  6. The emission term ◮ Emission has not been investigated much in graphics. ◮ Volumes are typically non-emitters ( ε = 0). Sources are usually modelled by diffusely emitting surfaces. ◮ It may be computed using Planck’s spectrum for blackbody emission [Planck 1900, Wilkie and Weidlich 2011]. ◮ The radiative transfer equation (RTE) ( � ω · ∇ ) L ( x , � ω ) = − σ t ( x ) L ( x , � ω ) � ω ′ , � ω ′ ) d ω ′ + σ s ( x ) p ( x , � ω ) L ( x , � 4 π + ε ( x , � ω ) , where L is radiance at the position x along the ray in the direction � ω and ε is emission.

  7. Rendering volumes ◮ The general method: path tracing (Monte Carlo integration). radiance is traced along the rays light source scattering material observer scattering event emerging light ◮ The integral form of the radiative transfer equation (for a non-emitter): � s � ω ′ ) d ω ′ d s ′ , T r ( s ′ , s ) σ s ( s ′ ) p ( s ′ , � ω ′ , � ω ) L ( s ′ , � L ( s ) = T r (0 , s ) L (0) + 0 4 π where T r is the beam transmittance and s is the distance travelled along a ray with direction � ω and origin o on the surface of the volume such that x = o + s � ω is a point along the ray inside the volume.

  8. Direct transmission ◮ Direct transmission is the first term of the RTE: L transmission ( s ) = T r (0 , s ) L (0) . ◮ Beam transmittance: T r ( s ′ , s ) = e − τ ( s ′ , s ) . � s ◮ Optical thickness: τ ( s ′ , s ) = s ′ σ t ( t ) d t . ◮ Ray points: s ′ = 0 point of incidence. s ′ = s point inside or point of emergence. ◮ For homogeneous materials: T r ( s ′ , s ) = e − σ t ( s − s ′ ) . ◮ Then L transmission ( s ) = e − σ t s L (0) , where σ t is the extinction coefficient, s is the distance to the surface, and L (0) is the radiance refracted into the medium at the point of incidence.

  9. Diffusion (in-scattering) ◮ Diffusion is the second term of the RTE: � s T r ( s ′ , s ) σ s ( s ′ ) J ( s ′ ) d s ′ , L diffusion ( s ) = 0 where J is the source function: � ω ′ ) d ω ′ . J ( s ′ ) = p ( s ′ , � ω ′ , � ω ) L ( s ′ , � 4 π ◮ Monte Carlo estimator for the diffusion term: N T r ( s ′ j , s ) σ s ( s ′ j ) J ( s ′ j ) L diffusion , N = 1 � . pdf( s ′ N j ) j =1 ◮ We know how to sample an exponential function (Week 4) j = − ln( ξ j ) j , s ) = σ t e − σ t ( s − s ′ j ) pdf( s ′ j ) = σ t ( s ′ j ) T r ( s ′ , s − s ′ . σ t

  10. Distance to next scattering event ◮ Monte Carlo estimator for the diffusion term: N T r ( s ′ j , s ) σ s ( s ′ j ) J ( s ′ j ) L diffusion , N = 1 � . pdf( s ′ j ) N j =1 ◮ We know how to sample an exponential function (Week 4) j = − ln( ξ j ) j , s ) = σ t e − σ t ( s − s ′ j ) pdf( s ′ j ) = σ t ( s ′ j ) T r ( s ′ s − s ′ , . σ t ◮ We are interested in the radiance L ( s ). Then d j = s − s ′ j is the sampled distance to the next scattering event. ◮ If d j is greater than the distance to the surface s , the next scattering event is refraction through the surface. ◮ This refraction accounts for the direct transmission term (since it corresponds to a Russian roulette using T r to decide if the next event is scattering or direct transmission).

  11. The scattering albedo ◮ Monte Carlo estimator for the diffusion term: N T r ( s ′ j , s ) σ s ( s ′ j ) J ( s ′ j ) L diffusion , N = 1 � . pdf( s ′ j ) N j =1 ◮ Inserting the pdf, we have N σ s ( s ′ j ) L diffusion , N = 1 � j ) J ( s ′ j ) . σ t ( s ′ N j =1 ◮ The scattering albedo: α = σ s /σ t . ◮ Using Russian roulette with the scattering albedo: � N 1 � j =1 J ( s ′ j ) for ξ < α L diffusion , N = N 0 otherwise

  12. The source function ◮ The source function is in-scattering from all directions: � ω ′ ) d ω ′ . J ( s ′ ) = p ( s ′ , � ω ′ , � ω ) L ( s ′ , � 4 π ◮ Monte Carlo estimator for the source function: M J N = 1 p ( s ′ , � ω ′ k , � ω ) L ( s ′ , � ω ′ k ) � . pdf( � ω ′ k ) M k =1 ◮ Importance sampling: Use a pdf similar to the phase function. 1 ◮ For isotropic media: p = 4 π . Sample the unit sphere uniformly. ω ′ · � ◮ Anisotropic media with rotationally invariant scattering ( p ( � ω ′ , � ω ) = p ( � ω )) are described by the asymmetry parameter: � ω ) d ω ′ , ω ′ · � ω ′ · � g = p ( � ω )( � 4 π which is the mean cosine of the scattering angle.

  13. The Henyey-Greenstein phase function ◮ Henyey and Greenstein [1940] suggested a phase function based on the asymmetry parameter g : 1 − g 2 ω = cos θ ) = 1 ω ′ · � p ( � (1 + g 2 − 2 g cos θ ) 3 / 2 . 4 π ◮ The HG phase function follows the properties of g g = − 1 total backscattering g = 0 isotropic scattering g = 1 total forward scattering. ◮ It is also a spherical harmonics expansion of the phase function with coefficients c n = g n . ◮ There is a simple way to importance sample it [Hanrahan and Krueger 1992, Pharr and Humphreys 2004; 2010; 2017] :  � � 2 � � 1 − g 2 1 + g 2 − 1 for g � = 0  2 g 1 − g +2 g ξ k cos θ k = . 2 ξ k − 1 for g = 0 

  14. Path tracing volumes ◮ In path tracing, we usually take only one sample for each estimator per frame (N = M = 1). ◮ When a ray hits a scattering material, do the following ( j is iteration number). 1. If the ray hit from outside, do a standard volume transmission and stop. If the ray hit from the inside, proceed. 2. Sample the distance d 1 = − ln( ξ 1 ) /σ t to the next scattering event. If the scattering event is outside the volume ( d 1 > s ), do a transparent object transmission and stop. Otherwise, proceed. 3. Do a Russian roulette with the scattering albedo. If ξ 2 j > α , the ray is absorbed. Otherwise, proceed. 4. Sample the distance to the next scattering event d 2 = − ln( ξ 2 j +1 ) /σ t . 5. Create a scatter ray and set its maximum trace distance ( t max ) to d 2 . 6. Trace the scatter ray from the origin o 2 = o 1 + d 1 � ω 1 in a direction � ω 2 obtained by sampling the phase function. If it does not hit something, copy d 2 to d 1 , let the scatter ray overwrite the old ray, and proceed to step 3. Otherwise, do a transparent object transmission and stop. ◮ This procedure only works for monochromatic rays.

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend