Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Graphics Through OpenGL: From Theory to Experiments, Second Edition Chapter 13.

Similar presentations


Presentation on theme: "Computer Graphics Through OpenGL: From Theory to Experiments, Second Edition Chapter 13."— Presentation transcript:

1 Computer Graphics Through OpenGL: From Theory to Experiments, Second Edition Chapter 13

2 Figure 13.1: Assuming depth testing on: T rasterized and rendered (upper row), followed by Q rasterized and rendered (lower row). The starred pixel is considered in an example below.

3 Figure 13.2: Screenshot of blendRectangles1.cpp with (a) the blue rectangle first in code (b) the red rectangle first in code.

4 Figure 13.3: Screenshots of blendRectangles2.cpp: (a) Original (b) With rectangles re-ordered to blue, green, red in the code (c) New ordering seen from the -z-direction.

5 Figure 13.4: Screenshot of blendRectangles2.cpp with depth testing disabled.

6 Figure 13.5: Screenshots of blended effects: (a) sphereInGlassBox.cpp (b) fieldAnd- SkyTexturesBlended.cpp (c) ballAndTorusReflected.cpp.

7 Figure 13.6: Screenshot of fieldAndSkyFogged.cpp with exponential fogging.

8 Figure 13.7: f versus z for various parameter values – the graphs are not mathematically exact. Values of fogStart and fogEnd are 0 and K, respectively.

9 Figure 13.8: Billboard- ing: the original placement of the billboard (bold border) is rotated so its plane is normal to the direction of the viewer.

10 Figure 13.9: Screenshots of billboard.cpp: (a) Billboarding off (b) Billboarding on.

11 Figure 13.10: (a) Dark fragments represent a rasterization of a line segment s, specified to be one pixel wide (b) Shaded fragments are those that are intersected by the one-pixel wide rectangle R centered on s: the area that R covers of individual fragments, e.g., P and Q, varies.

12 Figure 13.11: Screenshots of antiAliasing+multisampling.cpp: (a) Antialiasing off (b) Antialiasing on. Multisampling off both cases.

13 Figure 13.12: Multisampling using a 2 x 2 sampling scheme.

14 Figure 13.13: Screenshot of pointSprite.cpp.

15 Figure 13.14: Blinn-Newell environment mapping principle: texture coordinates for a vertex V on an environment-mapped surface are obtained from the point on the texture image struck by the reflected ray originating from the eye.

16 Figure 13.15: Screenshot of sphereMapping.cpp.

17 Figure 13.16: The vectors involved in generating texture coordinates.

18 Figure 13.17: Determining R x from r.

19 Figure 13.18: The maps P → (R x, R y ) and (R x, R y ) → (s, t).

20 Figure 13.19: The environment S around a perfect mirror vertex V.

21 Figure 13.20: Cube mapping.

22 Figure 13.21: (a) A complete frame buffer (b) A 4 x 4 buffer with 4-bit precision as a stack of four bitplanes: points represent bits.

23 Figure 13.22: (a) Square R, which is drawn after calls to glStencilFunc(GL_EQUAL, 1, 1) and glStencilOp(GL_REPLACE, GL_REPLACE, GL_REPLACE) (b) Stencil buffer configuration before R is drawn (c) Stencil buffer configuration after R is drawn. Only each lowest bit in the stencil buffer is shown.

24 Figure 13.23: Potential outcomes for a fragment through the stencil and depth tests.

25 Figure 13.24: Screenshot of ballAndTorus- Stenciled.cpp.

26 Figure 13.25: Screenshot of imageManipulation.- cpp.

27 Figure 13.26: Rearrange the tiles from the order on the top to that on the bottom.

28 Figure 13.27: Bump mapping: (a) The original curve c and its true unit normals n(u) (b) The wrinkled curve c’ and its unit normal n’(u) at a single point c’(u) (c) Bump mapped c with redefined normals n’(u).

29 Figure 13.28: The bumped surface s’ is obtained from s by displacing each point s(u, v) a distance d(u, v) along the normal n(u, v) at s(u, v).

30 Figure 13.29: Screenshots of bumpMapping.cpp: (a) Bump mapping off (b) Bump mapping on.


Download ppt "Computer Graphics Through OpenGL: From Theory to Experiments, Second Edition Chapter 13."

Similar presentations


Ads by Google