Presentation is loading. Please wait.

Presentation is loading. Please wait.

Optical Models Jian Huang, CS 594, Spring 2002 This set of slides are modified from slides used by Prof. Torsten Moeller, at Simon Fraser University, BC,

Similar presentations


Presentation on theme: "Optical Models Jian Huang, CS 594, Spring 2002 This set of slides are modified from slides used by Prof. Torsten Moeller, at Simon Fraser University, BC,"— Presentation transcript:

1 Optical Models Jian Huang, CS 594, Spring 2002 This set of slides are modified from slides used by Prof. Torsten Moeller, at Simon Fraser University, BC, Canada.

2 Optical Models Nelson Max, “Optical Models”, IEEE Transactions on Visualization and Computer Graphics, Vol. 1, No. 2, 1995. Jim Blinn’s 1982 SIGGRAPH paper on scattering. The mathematical framework for light transport in volume rendering.

3 Transport of Light Determination of Intensity Local - Diffuse and Specular Global - Radiosity, Ray Tracing, Ultimate Physcial Mechanisms in Ultimate Model –Emittance (+) –Absorption (-) –Scattering (+) (single vs. multiple)

4 Transport of Light Typically based on - S. Chandrasekhar “Radiative Transfer”, Oxford Universtiy Press 1950 Mathematically challenging Approximate models required - Blinn et al to the rescue Over Operator - only emission and absorption

5 Max - 1995 Several cases: –Completely opaque or transparent voxels –Variable opacity correction –Self-emitting glow –Self-emitting glow with opacity along viewing ray –Single scattering of external illumination –Multiple scattering

6 Blinn - Assumptions Assumptions: –N - surface normal –E - eye vector –L - light vector –T - surface thickness –e - angle btw. E and N –a - angle btw. E and L aka phase angle –I - angle btw. N and L

7 Blinn - Assumptions Assumptions (contd.): –particles are little spheres with radius p –n - number density (number of particles per unit volume) –  - cosine of angle e, i.e. N.E –D - proportional volume of the cloud occupied by particles

8 Blinn – transparency (1) Expected particles in a volume will be nV Probability that there are no particles in the way can be modeled as a Poisson process: Hence the probability that the light is making it through those tubes is: Cylinders must be empty

9 Blinn – transparency (2) Transparency through the cloud:  is called the optical depth E -E T

10 Max - absorption only I(s) = intensity at distance s along a ray  (s) = extinction coefficient T(s) = transparency between 0 and s

11 Max - absorption only Linear variation of 

12 Max - absorption only On the opacity  assuming  to be constant in the interval

13 Max - cloud model Using fractal structure (Perlin)

14 Max - self-emitting glow Without extinction:

15 Max - self-emitting glow Without extinction:

16 Max - self-emitting glow With extinction:

17 The continuous form: In general case, can not compute analytically Volume Ray Integral (1)

18 Volume Ray Integration (2) Practical Computation Method: »note:  x can be  x i (different everywhere) –which leads to the familiar BTF or FTB compositing …

19 g(s) g(s) could be: –Self-emitting particle glow –Reflected color, obtained via illumination The color is usually the sum of emitted color E and reflected color R

20 Max - self-emitting glow Identical glowing spherical particles: projected area a =  r 2 surface glow color = C number per unit volume = N extinction coefficient  = a N added glow intensity per unit length g = C a N = C 

21 Max - self-emitting glow Special Case g=C  : (and C constant) This is compositing color C on top of background I 0

22 Max - self-emitting glow For I 0 =0 and  : varying according to f:

23 Volume Ray Integration Equation Self-emitting glow, none constant color

24 Max - reflection i(x) = illumination reaching point x  = unit reflection direction vector  ’ = unit illumination direction vector r(x, ,  ’): BRDF – for conventional surface shading effects

25 Max - reflection For particle densities: –w(x) = albedo Blinn: assuming that the primary effect is from interaction of light with one single particle albedo - proportion of light reflected from a particle: in the range of 0..1 –p( ,  ’) = phase function still unrealistic external reflection of outside illumination

26 Blinn - Phase Function “how” we see the particles depends on the angle of eye E and light vector L smooth drop off …

27 Blinn - Phase Function Many different models possible Constant function –size of particles much less then wavelength of the light Anisotropic –more light forward then backward - essentially our diffuse shading Lambert surfaces –spheres reflect according to Lamberts law –physically based

28 Blinn - Phase Function Rayleigh Scattering –diffraction effects dominate Henyey-Greenstein –general model with good fit to empirical data Empirical Measurments –tabulated phase function sums of functions –weighted sum of functions - model different effects in parallel

29 Max - shadows Should account for transparency of volume between light source and point x: those are the “shadow feelers” e.g. Kajiya’s two pass algorithm

30 Max - shadows

31 Max - multiple scattering I(x,  ): intensity at position x in direction  g(x,  ): source term (glow at x in direction  )

32 Max - multiple scattering use radiosity ideas for the solution simplified model - scattering is isotropic i.e. g(x,  ) does not depend on  : then we can compute the total contribution of all voxels to the iso-tropic scattering: where F ij are the “form factors” and a i are the albedo coefficients do a first pass like Kayija and collect external illumination in E(x i )

33 Max - multiple scattering Results in big equation system we still need to solve the form factors use an iterative solution method as in progressive radiosity

34 Max - multiple scattering Different approach: Monte Carlo Method Trace a large representative selection of rays from light sources and absorb them, with probability proportional to , or scatter them, with probability proportional to r. Build up the distribution of light flux flowing through each voxel (in each direction).

35 Max - multiple scattering In a view dependent rendering pass, do a final single scatter of this light distribution towards the eye:

36 Max - multiple scattering albedo = 0.99 15 iterations were needed cloud on a 24x24x18 volume each iteration took 15 minutes final 512x384 rendering took 5 minutes

37 Volumetric Ray Integration color opacity object (color, opacity) 1.0

38 Ray-casting - revisited color c = c s  s (1 -  ) + c opacity  =  s (1 -  ) +  1.0 object (color, opacity) volumetric compositing Interpolation kernel

39 Volume Rendering Pipeline (Levoy’88) Acquired values Data Preparation Prepared values classificationshading Voxel colors Ray-tracing / resampling Sample colors compositing Voxel opacities Sample opacities Image Pixels Which one?

40 Volume Rendering Pipeline (Wittenbrink et. al. 98) FTB color: BTF color: Opacity: The colors that are composited must be pre- weighted with opacity, i.e. associate color: –C’ =  C


Download ppt "Optical Models Jian Huang, CS 594, Spring 2002 This set of slides are modified from slides used by Prof. Torsten Moeller, at Simon Fraser University, BC,"

Similar presentations


Ads by Google