1 / 67

Computer Graphics

Computer Graphics. Chapter 10 Three-Dimensional Viewing. 1. Overview of 3D Viewing. 2D Viewing operation to position from world-coor. plane to device-coor. plane. World (2D). Window in the world. Display device (2D). Viewport in the display device.

broden
Download Presentation

Computer Graphics

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. Computer Graphics Chapter 10 Three-Dimensional Viewing

  2. 1. Overview of 3D Viewing • 2D Viewing operation • to position from world-coor. plane to device-coor. plane World (2D) Window in the world Display device (2D) Viewportin the display device • 3D Viewing operation : much more complicated!!! https://www.youtube.com/watch?v=nJh9qpyo6EY Computer Vision & Pattern Recognition Lab.

  3. 1. Overview of 3D Viewing Computer Vision & Pattern Recognition Lab.

  4. 1. Overview of 3D Viewing • 3D Viewing operation : much more complicated than 2D viewing • projection from 3D scene to a planer surface • more choice as to how we construct a scene • visible parts of a scene must be identified • lighting effects and surface characteristics must be taken into account Computer Vision & Pattern Recognition Lab.

  5. 2. 3D Viewing Pipeline • A view of a 3D scene • analogous to the processes in taking a photograph • to take a picture • camera position • camera orientation • viewing window(zooming) Computer Vision & Pattern Recognition Lab.

  6. 2. 3D Viewing Pipeline https://www.youtube.com/watch?v=cvcAjgMUPUA • A view of a 3D scene https://youtu.be/7SXzTIWmPnw Computer Vision & Pattern Recognition Lab.

  7. Modeling Coordinate(MC) • Modeling • To define 3D objects • Set of meshes • Set of vertices • Modeling Coordinate System(MCS) or Local Coordinate System(LCS) • Each object has its own coordinate • Origin and axis orientation: arbitrary

  8. World Coordinate(WC) • 3D World • Objects are described in their own coordinates => Coordinate systems are different from each other => One reference coordinate system is needed => World Coordinate System • World Coordinate System(WCS) • Origin and axis orientation: arbitraryin 3D world

  9. Viewing Coordinate(VC) • Viewing coordinate (VC) • Objects look different depending on viewer’s location • To display objects seen from the viewer, objects in WC should be transformed into viewer’s coordinate => Viewing Coordinate System(VCS) • VC can be defined by (1) Viewer’s location (2) Look-at point

  10. Viewing Coordinate(VC) • Origin of VCS= Camera location • z axis of VCS : from look-at point to camera position • Projection Plane(or View Plane): perpendicular to z axis • View Window (in projection plane): Camera film • yaxisof VCS = y axis of view window • x axis of VCS = x axis of view window

  11. 3. 3D Viewing Coordinates • To specify view reference coordinate (1) View Reference Point (VRP) (2) View Plane Normal (VPN) (3) View Up Vector (VUP) (1) View reference point (VRP) • the origin of viewing-coordinate system • the position where we want to locate a camera to take a picture Computer Vision & Pattern Recognition Lab.

  12. 3. 3D Viewing Coordinates (2) View plane normal(VPN), N • zv axis of View Reference Coordinate • perpendicular to the projection plane • from the look-at point (Pref) to the view reference point (P0) (viewing direction is opposite to N) • specified as a world coordinate vector P0 : view reference point Pref : look-at point Computer Vision & Pattern Recognition Lab.

  13. 3. 3D Viewing Coordinates (3) View-up vector(VUP), V • used to establish the positive direction for the yv axis • defined as a world-coordinate vector • simply choose V as the world vector (0, 1, 0), and this vector will be projected into the plane perpendicular to N (using vector products) Computer Vision & Pattern Recognition Lab.

  14. Inner Product, Dot Product • Outer Product, Cross Product

  15. 3. 3D Viewing Coordinates • viewing-coordinate (uvn axes) • VPN defines z axis : n • VUP defines xaxis : u • nandudefine yaxis : v Computer Vision & Pattern Recognition Lab.

  16. 4. Transformation from WC to VC • To define viewing coordinate (Summary) (1) View Reference Point (VRP) (2) View Plane Normal (VPN) or Look-at point * View Up Vector (VUP) is a constant vector (0,1,0)

  17. 4. Transformation from WC to VC • To define transformation matrix from WC to VC • Translate the view reference point to the origin of WC • Apply rotations to align the xv, yv, and zv axes with the xw, yw, and zw axes, respectively Computer Vision & Pattern Recognition Lab.

  18. 4. Transformation from WC to VC • Translation matrix • View reference point (x0, y0, z0) • Rotation matrix • Complete world-to-viewing coordinate transformation Computer Vision & Pattern Recognition Lab.

  19. 4. Transformation from WC to VC • Example • Unit cube located at the origin • VRP = (2,2,2) P • Look-at point P = (1,1,1) Solution VRP = (2,2,2) Computer Vision & Pattern Recognition Lab.

  20. 4. Transformation from WC to VC • Compute the coordinate of P(1,1,1), transformed from WC to VC? Computer Vision & Pattern Recognition Lab.

  21. 5. Projection Transformations • 3D objects mapped onto 2D plane

  22. 5. Projection Transformations • Two basic projection models • Parallel projection: coordinate positions are transformed to the view plane along parallel lines • Orthographic(Orthogonal) parallel projection • Oblique parallel projection • Perspective projection: object positions are transformed to the view plane along lines that converge to a point called the projection reference point (or center of projection) Computer Vision & Pattern Recognition Lab.

  23. 5. Projection Transformations • Human visual system is similar to perspective projection Computer Vision & Pattern Recognition Lab.

  24. 5. Projection Transformations • Parallel Projections • According to the direction for the projection lines • Orthographic parallel projection • projection is perpendicular to the view plane • Oblique parallel projection • projection is not perpendicular to the view plane Computer Vision & Pattern Recognition Lab.

  25. 6. Orthographic Parallel Projections • Orthographic projections • Elevation View • front, side and rear orthographic projections • Plan View • top orthographic projection Computer Vision & Pattern Recognition Lab.

  26. 6. Orthographic Parallel Projections • Transformation equation • With projection direction parallel to zv axis, Computer Vision & Pattern Recognition Lab.

  27. 6. Orthographic Parallel Projections • Clipping window and orthogonal-projection view volume • Clipping window: define the part of the scene that we want to display Orthogonal-projection view volume (infinite region) near-far(front-back) clipping planes Finite view volume (rectangular parallelepiped) Computer Vision & Pattern Recognition Lab.

  28. 6. Orthographic Parallel Projections Computer Vision & Pattern Recognition Lab.

  29. 6. Orthographic Parallel Projections • Normalization transformation for clipping (skip!) • Rectangular-parallelepiped view volume to normalized view volume • (-1, -1, -1) • (1, 1, 1) Computer Vision & Pattern Recognition Lab.

  30. 6. Orthographic Parallel Projections • After normalization transformation, clipping procedures can be efficiently performed. Computer Vision & Pattern Recognition Lab.

  31. 6. Orthographic Parallel Projections Computer Vision & Pattern Recognition Lab.

  32. 7. Oblique Parallel Projections • Oblique projection • Projection path is not perpendicular to the view plane Computer Vision & Pattern Recognition Lab.

  33. 7. Oblique Parallel Projections Cavalier projections Cabinet projections Computer Vision & Pattern Recognition Lab.

  34. 7. Oblique Parallel Projections • Oblique parallel-projection view volume (skip!) Computer Vision & Pattern Recognition Lab.

  35. 8. Perspective Projections • Perspective Projection • Projection Reference Point (PRP) (VC에서 정의) or Center of Projection (COP) Computer Vision & Pattern Recognition Lab.

  36. 8. Perspective Projections • Perspective Projection • Distant objects look smaller!!! Computer Vision & Pattern Recognition Lab.

  37. 8. Perspective Projections (skip!) • Perspective-Projection Transformation (VC to PC) • Problem: Given (xprp,yprp,zprp), zvp and (x,y,z), find (xp,xp) • Solution: To use parametric representation • Projection line passing through 2 points in parametric form • (x’, y’, z’): any point along the projection line Computer Vision & Pattern Recognition Lab.

  38. 8. Perspective Projections (skip!) • Parametric representation of a line passing through 2 points • Linear blending(weighting) of 2 points (1-t), (t) Line: P2 1 - t t =1 t P1 r(t) t = 0 Curve modeling

  39. 8. Perspective Projections (skip!) P = (x, y, z) (xp, yp, zp) PRP = (xprp, yprp, zprp) zvp zprp Eq.(10-17) z’=zvp Computer Vision & Pattern Recognition Lab.

  40. 8. Perspective Projections (skip!) • Special cases Eq.(10-18) Eq.(10-20) Eq.(10-19) Eq.(10-21) Computer Vision & Pattern Recognition Lab.

  41. 8. Perspective Projections (skip!) • Perspective Projection Transformation matrix • Transformation from (x, y, z) to (xp, yp, zvp) • From eq (10-18) Computer Vision & Pattern Recognition Lab.

  42. 8. Perspective Projections zvp Computer Vision & Pattern Recognition Lab.

  43. 8. Perspective Projections • Perspective Projection Transformation matrix • If • If Computer Vision & Pattern Recognition Lab.

  44. 8. Perspective Projections • Perspective effects depend on the distance between the projection reference point and the view plane Computer Vision & Pattern Recognition Lab.

  45. 8. Perspective Projections • Vanishing points • The point at which a set of projected parallel lines converge • Principal vanishing point • The vanishing point for any set of lines that are parallel to one of the principal axes of an object • The number of principal axes intersecting the view plane determines the number of vanishing points Computer Vision & Pattern Recognition Lab.

  46. 8. Perspective Projections One point perspective: One principal axis intersects view plane Computer Vision & Pattern Recognition Lab.

  47. 8. Perspective Projections Two point perspective: two principal axes intersect view plane Computer Vision & Pattern Recognition Lab.

  48. 8. Perspective Projections Three point perspective: Three principal axes intersect view plane Computer Vision & Pattern Recognition Lab.

  49. 8. Perspective Projections • Perspective-projection view volume (Pyramid of vision) + near-far clipping planes Truncated pyramid (Frustum) view volume https://www.youtube.com/watch?v=BrfRSx7ObL0 Computer Vision & Pattern Recognition Lab.

More Related