Graphics 3 D Viewing Graphics Lab Korea University
Graphics 3 D Viewing 고려대학교 컴퓨터 그래픽스 연구실 Graphics Lab @ Korea University
3 d Rendering Pipeline CGVR 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 Graphics Lab @ Korea University
In Pipeline CGVR 3 D Primitives Model Transformation Transform into 3 d world coordinate system Lighting Viewing Transformation Projection Transformation Clipping Viewport Transformation Scan Conversion Image Graphics Lab @ Korea University
In Pipeline CGVR 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 Graphics Lab @ Korea University
In Pipeline CGVR 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 Graphics Lab @ Korea University
In Pipeline CGVR 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 Graphics Lab @ Korea University
In Pipeline CGVR 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 Graphics Lab @ Korea University
In Pipeline CGVR 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 Graphics Lab @ Korea University
In Pipeline CGVR 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. ) Graphics Lab @ Korea University
Transformation CGVR 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. ) Graphics Lab @ Korea University
Transformation CGVR P(x, y, z) 3 D Object Coordinate Model Transformation 3 D Viewing Coordinate 3 D World Coordinate Viewing Transformation 3 D Viewing Coordinate Projection Transformation 2 D Projection Coordinate 3 D Object Coordinate Viewport Transformation 2 D Device Coordinate 3 D World Coordinate p(x’, y’) Graphics Lab @ Korea University
Viewing Transformation CGVR P(x, y, z) 3 D Object Coordinate Model Transformation 3 D World Coordinate Viewing Transformation 3 D Viewing Coordinate Viewing Transformation Projection Transformation 2 D Projection Coordinate Viewport Transformation 2 D Device Coordinate p(x’, y’) Graphics Lab @ Korea University
Viewing Transformation n CGVR Mapping from world to Viewing coordinates Origin moves to eye position n Up vector maps to Y axis n Right vector maps to X axis n Y Camera Z X Graphics Lab @ Korea University
Transformation from WC to VC n CGVR 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 Graphics Lab @ Korea University
Transformation from WC to VC (con’t) n Translation n n CGVR view reference point(x 0, y 0, z 0) Rotation rotate around the world xw axis to bring zv into the xwzw plane n rotate around the world yw axis to align the zw and zv axis n final rotation is about the zw axis to align the yw and yv axis n Graphics Lab @ Korea University
Camera Models n CGVR 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) n Sensor response proportional to radiance n n Other models consider… Depth of field o Motion blur o Lens distortion o Graphics Lab @ Korea University
Viewing Parameters n Position n n CGVR Eye position(px, py, pz) Orientation View direction(dx, dy, dz) n Up direction(ux, uy, uz) n n Aperture n n Field of view(xfov, yfov) Film plane “look at” point n View plane normal n Graphics Lab @ Korea University
Viewing Coordinate n CGVR Canonical coordinate system Convention is right-handed (looking down – z axis) n Convention for projection, clipping, etc. n Viewing up vector maps to Y axis Y Viewing back vector maps to Z axis (potting out of page) X Viewing right vector maps to X axis Graphics Lab @ Korea University
Viewing Transformation n CGVR Transformation matrix maps camera basis vectors to canonical vectors in viewing coordinate system Back (0, 1, 0) Up Matrix Right Eye (1, 0, 0) (0, 0, 1) Graphics Lab @ Korea University
Viewing Transformation CGVR 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 Viewing Transformation Viewport Transformation 2 D Device Coordinate p(x’, y’) Graphics Lab @ Korea University
Projection n General definition n n CGVR Transform points in n-space to m-space(m<n) In computer graphics n Map viewing coordinates to 2 D screen coordinates Graphics Lab @ Korea University
Taxonomy of Projections CGVR Planar geometric projection Parallel Orthographic Top Front Perspective Oblique One-point Three-point Two-point Axonometric Cabinet Side Other Cavalier Graphics Lab @ Korea University
Parallel & Perspective n Parallel Projection n Perspective Projection CGVR Graphics Lab @ Korea University
Taxonomy of Projections CGVR Planar geometric projection Parallel Orthographic Top Front Perspective Oblique One-point Three-point Two-point Axonometric Cabinet Side Other Cavalier Graphics Lab @ Korea University
Parallel Projection n CGVR Center of projection is at infinity n Direction of projection (DOP) same for all points Graphics Lab @ Korea University
Taxonomy of Projections CGVR Planar geometric projection Parallel Orthographic Top Front Perspective Oblique One-point Three-point Two-point Axonometric Cabinet Side Other Cavalier Graphics Lab @ Korea University
Parallel Projection View Volume CGVR Graphics Lab @ Korea University
Orthographic & Oblique n Orthographic parallel projection n n CGVR the projection is perpendicular to the view plane Oblique parallel projection n The projectors are inclined with respect to the view plane Graphics Lab @ Korea University
Orthographic Projections n CGVR DOP perpendicular to view plane Graphics Lab @ Korea University
Orthographic coordinates CGVR Graphics Lab @ Korea University
Oblique Projections n CGVR DOP not perpendicular to view plane Cavalier (DOP at 45 ) Cabinet (DOP at 63. 4 ) Graphics Lab @ Korea University
Oblique projection n CGVR DOP not perpendicular to view plane n Cavalier projection n Cabinet projection Graphics Lab @ Korea University
Parallel Projection Matrix n CGVR General parallel projection transformation Where L 1 is the inverse of tan α , which is also the value of L when z=1 Graphics Lab @ Korea University
Parallel Projection Matrix n CGVR General parallel projection transformation Graphics Lab @ Korea University
Parallel Projection Matrix CGVR Graphics Lab @ Korea University
Taxonomy of Projections CGVR Planar geometric projection Parallel Orthographic Top Front Perspective Oblique One-point Three-point Two-point Axonometric Cabinet Side Other Cavalier Graphics Lab @ Korea University
Perspective Projection n CGVR Map points onto “view plane” along “projectors” emanating from “center of projection”(cop) Graphics Lab @ Korea University
Perspective Projection n CGVR How many vanishing point? Graphics Lab @ Korea University
Perspective Projection View Volume CGVR Graphics Lab @ Korea University
Perspective Projection n CGVR Compute 2 D coordinates from 3 D coordinates with similar triangles Graphics Lab @ Korea University
Perspective Projection n CGVR Compute 2 D coordinates from 3 D coordinates with similar triangles Graphics Lab @ Korea University
Perspective Projection Matrix n CGVR 4 x 4 matrix representation? Graphics Lab @ Korea University
Perspective Projection Matrix n CGVR 4 x 4 matrix representation? Graphics Lab @ Korea University
Perspective Projection Matrix D Perspective projection Dx Center of Projection on the x axis CGVR D Orthographic projection Perspective transformation Dy Center of Projection on the y axis Graphics Lab @ Korea University
Perspective Projection Matrix 2 -point perspectives CGVR 3 -point perspectives Graphics Lab @ Korea University
Taxonomy of Projections CGVR Planar geometric projection Parallel Orthographic Top Front Perspective Oblique One-point Three-point Two-point Axonometric Cabinet Side Other Cavalier Graphics Lab @ Korea University
Perspective vs. Parallel n CGVR Perspective projection Size varies inversely with distance – looks realistic n Distance and angles are not(in general) preserved n Parallel line do not (in general) remain parallel n n Parallel projection Good for exact measurements n Parallel lines remain parallel n Angles are not (in general) preserved n Less realistic looking n Graphics Lab @ Korea University
- Slides: 47