Presentation is loading. Please wait.

Presentation is loading. Please wait.

Graphics Graphics Korea University cgvr.korea.ac.kr 3D Viewing 고려대학교 컴퓨터 그래픽스 연구실.

Similar presentations


Presentation on theme: "Graphics Graphics Korea University cgvr.korea.ac.kr 3D Viewing 고려대학교 컴퓨터 그래픽스 연구실."— Presentation transcript:

1 Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr 3D Viewing 고려대학교 컴퓨터 그래픽스 연구실

2 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 3d Rendering Pipeline Model Transformation Lighting Viewing Transformation Projection Transformation Clipping Viewport Transformation Scan Conversion 3D Primitives Image This is a pipelined sequence of operations to draw a 3D primitive into a 2D image for direct illumination

3 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr In Pipeline Transform into3d world coordinate system Model Transformation Lighting Viewing Transformation Projection Transformation Clipping Viewport Transformation Scan Conversion Image 3D Primitives

4 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr In Pipeline Transform into3d world coordinate system Model Transformation Lighting Viewing Transformation Projection Transformation Clipping Viewport Transformation Scan Conversion Image Illustrate according to lighting and reflectance 3D Primitives

5 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr In Pipeline Transform into3d world coordinate system Model Transformation Lighting Viewing Transformation Projection Transformation Clipping Viewport Transformation Scan Conversion Image Illustrate according to lighting and reflectance Transform into 3D viewing coordinate system 3D Primitives

6 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr In Pipeline Transform into3d world coordinate system Model Transformation Lighting Viewing Transformation Projection Transformation Clipping Viewport Transformation Scan Conversion Image Illustrate according to lighting and reflectance Transform into 3D viewing coordinate system Transform into 2D viewing coordinate system 3D Primitives

7 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr In Pipeline Transform into3d world coordinate system Model Transformation Lighting Viewing Transformation Projection Transformation Clipping Viewport Transformation Scan Conversion Image Illustrate according to lighting and reflectance Transform into 3D viewing coordinate system Transform into 2D viewing coordinate system Clip primitives outside window’s view 3D Primitives

8 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr In Pipeline Transform into3d world coordinate system Model Transformation Lighting Viewing Transformation Projection Transformation Clipping Viewport Transformation Scan Conversion Image Illustrate according to lighting and reflectance Transform into 3D viewing coordinate system Transform into 2D viewing coordinate system Clip primitives outside window’s view Transform into viewport 3D Primitives

9 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr In Pipeline Transform into3d world coordinate system Model Transformation Lighting Viewing Transformation Projection Transformation Clipping Viewport Transformation Scan Conversion Image Illustrate according to lighting and reflectance Transform into 3D viewing coordinate system Transform into 2D viewing coordinate system Clip primitives outside window’s view Transform into viewport Draw pixels(includes texturing, hidden surface etc.) 3D Primitives

10 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Transformation Transform into3d world coordinate system Model Transformation Lighting Viewing Transformation Projection Transformation Clipping Viewport Transformation Scan Conversion Image Illustrate according to lighting and reflectance Transform into 3D viewing coordinate system Transform into 2D viewing coordinate system Clip primitives outside window’s view Transform into viewport Draw pixels(includes texturing, hidden surface etc.) 3D Primitives

11 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Transformation 3D Object Coordinate Model Transformation Viewing Transformation Projection Transformation Viewport Transformation p(x’, y’) P(x, y, z) 3D World Coordinate 3D Viewing Coordinate 2D Projection Coordinate 2D Device Coordinate 3D Viewing Coordinate 3D Object Coordinate 3D World Coordinate

12 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Viewing Transformation 3D Object Coordinate Model Transformation Viewing Transformation Projection Transformation Viewport Transformation p(x’, y’) P(x, y, z) 3D World Coordinate Viewing Transformation 3D Viewing Coordinate 2D Projection Coordinate 2D Device Coordinate

13 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Viewing Transformation Mapping from world to Viewing coordinates Origin moves to eye position Up vector maps to Y axis Right vector maps to X axis X Y Z Camera

14 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Transformation from WC to VC Transformation sequences 1. Translate the view reference point to the origin of the WC system 2. Apply rotations to align the x v, y v, and z v axes with the world axes General sequence of translate-rotate transformation

15 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Transformation from WC to VC (cont’) Translation view reference point(x 0, y 0, z 0 ) Rotation rotate around the world x w axis to bring z v into the x w z w plane rotate around the world y w axis to align the z w and z v axis final rotation is about the z w axis to align the y w and y v axis

16 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Transformation from WC to VC (cont’) Rotation by uvn system Calculate unit uvn vectors  N : view-plane normal vector  V : view-up vector  U : perpendicular to both N and V Form the composite rotation matrix

17 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Camera Models The most common model is pin-hole camera All captured light rays arrive along paths toward focal point without lens distortion (everything is in focus) Sensor response proportional to radiance Other models consider…  Depth of field  Motion blur  Lens distortion

18 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Viewing Parameters Position Eye position(px, py, pz) Orientation View direction(dx, dy, dz) Up direction(ux, uy, uz) Aperture Field of view(xfov, yfov) Film plane “look at” point View plane normal

19 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Viewing Coordinate Canonical coordinate system Convention is right-handed (looking down – z axis) Convention for projection, clipping, etc. X Y Viewing up vector maps to Y axis Viewing right vector maps to X axis Viewing back vector maps to Z axis (potting out of page)

20 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Viewing Transformation Transformation matrix maps camera basis vectors to canonical vectors in viewing coordinate system Right UpBack Eye (0, 0, 1) (0, 1, 0) (1, 0, 0) Matrix

21 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Viewing Transformation 3D Object Coordinate Model Transformation Viewing Transformation Projection Transformation Viewport Transformation p(x’, y’) P(x, y, z) 3D World Coordinate Projection Transformation 3D Viewing Coordinate 2D Projection Coordinate 2D Device Coordinate

22 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Projection General definition Transform points in n-space to m-space(m<n) In computer graphics Map viewing coordinates to 2D screen coordinates

23 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Taxonomy of Projections Planar geometric projection ParallelPerspective OrthographicOblique Top Front Side Axonometric Cabinet Cavalier Other One-point Two-point Three-point

24 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Parallel & Perspective Parallel Projection Perspective Projection

25 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Taxonomy of Projections Planar geometric projection ParallelPerspective OrthographicOblique Top Front Side Axonometric Cabinet Cavalier Other One-point Two-point Three-point

26 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Parallel Projection Center of projection is at infinity Direction of projection (DOP) same for all points View Plane DOP

27 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Taxonomy of Projections Planar geometric projection ParallelPerspective OrthographicOblique Top Front Side Axonometric Cabinet Cavalier Other One-point Two-point Three-point

28 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Parallel Projection View Volume

29 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Orthographic & Oblique Orthographic parallel projection the projection is perpendicular to the view plane Oblique parallel projection The projectors are inclined with respect to the view plane

30 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Orthographic Projections DOP perpendicular to view plane

31 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Orthographic Projections DOP perpendicular to view plane Front Top Side

32 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Orthographic Coordinates

33 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Oblique Projections DOP not perpendicular to view plane Cavalier (DOP at 45 ) Cabinet (DOP at 63.4 )

34 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Oblique Projections DOP not perpendicular to view plane Cavalier projection Cabinet projection

35 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Parallel Projection Matrix General parallel projection transformation Where L 1 is the inverse of tan α, which is also the value of L when z=1

36 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Parallel Projection Matrix General parallel projection transformation

37 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Parallel Projection Matrix

38 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Taxonomy of Projections Planar geometric projection ParallelPerspective OrthographicOblique Top Front Side Axonometric Cabinet Cavalier Other One-point Two-point Three-point

39 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Perspective Projection Map points onto “view plane” along “projectors” emanating from “center of projection”(cop) View Plane Center of Projection Projectors

40 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Perspective Projection How many vanishing point?

41 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Perspective Projection How many vanishing point? Three-point perspective

42 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Perspective Projection How many vanishing point? Three-point perspective Two-point perspective

43 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Perspective Projection How many vanishing point? Three-point perspective Two-point perspective One-point perspective

44 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Perspective Projection View Volume

45 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Perspective Projection Compute 2D coordinates from 3D coordinates with similar triangles

46 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Perspective Projection Compute 2D coordinates from 3D coordinates with similar triangles

47 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Perspective Projection Matrix 4x4 matrix representation?

48 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Perspective Projection Matrix 4x4 matrix representation?

49 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Perspective Projection Matrix Perspective projection Perspective transformation Orthographic projection Center of Projection on the x axis Center of Projection on the y axis

50 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Perspective Projection Matrix 2-point perspectives3-point perspectives

51 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Taxonomy of Projections Planar geometric projection ParallelPerspective OrthographicOblique Top Front Side Axonometric Cabinet Cavalier Other One-point Two-point Three-point

52 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Perspective vs. Parallel Perspective projection + Size varies inversely with distance – looks realistic – Distance and angles are not(in general) preserved – Parallel line do not (in general) remain parallel Parallel projection + Good for exact measurements + Parallel lines remain parallel – Angles are not (in general) preserved – Less realistic looking

53 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr Classical Viewing


Download ppt "Graphics Graphics Korea University cgvr.korea.ac.kr 3D Viewing 고려대학교 컴퓨터 그래픽스 연구실."

Similar presentations


Ads by Google