Presentation is loading. Please wait.

Presentation is loading. Please wait.

Advanced Lighting and Shading

Similar presentations


Presentation on theme: "Advanced Lighting and Shading"— Presentation transcript:

1 Advanced Lighting and Shading
컴퓨터 그래픽스 Advanced Lighting and Shading

2 Radiometry and Photometry : Definition
컴퓨터 그래픽스 Radiometry and Photometry : Definition Radiometry Radiometry deal with the measurement of radiation throughout the electromagnetic spectrum This range includes the infrared(적외선), visible(가시선), and ultraviolet(자외선) regions of the electromagnetic spectrum wavelength from 1000 to 0.01 micrometer (=10-6 meter =10-3 millimeter) Photometry Photometry is like radiometry except that it weights everything by the sensitivity of the human eye deals with only the visible spectrum (=visible band) a wavelength range of about 380 to 780 nanometer (=10-9 meter) do not deal with the perception of color itself, but rather the perceived strength of various wavelengths

3 Radiometry and Photometry : Difference
컴퓨터 그래픽스 Radiometry and Photometry : Difference Conversion & difference The result of radiometric computations are converted to photometric units by multiplying by the CIE photometirc curve The conversion curve and the units of measurement are the only difference between the theory of photometry and the theory of radiometry (Figure 6.1)

4 Radiometry and Photometry : Radiometry (1/6)
컴퓨터 그래픽스 Radiometry and Photometry : Radiometry (1/6) Radiometry radiant energy(Q) basic unit of energy, measured joules(J) the number of photon per joule : radiant flux P or (= radiant power) of a light source the number of joules per second emitted (=watt(W))

5 Radiometry and Photometry : Radiometry (2/6)
컴퓨터 그래픽스 Radiometry and Photometry : Radiometry (2/6) radiant flux density After photons leave a light source, the next step is to measure how they arrive at a surface the radiant flux per unit area on a surface (=watts per square meter) irradiance E (= radiant flux density) when flux arrives at a surface radiant exitance M (= radiosity B) the amount of flux leaving a surface

6 Radiometry and Photometry : Radiometry (3/6)
컴퓨터 그래픽스 Radiometry and Photometry : Radiometry (3/6) Solid angle (Figure 6.2) the concept of a two-dimensional angle extended to three dimensions measured in steradians (sr) 4 steradians would cover the whole area of the unit sphere radiance L the most important radiometric unit for computer graphics radiance is what we store in a pixel The amount of radiant flux coming from that direction and hitting the surface at a given point

7 Radiometry and Photometry : Radiometry (4/6)
컴퓨터 그래픽스 Radiometry and Photometry : Radiometry (4/6) incoming radiance at a surface defined as the amount of power (watt) per unit area, per unit solid angle surface independent form of the radiance equation

8 Radiometry and Photometry : Radiometry (5/6)
컴퓨터 그래픽스 Radiometry and Photometry : Radiometry (5/6) radiance distribution The radiance in an environment can be thought of as a function of five {six} variables a location (three), direction (two) { + wavelength } an environment map of everything in the scene represents the incoming radiance for all directions Image based rendering lightfield, plenoptic function

9 Radiometry and Photometry : Radiometry (6/6)
컴퓨터 그래픽스 Radiometry and Photometry : Radiometry (6/6) An object's radiance value is not affected by distance a surface will have the same luminance regardless of its distance from viewer this seems in contradiction to the basic law that a light's intensity drops off with the square of the distance. only number of pixels that changes in relationship to the distance from the light radiance remains constant

10 Radiometry and Photometry : Photometry
컴퓨터 그래픽스 Radiometry and Photometry : Photometry Photometry luminous energy (talbots)  radiant energy (joules) lumen (lm)  the watt (W) (radiant flux의 측정단위) Illumination (the luminous flux density)  irradiance luminance  radiance candela (cd) a measure of luminous power per solid angle lux (lx) lumens(=luminous power) per square meter candelas per square meter (nit)

11 Colorimetry : Definition (1/2)
컴퓨터 그래픽스 Colorimetry : Definition (1/2) Colorimetry Light is perceived in the visible band from 380 to 780 nm distribution of wavelengths (light's spectrum) Human  distinguish 10 million different colors three different types of cone receptors in the retina Standard condition for measuring color (CIE) Figure 6.4

12 Colorimetry : Definition (2/2)
컴퓨터 그래픽스 Colorimetry : Definition (2/2)

13 Colorimetry : Color Model (1/12)
컴퓨터 그래픽스 Colorimetry : Color Model (1/12) Color Matching (Color Models) RGB Color Model (Figure 6.5) Primary colors: RED, GREEN, BLUE. Secondary colors: YELLOW = red + green, CYAN = green + blue, MAGENTA = blue + red. WHITE = red + green + blue. BLACK = no light. Disadv cannot directly represent all visible colors (negative weights)

14 Colorimetry : Color Model (2/12)
컴퓨터 그래픽스 Colorimetry : Color Model (2/12) Greyscale BLACK = 0% brightness, 100% grey. WHITE = 100% brightness, 0% grey. NTSC phosphors (older) Y=0.30R+0.59G+0.11B CRT and HDTV phosphors (modern) Y=0.2125R G B                                      

15 Colorimetry : Color Model (3/12)
컴퓨터 그래픽스 Colorimetry : Color Model (3/12) CIE XYZ Color Model (Figure 6.6)

16 Colorimetry : Color Model (4/12)
컴퓨터 그래픽스 Colorimetry : Color Model (4/12) chromaticity diagram curved line  color of the spectrum purple line  line connecting the ends of the spectrum white point  x=y=z=1/3 Saturation  The relative distance of the color point compared to the distance to the edge of the region Hue  the point on the region edge

17 Colorimetry : Color Model (5/12)
컴퓨터 그래픽스 Colorimetry : Color Model (5/12) gamut

18 Colorimetry : Color Model (6/12)
컴퓨터 그래픽스 Colorimetry : Color Model (6/12) Disadvantage the 2D diagram failed to give a uniformly-spaced visual representation of what is actually a three-dimensional color space

19 Colorimetry : Color Model (7/12)
컴퓨터 그래픽스 Colorimetry : Color Model (7/12) CIE LUV CIE LUV CIE LU’V’

20 Colorimetry : Color Model (8/12)
컴퓨터 그래픽스 Colorimetry : Color Model (8/12) CIE LAB retinal color stimuli are translated into distinctions between light and dark between red and green between blue and yellow. CIELAB indicates these values with three axes: L*, a*, and b*.

21 Colorimetry : Color Model (9/12)
컴퓨터 그래픽스 Colorimetry : Color Model (9/12) HSV (=HSB) Hue, Saturation, Value (=Brightness) HUE is the actual color. measured in angular degrees around the cone red = 0 or 360 (so yellow = 60, green = 120, etc.). SATURATION is the purity of the color measured in percent from the center of the cone (0) to the surface (100). At 0% saturation, hue is meaningless. BRIGHTNESS measured in percent from black (0) to white (100). At 0% brightness, both hue and saturation are meaningless.

22 Colorimetry : Color Model (10/12)
컴퓨터 그래픽스 Colorimetry : Color Model (10/12) HLS Hue, Lightness, Saturation is similar to the HSV cone but with the primary colors located at L = 0.5 and with the colors of black and white acting as ends of the cones.

23 Colorimetry : Color Model (11/12)
컴퓨터 그래픽스 Colorimetry : Color Model (11/12) CMYK Primary colors: CYAN, MAGENTA, and YELLOW. Secondary colors: BLUE = cyan + magenta, RED = magenta + yellow, GREEN = yellow + cyan. BLACK = cyan + magenta + yellow (in theory). BLACK (K) INK is used in addition to C,M,Y to produce solid black. WHITE = no color (on white paper, of course). Standard Color Printer

24 Colorimetry : Color Model (12/12)
컴퓨터 그래픽스 Colorimetry : Color Model (12/12) YIQ Used by US commercial color television broadcasting (Used by NTSC standard) Y: encodes luminance I, Q: encode color (chromaticity) For black and white TV, only the Y channel is used People are more sensitive to the illuminance difference We can use more bits (bandwidth) to encode Y and less bits to encode I and Q

25 BRDF Theory : Definition (1/2)
컴퓨터 그래픽스 BRDF Theory : Definition (1/2) BRDF Bidirectional Reflectance Distribution Function Describe how lights reflected from a surface (Material properties) Input incoming and outgoing azimuth and elevation angles, wavelength of incoming light (Hue and saturation remain constant) The relative amount of energy reflected in the outgoing direction, given the incoming direction

26 BRDF Theory : Definition (2/2)
컴퓨터 그래픽스 BRDF Theory : Definition (2/2) Helmholtz reciprocity I/O angles can be switched and the function alue will be same Normalization Total amount of out going energy must always be less than or equal to incoming energy It is an approximation of BSSRDF Bidirectional Surface Scattering Reflectance Distribution Function Include the scattering of light within the surface position change Adding incoming and outgoing locations as inputs Travel along the incoming direction From one point to the other of the surface Along the outgoing direction

27 BRDF Theory : Reflectance equation (1/2)
컴퓨터 그래픽스 BRDF Theory : Reflectance equation (1/2) Reflectance equation Given a BRDF and an incoming radiance distribution The outgoing radiance for a given viewing direction Integrating the incoming radiance from all directions on the hemisphere above surface Determine the incoming radiance Multiply it by BRDF for this direction and the outgoing direction Scale by the incoming angle to the surface integrate

28 BRDF Theory : Reflectance equation (1/2)
컴퓨터 그래픽스 BRDF Theory : Reflectance equation (1/2) Single Point light source Simplify the notation Replace the azimuth and elevation The cosine term for light using the surface normal n More than one light, computed and summed together For diffuse surface, The BRDF is trivial

29 BRDF Theory : Theoretical models of BRDF (1/3)
컴퓨터 그래픽스 BRDF Theory : Theoretical models of BRDF (1/3) Theoretical models of BRDF How surfaces behave Microfacets Tiny, flat mirror on the surface, with random size and angle Gaussian distribution of sizes and angles Specular reflection Direct reflections from some micro facets Diffuse reflection Interreflection off several facets, scattering with in the surface material itself (shadow, mask) Height correlation Microfacets have size near the wavelength of the light Diffraction can be simulated

30 BRDF Theory : Theoretical models of BRDF (2/3)
컴퓨터 그래픽스 BRDF Theory : Theoretical models of BRDF (2/3) Fresnel reflectance (Figure 6.11) Importance for non-conductive or dielectric, matrials such as plastic, glass, and water All materials become fully reflective at the shallowest grazing angle Describes the reflectance of a given surface at various angles conductive dielectric

31 BRDF Theory : Theoretical models of BRDF (3/3)
컴퓨터 그래픽스 BRDF Theory : Theoretical models of BRDF (3/3) Limitation of BRDF theoretical model Do not account for anisotropy If the viewer and the light source do not move and a flat sample of the material changes its appearance when it is rotated about its normal Brushed metal, vanished wood, woven cloth, fur, hair Anisotropic BRDF Both fi and fo are needed to evaluate the BRDF (four angles) Isotropic BRDF Relative angle f = fi - fo (three angles) Not necessarily useful for representing some given material sample

32 BRDF Theory : Another approach (1/3)
컴퓨터 그래픽스 BRDF Theory : Another approach (1/3) Another approach to represent BRDF Acquire BRDF data from the actual surface With basis summation techniques Capture the BRDF’s surface as the weighted sum of a set of functions Phong/Blinn lighting model represent BRDF by just two functions A diffuse component and a specular lobe

33 Implementing BRDFs Implementing BRDFs To save on computation
컴퓨터 그래픽스 Implementing BRDFs Implementing BRDFs To save on computation To store data for a large number of elevations and azimuths Memory intensive Care needs to be taken, as measured data is usually noisy and have gaps in the set Compact representation Advantages Avoid the evaluation costs for precise theoretical models Avoid storage requirements and noisiness of acquired datasets Two approaches Factorization Environment map filtering

34 Implementing BRDFs : Factorization (1/2)
컴퓨터 그래픽스 Implementing BRDFs : Factorization (1/2) Factorization Convert a BRDF into a set of pairs of 2D textures One texture is accessed by the incoming direction The other by outgoing (Figure 6.13)

35 Implementing BRDFs : Factorization (2/2)
컴퓨터 그래픽스 Implementing BRDFs : Factorization (2/2) Forming the texture pairs The incoming and outgoing direction vectors are evaluated at each vertex of the model Two pairs of texture coordinates are then used generated using the same reparameterization These texture coordinates are then used to access the textures on the surface Multiply the two resulting pixel colors together Successive pairs of textures are multiplied in the same fashion and added to the final pixel color. Limitation At least two texture accesses are needed for every light source in the scene Only point and directional light sources can be used

36 Implementing BRDFs : Environment Mapping Filtering (1/3)
컴퓨터 그래픽스 Implementing BRDFs : Environment Mapping Filtering (1/3) Environment Mapping Filtering Environment map Render a perfectly shiny surface Extended to glossy and diffuse surfaces (reflection map) Fuzzy reflection Uniformly blur the EM Use the phong specular equation Weighted contribution

37 Implementing BRDFs : Environment Mapping Filtering (2/3)
컴퓨터 그래픽스 Implementing BRDFs : Environment Mapping Filtering (2/3) Irradiance environment map Gives the diffuse and ambient lighting for that direction Lumped into a single ambient term (Phong lighting model) Quickly and accurately Two ways to store and access lighting Sphere map Photograph a sphere painted with flat white paint valid for only one eye direction Cube map Advantage Eliminating per vertex lighting calculation from pipeline Limitations Lights and reflected object are distant Do not change with location of objected viewed

38 Implementing BRDFs : Environment Mapping Filtering (3/3)
컴퓨터 그래픽스 Implementing BRDFs : Environment Mapping Filtering (3/3) Problem with environment mapping The dynamic range of the light captured is usually limited to 8 bits per color channel Not enough to simultaneously capture the full range of incident illumination Solution High Dynamic Range Image (HDRI) Reference HDR Shop


Download ppt "Advanced Lighting and Shading"

Similar presentations


Ads by Google