Part 1: Foundations - PowerPoint PPT Presentation

1 / 31
About This Presentation
Title:

Part 1: Foundations

Description:

Lighting model. Three shading methods. 1) Flat ... yo. zo. Mo. Mc. model-view matrix. perspective projection. top view. COP (x, y, z) (xp, yp, zp) z. y. x ... – PowerPoint PPT presentation

Number of Views:17
Avg rating:3.0/5.0
Slides: 32
Provided by: kwangy
Category:
Tags: foundations | model | part | yo

less

Transcript and Presenter's Notes

Title: Part 1: Foundations


1
  • Part 1 Foundations
  • Part 2 Classical 3D CG
  • Part 3 Realtime Rendering
  • Part 4 Control of Objects
  • Part 5 2D Technology
  • Part 5 Software Technology

2
  • PART 2 Classical 3D
  • 6. Classic Polygon Rendering
  • 7. Classic Mapping
  • 8. Anti-aliasing

3
Chap 6. Classical Polygon MeshRendering
Technology
  • 6-1. Coordinate Spaces and Geometric Operations
  • 6-2. Operations carried out in View Space
  • 6-3. Algorithmic Operations in the Graphics
    Pipeline
  • 6-4. Rendering Examples

4
  • We shall study the graphics pipeline
  • to use the game engine effectively
  • to develop the game engine

5
Rendering pipeline
6
6-3-2. Lighting
  • Lighting model

7
  • Three shading methods
  • 1) Flat shading
  • 2) Gouraud shading
  • 3) Phong shading


8
  • For each vertex,
  • (X, Y, Z)
  • I (R, G, B) or N (Nx, Ny, Nz)

9
6-1. Coords and Geometric Ops
  • Local (modeling) coords
  • Object creation, modification, animation
  • World coords
  • Layout objects, lights
  • Compute the vertex attributes
  • (normal vector, color, (u,v), )
  • Camera (eye, view) coords
  • Normalization
  • Clipping

10
Case 1Camera transform is known
11
  • Example
  • Mc R(90) T(d)
  • C I
  • C C T(-d)
  • C C R(-90)
  • glMatrixMode(GL_MODELVIEW)
  • glLoadIdentity ()
  • glTranslatef (0.0, 0.0, -d)
  • gkRotatef (-90.0, 0.0, 1.0, 0.0)

12
Case 2Direct camera placement
13
  • i) Specify the view reference point (C)
  • ii) Specify the view plane normal, n
  • iii) Specify the view-up vector (v)
  • iv) Compute the up-vector, v
  • v) Compute the side vector, u
  • Weve got the viewing coordinate system, u-v-n.
  • Practice pp. 207.

14
  • Typically,
  • v (0, 1, 0)
  • v v (v n) n
  • u - v x n

15
Case 3 by looking-at the target
  • C (eyeX, eyeY, eyeZ)
  • n (atX, atY, atZ) - C
  • v v
  • u n x v
  • gluLookAt (eye, at, v)

16
model-view matrix
Mo
Mc
17
model-view matrix
18
perspective projection
Let d be the focal length.
top view
19
perspective projection
  • not affine,
  • not linear,
  • irreversible.

20
making non-linear linear
21
(No Transcript)
22
Perspective Division
Projection
  • Model-view

23
(No Transcript)
24
(No Transcript)
25
2D object in the screen coordinates (normalized de
vice coord)
3D object in the camera coordinates
perspective projection
3D object in the distorted coordinates (clip
coordinates)
26
(No Transcript)
27
model-view transform
28
clipping
  • View frustum clipping
  • Back-face clipping

29
  • At the end of geometry processing
  • For each vertex,
  • (X, Y, Z)
  • I (R, G, B) or N (Nx, Ny, Nz)

30
  • Hidden surface removal ? z-buffer algorithm
  • Shading
  • Rasterization
  • occur simultaneously.

31
  • At the end of pixel processing,
  • For each pixel,
  • I (R, G, B) in FB
  • Zmin in Z-buffer
Write a Comment
User Comments (0)
About PowerShow.com