1 / 14

Chapter 13 Special Visual Techniques

Chapter 13 Special Visual Techniques. Blending. Without blending, a source fragment’s color values are supposed to overwrite those of its destination pixel. With blending, the source fragment does not overwrite its destination pixel . Pay attention to the z-value (depth testing).

jirair
Download Presentation

Chapter 13 Special Visual Techniques

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 13 Special Visual Techniques

  2. Blending • Without blending, a source fragment’s color values are supposed to overwrite those of its destination pixel. • With blending, the source fragment does not overwrite its destination pixel. • Pay attention to the z-value (depth testing). • Blending equation:

  3. Blending • Example: • source (0.6, 0.4, 0.2); dest (0.5, 0.5, 0.5) • SourceRb= SourceGb= SourceBb=0.3 • destRb= destGb= destBb=0.7 • Blending equation gives: • (0.3*0.5+0.7*0.6, 0.3*0.5+0.7*0.4, 0.3*0.5 +0.7*0.2) = (0.57, 0.43, 0.29)

  4. Blending

  5. Fog • Fog is an atmospheric effect that OpenGL offers ready to use. • glEnable(GL_FOG), glDisable(GL_FOG) • glFogfv(GL_FOG_COLOR, flgColor) • glFogi(GL_FOG_MODE, fogMode) • GL_LINEAR • GL_EXP • GL_EXP2

  6. Fog • GL_LINEAR: • GL_EXP: • GL_EXP2:

  7. Fog

  8. Antialiasing

  9. Antialiasing • Enable blending • Antialiasing itself is enabled with a call to • glEnable(GL_LINE_SMOOTH) • For the best possible antialiasing with the call • glHint(GL_LINE_SMOOTH_HINT, GL_NICEST)

  10. Environment Mapping • The goal of environment mapping is to simulate an object reflecting its surrounding, e.g., a shiny kettle reflecting the kitchen or a well-polished car reflecting the street. • Sphere Mapping • Cube Mapping

  11. Stencil Buffer Techniques • A stencil buffer is an extra buffer, in addition to the color buffer (pixel buffer) and depth buffer (z-buffering) found on modern graphics hardware. • Limit the area of rendering. • Make use of the strong connection between the depth buffer and the stencil buffer in the rendering pipeline. • Can put a heavy load on the graphics hardware.

  12. Bump Mapping • To give the illusion of geometric detail on a surface, e.g., making it appear ridged or dimpled, by means of perturbing the surface normals, but without actually changing any geometry.

  13. Raster Algorithms(Reading) • Cohen-Sutherland Line Clipper • Sutherland-Hodgeman Polygon Clipper • Bresenham line drawing • Polygon rasterizing

  14. Homework • Exercise 13.3

More Related