Cameras Computer Graphics II Autumn 2016-2017 CS4085 Cameras Outline 1 Cameras The Perspective Camera Model CS4085 Cameras The Perspective Camera Model Outline 1 Cameras The Perspective Camera Model CS4085 Cameras The Perspective Camera Model View Volumes Only a part of world is displayed at any one time: the view volume Culling is the process of determining what objects are not visible Objects that intersect the view volume boundaries are only partially visible Clipping is the process of intersecting an object with the view volume Visible data is displayed by projecting it on to a view plane The viewport is the rectangular region of the view plane that is drawn on the computer screen The view frustum is defined by the infinite pyramid whose apex is the eye-point, with four flat (non-parallel sides) and truncated at the near plane and far plane CS4085 Cameras The Perspective Camera Model View Volumes Only a part of world is displayed at any one time: the view volume Culling is the process of determining what objects are not visible Objects that intersect the view volume boundaries are only partially visible Clipping is the process of intersecting an object with the view volume Visible data is displayed by projecting it on to a view plane The viewport is the rectangular region of the view plane that is drawn on the computer screen The view frustum is defined by the infinite pyramid whose apex is the eye-point, with four flat (non-parallel sides) and truncated at the near plane and far plane CS4085 Cameras The Perspective Camera Model View Volumes Only a part of world is displayed at any one time: the view volume Culling is the process of determining what objects are not visible Objects that intersect the view volume boundaries are only partially visible Clipping is the process of intersecting an object with the view volume Visible data is displayed by projecting it on to a view plane The viewport is the rectangular region of the view plane that is drawn on the computer screen The view frustum is defined by the infinite pyramid whose apex is the eye-point, with four flat (non-parallel sides) and truncated at the near plane and far plane CS4085 Cameras The Perspective Camera Model View Volumes Only a part of world is displayed at any one time: the view volume Culling is the process of determining what objects are not visible Objects that intersect the view volume boundaries are only partially visible Clipping is the process of intersecting an object with the view volume Visible data is displayed by projecting it on to a view plane The viewport is the rectangular region of the view plane that is drawn on the computer screen The view frustum is defined by the infinite pyramid whose apex is the eye-point, with four flat (non-parallel sides) and truncated at the near plane and far plane CS4085 Cameras The Perspective Camera Model View Volumes Only a part of world is displayed at any one time: the view volume Culling is the process of determining what objects are not visible Objects that intersect the view volume boundaries are only partially visible Clipping is the process of intersecting an object with the view volume Visible data is displayed by projecting it on to a view plane; this will be orthogonal to viewing direction The viewport is the rectangular region of the view plane that is drawn on the computer screen The view frustum is defined by the infinite pyramid whose apex is the eye-point, with four flat (non-parallel sides) and truncated at the near plane and far plane CS4085 Cameras The Perspective Camera Model View Volumes Only a part of world is displayed at any one time: the view volume Culling is the process of determining what objects are not visible Objects that intersect the view volume boundaries are only partially visible Clipping is the process of intersecting an object with the view volume Visible data is displayed by projecting it on to a view plane The viewport is the rectangular region of the view plane that is drawn on the computer screen The view frustum is defined by the infinite pyramid whose apex is the eye-point, with four flat (non-parallel sides) and truncated at the near plane and far plane CS4085 Cameras The Perspective Camera Model View Volumes Only a part of world is displayed at any one time: the view volume Culling is the process of determining what objects are not visible Objects that intersect the view volume boundaries are only partially visible Clipping is the process of intersecting an object with the view volume Visible data is displayed by projecting it on to a view plane The viewport is the rectangular region of the view plane that is drawn on the computer screen The view frustum is defined by the infinite pyramid whose apex is the eye-point, with four flat (non-parallel sides) and truncated at the near plane and far plane CS4085 Cameras The Perspective Camera Model Camera Model Projection onto the (near) view plane is computed by intersecting a ray with the view plane The ray originates at e, the eye point, and passes through world point x; the intersection point with the view plane is y The combination of eye point, coordinate axes located at eye point, view plane, view port and view frustum defines the camera model Camera coordinate system #» #» #» origin e = (0, 0, 0) in D − U − R ; 6= (0, 0, 0) in world co-ords! #» unit-length direction vector D perp. to view plane #» closest point to observer is p = e + dmin D, dmin > 0 #» U is unit-length camera up vector #» #» #» #» R is unit-length right vector such that R = D × U (in RHCS) CS4085 Cameras The Perspective Camera Model Camera Model Projection onto the (near) view plane is computed by intersecting a ray with the view plane The ray originates at e, the eye point, and passes through world point x; the intersection point with the view plane is y The combination of eye point, coordinate axes located at eye point, view plane, view port and view frustum defines the camera model Camera coordinate system #» #» #» origin e = (0, 0, 0) in D − U − R #» unit-length direction vector D perp. to view plane; points away from observer so eye point is on negative side of plane by convention #» closest point to observer is p = e + dmin D, dmin > 0 #» U is unit-length camera up vector #» #» #» #» R is unit-length right vector such that R = D × U (in RHCS) CS4085 Cameras The Perspective Camera Model Camera Model Projection onto the (near) view plane is computed by intersecting a ray with the view plane The ray originates at e, the eye point, and passes through world point x; the intersection point with the view plane is y The combination of eye point, coordinate axes located at eye point, view plane, view port and view frustum defines the camera model Camera coordinate system #» #» #» origin e = (0, 0, 0) in D − U − R #» unit-length direction vector D perp. to view plane #» closest point to observer is p = e + dmin D, dmin > 0 #» U is unit-length camera up vector #» #» #» #» R is unit-length right vector such that R = D × U (in RHCS) CS4085 Cameras The Perspective Camera Model Camera Model Projection onto the (near) view plane is computed by intersecting a ray with the view plane The ray originates at e, the eye point, and passes through world point x; the intersection point with the view plane is y The combination of eye point, coordinate axes located at eye point, view plane, view port and view frustum defines the camera model Camera coordinate system #» #» #» origin e = (0, 0, 0) in D − U − R #» unit-length direction vector D perp. to view plane #» closest point to observer is p = e + dmin D, dmin > 0 #» U is unit-length camera up vector chosen to be parallel to opposing edges of viewport #» #» #» #» R is unit-length right vector such that R = D × U (in RHCS) CS4085 Cameras The Perspective Camera Model Camera Model Projection onto the (near) view plane is computed by intersecting a ray with the view plane The ray originates at e, the eye point, and passes through world point x; the intersection point with the view plane is y The combination of eye point, coordinate axes located at eye point, view plane, view port and view frustum defines the camera model Camera coordinate system #» #» #» origin e = (0, 0, 0) in D − U − R #» unit-length direction vector D perp. to view plane #» closest point to observer is p = e + dmin D, dmin > 0 #» U is unit-length camera up vector #» #» #» #» R is unit-length right vector such that R = D × U (in RHCS) CS4085 Cameras The Perspective Camera Model Camera Model wtl vtl vbl wtr wbl vtr p wbr vbr e View plane vertices, v.. and far plane, w.. #» Both normals point into frustum; near plane D, far plane #» −D CS4085 Cameras The Perspective Camera Model Frustum Vertices #» #» #» View plane vertices are vbl = e + dmin D + umin U + rmin R, and (in coordinates form) vtl = e + (dmin , umax , rmin ), vbr = e + (dmin , umin , rmax ), vtr = e + (dmin , umax , rmax ) Far plane vertices rely on “similar triangle” scaling factor dmax dmin Far plane vertices are wbl = e + ddmax (dmin , umin , rmin ), min dmax dmin (dmin , umax , rmin ), wbr = e + ddmax (dmin , umin , rmax ), min dmax wtr = e + dmin (dmin , umax , rmax ) wtl = e + CS4085 Cameras The Perspective Camera Model Frustum planes #» Near plane has a point p = e + dmin D; the vector between this #» and any point x on this plane, x − p, is orthogonal to normal, D. So #» #» #» #» D t x = D t (e + dmin D) = D t e + dmin #» Similarly for point x on far plane and its normal − D #» #» #» #» − D t x = − D t (e + dmax D) = −( D t e + dmax ) On left plane, three points are e, vtl and vbl . The normal #» pointing into frustum is given by (no U component) #» #» #» (vbl − e) × (vtl − e) =(dmin D + umin U + rmin R)× #» #» #» (dmin D + umax U + rmin R) .. = . #» #» =(umax − umin )(dmin R − rmin D) CS4085 Cameras The Perspective Camera Model Frustum planes (contd.) #» When made unit-length, the left plane normal, N l is #» #» dmin R − rmin D q 2 + r2 dmin min and the equation of points on this plane is #» N l · (x − e) = 0 We can repeat this for right plane using (vtr − e) × (vbr − e) and get #» #» #» #» −dmin R + rmax D Nr = q , N r · (x − e) = 0 2 + r2 dmin max and likewise for top and bottom faces CS4085 Cameras The Perspective Camera Model Camera Model (concl.) We usually choose a symmetric view frustum so that umax = −umin and rmax = −rmin This implies four independent parameters dmin , dmax , umax and rmax Alternatively #» we can specify the field of view in the U direction and the aspect ratio of view port window Field of view is 2θu then and aspect ratio, ρ, is ρ = rmax /umax We get umax = dmin tan θu and then rmax = ρumax Then dmin , dmax , θu and ρ completely specify the frustum again CS4085 Cameras The Perspective Camera Model Camera Model (concl.) We usually choose a symmetric view frustum so that umax = −umin and rmax = −rmin This implies four independent parameters dmin , dmax , umax and rmax Alternatively #» we can specify the field of view in the U direction and the aspect ratio of view port window Field of view is 2θu then and aspect ratio, ρ, is ρ = rmax /umax We get umax = dmin tan θu and then rmax = ρumax Then dmin , dmax , θu and ρ completely specify the frustum again CS4085 Cameras The Perspective Camera Model Camera Model (concl.) We usually choose a symmetric view frustum so that umax = −umin and rmax = −rmin This implies four independent parameters dmin , dmax , umax and rmax Alternatively #» we can specify the field of view in the U direction and the aspect ratio of view port window Field of view is 2θu then and aspect ratio, ρ, is ρ = rmax /umax We get umax = dmin tan θu and then rmax = ρumax Then dmin , dmax , θu and ρ completely specify the frustum again CS4085 Cameras The Perspective Camera Model Camera Model (concl.) We usually choose a symmetric view frustum so that umax = −umin and rmax = −rmin This implies four independent parameters dmin , dmax , umax and rmax Alternatively #» we can specify the field of view in the U direction and the aspect ratio of view port window #» U umax e θu dmin dmax #» D umin Field of view is 2θu then and aspect ratio, ρ, is ρ = rmax /umax CS4085 We get umax = dmin tan θu and then rmax = ρumax Cameras The Perspective Camera Model Camera Model (concl.) We usually choose a symmetric view frustum so that umax = −umin and rmax = −rmin This implies four independent parameters dmin , dmax , umax and rmax Alternatively #» we can specify the field of view in the U direction and the aspect ratio of view port window Field of view is 2θu then and aspect ratio, ρ, is ρ = rmax /umax We get umax = dmin tan θu and then rmax = ρumax Then dmin , dmax , θu and ρ completely specify the frustum again CS4085 Cameras The Perspective Camera Model Camera Model (concl.) We usually choose a symmetric view frustum so that umax = −umin and rmax = −rmin This implies four independent parameters dmin , dmax , umax and rmax Alternatively #» we can specify the field of view in the U direction and the aspect ratio of view port window Field of view is 2θu then and aspect ratio, ρ, is ρ = rmax /umax We get umax = dmin tan θu and then rmax = ρumax Then dmin , dmax , θu and ρ completely specify the frustum again CS4085 Cameras The Perspective Camera Model Camera Model (concl.) We usually choose a symmetric view frustum so that umax = −umin and rmax = −rmin This implies four independent parameters dmin , dmax , umax and rmax Alternatively #» we can specify the field of view in the U direction and the aspect ratio of view port window Field of view is 2θu then and aspect ratio, ρ, is ρ = rmax /umax We get umax = dmin tan θu and then rmax = ρumax Then dmin , dmax , θu and ρ completely specify the frustum again CS4085
© Copyright 2026 Paperzz