Presentation is loading. Please wait.

Presentation is loading. Please wait.

Real-Time rendering Chapter 4.Visual Appearance 4.4. Aliasing and antialiasing 4.5. Transparency,alpha,and compositing 4.6. Fog 4.7. Gamma correction 2002.04.10.

Similar presentations


Presentation on theme: "Real-Time rendering Chapter 4.Visual Appearance 4.4. Aliasing and antialiasing 4.5. Transparency,alpha,and compositing 4.6. Fog 4.7. Gamma correction 2002.04.10."— Presentation transcript:

1 Real-Time rendering Chapter 4.Visual Appearance 4.4. Aliasing and antialiasing 4.5. Transparency,alpha,and compositing 4.6. Fog 4.7. Gamma correction 2002.04.10 李珉禎

2 4.4 Aliasing & Antialiasing (1/6) Aliasing Visual artifact is called “ the jaggies ” Antialiasing efforts to avoid it Two other common problem areas Texture aliasing : section 5.2.2 Line aliasing

3 4.4 Aliasing & Antialiasing (2/6) Line Anti-aliasing Method To treat the line as a quadrilateral one pixel wide To consider it an infinitely thin, transparent, glowing object To render the line as an antialiased texture Supersampling Techniques By using more samples per screen grid cell and blending these in some fashion, an average pixel color can be computed

4 4.4 Aliasing & Antialiasing (3/6) To implement Higher sampling rates (1/2) Combine the neighboring samples to create an image To render the scene at a higher resolution ex) Image of 500*400  To render an image of 1000*800  generated with 4 samples per pixel (:hardware accelerator) Accumulation buffer View moved half a pixel in the screen x- or y- direction as needed Such effects as motion blur and depth of field real-time rendering 으로 구현하기에 expensive 한 단점

5 4.4 Aliasing & Antialiasing (4/6) To implement Higher sampling rates (2/2) Multisampling To increase the sampling rate per pixel For generating high-quality rendering But at non-interactive speeds Used the coverage mask & z-depth.. 4*4 sub grid 16bit mask for this cell (0000 0111 1111 0111)

6 4.4 Aliasing & Antialiasing (5/6) How each polygon covers a grid cell?  have some limitations Size of the Coverage mask 9 level (common) 65 level (arbitrary) Box filter simplicity Lack of gamma correction Discussed in Section 4.7.

7 4.4 Aliasing & Antialiasing (6/6) Supersampling schemes expensive to support in hard ware  다른 application 단계에서 지원 ex) Direct3D Edge antialiasing Problem: all edges are redrawn, application must identify likely edges to redraw Full-scene antialiasing Requires the polygons be sorted from back to front Rendering with only one pass through the data Problem: Expensive

8 4.5 Transparency,Alpha & Compositing (1/7) Transparency effect in real-time rendering systems Simplistic Limited Effects normally unavailable include …  semi-transparent The blending of light (refraction) Reflectivity Transmission changes due to the viewing angle But, powerful tool for a variety of techniques(see Chapter 6. Special effect)

9 4.5 Transparency,Alpha &Compositing (2/7) Method1: Screen-door transparency Simple method for giving the illusion Checkerboard fill pattern  leaving the object behind it partially visible Problems with this technique include: Only 50% transparent Only one transparent object can be convincingly rendered on one area of the screen

10 4.5 Transparency,Alpha &Compositing (3/7) Method 2: alpha blending (1/3) For more general and flexible transparency effects RGB color & Z-buffer depth are associated with each pixel alpha(a) Another component Value describing the degree of opacity of an object for a given pixel 1.0 means : opaque 0.0 means : not obscured Each pixel covered : RGBa (=RGBA)

11 Method 2: alpha blending (2/3) Example : Blending a=0.6/surface(0.8,0.7,0.1)/Light blue(0.7,0.7,0.9)  (0.76,0.7,0.42) C 0 = aC s + (1- a)C d C 0 :resulting color,C s :source, C d :destination 4.5 Transparency,Alpha &Compositing (4/7) CdCd CsCs C0C0 a=0.6

12 4.5 Transparency,Alpha &Compositing (5/7) Method 2: alpha blending (3/3) To render transparent objects properly into a scene usually requires sorting Back-to-front order Blending equation is order-dependent Over Over operators Not commonly used in real-time application Can be used for antialiasing edges Transparency or antialiased edges C 0 = aC s + (1- a)C d C 0 :resulting color,C s :source, C d :destination

13 4.5 Transparency,Alpha &Compositing (6/7) Method 3: compositing (1/2) For blending together photographs or renderings of various objects Two ways to store the RGBa values generated [ex) surface(0.8,0.7,0.1)/ a = 0.6] Premultiplied alphas: RGBa is (0.8, 0.7, 0.1, 0.4) Unmultiplied alphas: RGBa is (0.48, 0.42, 0.06, 0.4) Advantage of Premultiplied alphas : C 0 = C s + (1- a)C d

14 4.5 Transparency,Alpha &Compositing (7/7) Method 3: compositing (2/2) A concept related to the alpha channel is chroma-keying In the film industry this process is called blue-screen matting

15 4.6. Fog (1/5) Simple atmospheric effect Can be added to the final image Several purposes Increases the level of realism for outdoor scenes Increases with the distance from the viewer To provide smoother culling of objects by the far plane without fog, a popping effect is experienced Often implemented in hardware Little or no additional cost

16 4.6. Fog (2/5) color of the fog(c p ) As f decreases, the effect of the fog increasesLinear fog Exponential fog Squared exponential fog c p = f c s +(1- f ) c f c s : color of a shaded surface/ c f : color of fog/ Fog factor  f ∈ [0,1]

17 4.6. Fog (3/5) increases Linear fog : exponential fog : squared exponential fog : Z p :depth from the viewer/Scalar d f : to control the density

18 4.6. Fog (4/5) exp2 0.33 exp2 0.66 Originalfog color=pinklinear fog exp 0.33exp 0.66

19 4.6. Fog (5/5) Compute fog Z-depth vs. Radial fog

20 4.7. Gamma Correction (1/5) To display them on a monitor  pixel values computed  physical relationship voltage input to an electron gun in a CRT(cathod-ray tube)monitor the light output by the screen Gamma value :2.3~2.6 NTSC,the color TV encoding scheme:2.2 HDTV :2.222 I:intensity generated/ V:input voltage/ e :brightness

21 4.7. Gamma Correction (2/5) 그림 4.17 At its simplest, assuming black level is zero: Ex) gamma of 2.2/c i =0.5  gamma-corrected c is 0.73

22 4.7. Gamma Correction (3/5) Gamma correction is important to real-time graphics in a few areas: Cross-platform compatibility :SGI,Apple Mac. Color fidelity, consistency, and interpolation Dithering Line and edge antialiasing quality Alpha blending and compositing Texturing

23 4.7. Gamma Correction (4/5) gamma -corrected =1.0 gamma-corrected=0.2gamma -corrected =5.0

24 4.7. Gamma Correction (5/5) Problem 1 :banding(=contouring) artifacts Implemented in some hardware Many applications is to ignore Problem 2 :some software(e.g.,games) include a control  not a user preference


Download ppt "Real-Time rendering Chapter 4.Visual Appearance 4.4. Aliasing and antialiasing 4.5. Transparency,alpha,and compositing 4.6. Fog 4.7. Gamma correction 2002.04.10."

Similar presentations


Ads by Google