3 D Viewing cgvr korea ac kr 3

  • Slides: 54
Download presentation
3 D Viewing cgvr. korea. ac. kr

3 D Viewing cgvr. korea. ac. kr

3 d Rendering Pipeline 3 D Primitives Model Transformation Lighting Viewing Transformation Projection Transformation

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

In Pipeline 3 D Primitives Model Transformation Transform into 3 d world coordinate system

In Pipeline 3 D Primitives Model Transformation Transform into 3 d world coordinate system Lighting Viewing Transformation Projection Transformation Clipping Viewport Transformation Scan Conversion Image cgvr. korea. ac. kr

In Pipeline 3 D Primitives Model Transformation Lighting Transform into 3 d world coordinate

In Pipeline 3 D Primitives Model Transformation Lighting Transform into 3 d world coordinate system Illustrate according to lighting and reflectance Viewing Transformation Projection Transformation Clipping Viewport Transformation Scan Conversion Image cgvr. korea. ac. kr

In Pipeline 3 D Primitives Model Transformation Lighting Viewing Transformation Transform into 3 d

In Pipeline 3 D Primitives Model Transformation Lighting Viewing Transformation Transform into 3 d world coordinate system Illustrate according to lighting and reflectance Transform into 3 D viewing coordinate system Projection Transformation Clipping Viewport Transformation Scan Conversion Image cgvr. korea. ac. kr

In Pipeline 3 D Primitives Model Transformation Lighting Viewing Transformation Projection Transformation Transform into

In Pipeline 3 D Primitives Model Transformation Lighting Viewing Transformation Projection Transformation Transform into 3 d world coordinate system Illustrate according to lighting and reflectance Transform into 3 D viewing coordinate system Transform into 2 D viewing coordinate system Clipping Viewport Transformation Scan Conversion Image cgvr. korea. ac. kr

In Pipeline 3 D Primitives Model Transformation Lighting Viewing Transformation Projection Transformation Clipping Transform

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

In Pipeline 3 D Primitives Model Transformation Lighting Viewing Transformation Projection Transformation Clipping Viewport

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

In Pipeline 3 D Primitives Model Transformation Lighting Viewing Transformation Projection Transformation Clipping Viewport

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

Transformation 3 D Primitives Model Transformation Lighting Viewing Transformation Projection Transformation Clipping Viewport Transformation

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

Transformation P(x, y, z) 3 D Object Coordinate 3 D Viewing Coordinate Model Transformation

Transformation P(x, y, z) 3 D Object Coordinate 3 D Viewing Coordinate Model Transformation 3 D World Coordinate Viewing Transformation 3 D Viewing Coordinate Projection Transformation 2 D Projection Coordinate Viewport Transformation 2 D Device Coordinate p(x’, y’) cgvr. korea. ac. kr 3 D Object Coordinate 3 D World Coordinate

Viewing Transformation P(x, y, z) 3 D Object Coordinate Model Transformation 3 D World

Viewing Transformation P(x, y, z) 3 D Object Coordinate Model Transformation 3 D World Coordinate Viewing Transformation 3 D Viewing Coordinate Projection Transformation 2 D Projection Coordinate Viewport Transformation 2 D Device Coordinate p(x’, y’) cgvr. korea. ac. kr Viewing Transformation

Viewing Transformation • Mapping from world to Viewing coordinates • Origin moves to eye

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 Y Camera Z X cgvr. korea. ac. kr

Transformation from WC to VC • Transformation sequences 1. Translate the view reference point

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 xv, yv, and zv axes with the world axes General sequence of translate-rotate transformation cgvr. korea. ac. kr

Transformation from WC to VC (cont’) • Translation • view reference point(x 0, y

Transformation from WC to VC (cont’) • Translation • view reference point(x 0, y 0, z 0) • Rotation • rotate around the world xw axis to bring zv into the xwzw plane • rotate around the world yw axis to align the zw and zv axis • final rotation is about the zw axis to align the yw and yv axis cgvr. korea. ac. kr

Transformation from WC to VC (cont’) • Rotation by uvn system • Calculate unit

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 cgvr. korea. ac. kr

Camera Models • The most common model is pin-hole camera • All captured light

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 cgvr. korea. ac. kr

Viewing Parameters • Position • Eye position(px, py, pz) • Orientation • View direction(dx,

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 cgvr. korea. ac. kr

Viewing Coordinate • Canonical coordinate system • Convention is right-handed (looking down – z

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

Viewing Transformation • Transformation matrix maps camera basis vectors to canonical vectors in viewing

Viewing Transformation • Transformation matrix maps camera basis vectors to canonical vectors in viewing coordinate system Back (0, 1, 0) Up Matrix Right (1, 0, 0) Eye (0, 0, 1) cgvr. korea. ac. kr

Viewing Transformation P(x, y, z) 3 D Object Coordinate Model Transformation 3 D World

Viewing Transformation P(x, y, z) 3 D Object Coordinate Model Transformation 3 D World Coordinate Viewing Transformation 3 D Viewing Coordinate Projection Transformation 2 D Projection Coordinate Viewport Transformation 2 D Device Coordinate p(x’, y’) cgvr. korea. ac. kr Projection Transformation

Projection • General definition • Transform points in n-space to m-space(m<n) • In computer

Projection • General definition • Transform points in n-space to m-space(m<n) • In computer graphics • Map viewing coordinates to 2 D screen coordinates cgvr. korea. ac. kr

Taxonomy of Projections Planar geometric projection Parallel Orthographic Top Front Perspective Oblique One-point Three-point

Taxonomy of Projections Planar geometric projection Parallel Orthographic Top Front Perspective Oblique One-point Three-point Two-point Axonometric Side Cabinet Other Cavalier cgvr. korea. ac. kr

Parallel & Perspective • Parallel Projection • Perspective Projection cgvr. korea. ac. kr

Parallel & Perspective • Parallel Projection • Perspective Projection cgvr. korea. ac. kr

Taxonomy of Projections Planar geometric projection Parallel Orthographic Top Front Perspective Oblique One-point Three-point

Taxonomy of Projections Planar geometric projection Parallel Orthographic Top Front Perspective Oblique One-point Three-point Two-point Axonometric Side Cabinet Other Cavalier cgvr. korea. ac. kr

Parallel Projection • Center of projection is at infinity • Direction of projection (DOP)

Parallel Projection • Center of projection is at infinity • Direction of projection (DOP) same for all points DOP View Plane cgvr. korea. ac. kr

Taxonomy of Projections Planar geometric projection Parallel Orthographic Top Front Perspective Oblique One-point Three-point

Taxonomy of Projections Planar geometric projection Parallel Orthographic Top Front Perspective Oblique One-point Three-point Two-point Axonometric Side Cabinet Other Cavalier cgvr. korea. ac. kr

Parallel Projection View Volume cgvr. korea. ac. kr

Parallel Projection View Volume cgvr. korea. ac. kr

Orthographic & Oblique • Orthographic parallel projection • the projection is perpendicular to the

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 cgvr. korea. ac. kr

Orthographic Projections • DOP perpendicular to view plane cgvr. korea. ac. kr

Orthographic Projections • DOP perpendicular to view plane cgvr. korea. ac. kr

Orthographic Projections • DOP perpendicular to view plane Front Side Top cgvr. korea. ac.

Orthographic Projections • DOP perpendicular to view plane Front Side Top cgvr. korea. ac. kr

Orthographic Coordinates cgvr. korea. ac. kr

Orthographic Coordinates cgvr. korea. ac. kr

Oblique Projections • DOP not perpendicular to view plane Cavalier (DOP at 45 )

Oblique Projections • DOP not perpendicular to view plane Cavalier (DOP at 45 ) Cabinet (DOP at 63. 4 ) cgvr. korea. ac. kr

Oblique Projections • DOP not perpendicular to view plane • Cavalier projection • Cabinet

Oblique Projections • DOP not perpendicular to view plane • Cavalier projection • Cabinet projection cgvr. korea. ac. kr

Parallel Projection Matrix • General parallel projection transformation Where L 1 is the inverse

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 cgvr. korea. ac. kr

Parallel Projection Matrix • General parallel projection transformation cgvr. korea. ac. kr

Parallel Projection Matrix • General parallel projection transformation cgvr. korea. ac. kr

Parallel Projection Matrix cgvr. korea. ac. kr

Parallel Projection Matrix cgvr. korea. ac. kr

Taxonomy of Projections Planar geometric projection Parallel Orthographic Top Front Perspective Oblique One-point Three-point

Taxonomy of Projections Planar geometric projection Parallel Orthographic Top Front Perspective Oblique One-point Three-point Two-point Axonometric Side Cabinet Other Cavalier cgvr. korea. ac. kr

Perspective Projection • Map points onto “view plane” along “projectors” emanating from “center of

Perspective Projection • Map points onto “view plane” along “projectors” emanating from “center of projection”(cop) s r o t ec j ro P Center of Projection View Plane cgvr. korea. ac. kr

Perspective Projection • How many vanishing point? cgvr. korea. ac. kr

Perspective Projection • How many vanishing point? cgvr. korea. ac. kr

Perspective Projection • How many vanishing point? Three-point perspective cgvr. korea. ac. kr

Perspective Projection • How many vanishing point? Three-point perspective cgvr. korea. ac. kr

Perspective Projection • How many vanishing point? Three-point perspective Two-point perspective cgvr. korea. ac.

Perspective Projection • How many vanishing point? Three-point perspective Two-point perspective cgvr. korea. ac. kr

Perspective Projection • How many vanishing point? Three-point perspective Two-point perspective cgvr. korea. ac.

Perspective Projection • How many vanishing point? Three-point perspective Two-point perspective cgvr. korea. ac. kr One-point perspective

Perspective Projection View Volume cgvr. korea. ac. kr

Perspective Projection View Volume cgvr. korea. ac. kr

Perspective Projection • Compute 2 D coordinates from 3 D coordinates with similar triangles

Perspective Projection • Compute 2 D coordinates from 3 D coordinates with similar triangles cgvr. korea. ac. kr

Perspective Projection • Compute 2 D coordinates from 3 D coordinates with similar triangles

Perspective Projection • Compute 2 D coordinates from 3 D coordinates with similar triangles cgvr. korea. ac. kr

Perspective Projection Matrix • 4 x 4 matrix representation? cgvr. korea. ac. kr

Perspective Projection Matrix • 4 x 4 matrix representation? cgvr. korea. ac. kr

Perspective Projection Matrix • 4 x 4 matrix representation? cgvr. korea. ac. kr

Perspective Projection Matrix • 4 x 4 matrix representation? cgvr. korea. ac. kr

Perspective Projection Matrix Orthographic projection Perspective projection Center of Projection on the x axis

Perspective Projection Matrix Orthographic projection Perspective projection Center of Projection on the x axis cgvr. korea. ac. kr Perspective transformation Center of Projection on the y axis

Perspective Projection Matrix 2 -point perspectives cgvr. korea. ac. kr 3 -point perspectives

Perspective Projection Matrix 2 -point perspectives cgvr. korea. ac. kr 3 -point perspectives

Taxonomy of Projections Planar geometric projection Parallel Orthographic Top Front Perspective Oblique One-point Three-point

Taxonomy of Projections Planar geometric projection Parallel Orthographic Top Front Perspective Oblique One-point Three-point Two-point Axonometric Side Cabinet Other Cavalier cgvr. korea. ac. kr

Perspective vs. Parallel • Perspective projection + Size varies inversely with distance – looks

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 cgvr. korea. ac. kr

Classical Viewing cgvr. korea. ac. kr

Classical Viewing cgvr. korea. ac. kr

Thanks… cgvr. korea. ac. kr

Thanks… cgvr. korea. ac. kr