3D graphics eBook - Course Materials Repository
3D graphics eBook - Course Materials Repository 3D graphics eBook - Course Materials Repository
3D projection 125 Perspective projection When the human eye looks at a scene, objects in the distance appear smaller than objects close by - this is known as perspective. While orthographic projection ignores this effect to allow accurate measurements, perspective definition shows distant objects as smaller to provide additional realism. The perspective projection requires greater definition. A conceptual aid to understanding the mechanics of this projection involves treating the 2D projection as being viewed through a camera viewfinder. The camera's position, orientation, and field of view control the behavior of the projection transformation. The following variables are defined to describe this transformation: • - the 3D position of a point A that is to be projected. • - the 3D position of a point C representing the camera. • - The orientation of the camera (represented, for instance, by Tait–Bryan angles). • - the viewer's position relative to the display surface. [1] Which results in: • - the 2D projection of . When and the 3D vector is projected to the 2D vector . Otherwise, to compute we first define a vector as the position of point A with respect to a coordinate system defined by the camera, with origin in C and rotated by with respect to the initial coordinate system. This is achieved by subtracting from and then applying a rotation by to the result. This transformation is often called a camera transform, and can be expressed as follows, expressing the rotation in terms of rotations about the [2] [3] x, y, and z axes (these calculations assume that the axes are ordered as a left-handed system of axes): This representation corresponds to rotating by three Euler angles (more properly, Tait–Bryan angles), using the xyz convention, which can be interpreted either as "rotate about the extrinsic axes (axes of the scene) in the order z, y, x (reading right-to-left)" or "rotate about the intrinsic axes (axes of the camera) in the order x, y, z) (reading left-to-right)". Note that if the camera is not rotated ( ), then the matrices drop out (as identities), and this reduces to simply a shift: Alternatively, without using matrices, (note that the signs of angles are inconsistent with matrix form): This transformed point can then be projected onto the 2D plane using the formula (here, x/y is used as the projection plane, literature also may use x/z): [4] Or, in matrix form using homogeneous coordinates, the system in conjunction with an argument using similar triangles, leads to division by the homogeneous coordinate, giving
3D projection 126 The distance of the viewer from the display surface, , directly relates to the field of view, where corners of your viewing surface) The above equations can also be rewritten as: is the viewed angle. (Note: This assumes that you map the points (-1,-1) and (1,1) to the In which is the display size, is the recording surface size (CCD or film), is the distance from the recording surface to the entrance pupil (camera center), and is the distance from the point to the entrance pupil. Subsequent clipping and scaling operations may be necessary to map the 2D plane onto any particular display media. Diagram To determine which screen x-coordinate corresponds to a point at multiply the point coordinates by: where is the screen x coordinate is the model x coordinate is the focal length—the axial distance from the camera center to the image plane is the subject distance. Because the camera is in 3D, the same works for the screen y-coordinate, substituting y for x in the above diagram and equation.
- Page 79 and 80: Level of detail 74 Hierarchical LOD
- Page 81 and 82: Newell's algorithm 76 Newell's algo
- Page 83 and 84: Non-uniform rational B-spline 78 Us
- Page 85 and 86: Non-uniform rational B-spline 80 of
- Page 87 and 88: Non-uniform rational B-spline 82 ar
- Page 89 and 90: Non-uniform rational B-spline 84 Ex
- Page 91 and 92: Normal mapping 86 How it works To c
- Page 93 and 94: OrenNayar reflectance model 88 Oren
- Page 95 and 96: OrenNayar reflectance model 90 , ,
- Page 97 and 98: Painter's algorithm 92 The algorith
- Page 99 and 100: Parallax mapping 94 • Parallax Ma
- Page 101 and 102: Particle system 96 A cube emitting
- Page 103 and 104: Path tracing 98 History Further inf
- Page 105 and 106: Path tracing 100 Scattering distrib
- Page 107 and 108: Phong reflection model 102 Visual i
- Page 109 and 110: Phong reflection model 104 Because
- Page 111 and 112: Phong shading 106 Visual illustrati
- Page 113 and 114: Photon mapping 108 Rendering (2nd p
- Page 115 and 116: Photon tracing 110 Advantages and d
- Page 117 and 118: Potentially visible set 112 • Can
- Page 119 and 120: Potentially visible set 114 Externa
- Page 121 and 122: Procedural generation 116 increases
- Page 123 and 124: Procedural generation 118 • Softi
- Page 125 and 126: Procedural generation 120 Reference
- Page 127 and 128: Procedural texture 122 Self-organiz
- Page 129: Procedural texture 124 References [
- Page 133 and 134: Quaternions and spatial rotation 12
- Page 135 and 136: Quaternions and spatial rotation 13
- Page 137 and 138: Quaternions and spatial rotation 13
- Page 139 and 140: Quaternions and spatial rotation 13
- Page 141 and 142: Quaternions and spatial rotation 13
- Page 143 and 144: Quaternions and spatial rotation 13
- Page 145 and 146: Radiosity 140 Overview of the radio
- Page 147 and 148: Radiosity 142 This is sometimes kno
- Page 149 and 150: Radiosity 144 References [1] " Mode
- Page 151 and 152: Ray casting 146 the light will reac
- Page 153 and 154: Ray tracing 148 Typically, each ray
- Page 155 and 156: Ray tracing 150 independence of eac
- Page 157 and 158: Ray tracing 152 On June 12, 2008 In
- Page 159 and 160: Reflection 154 Reflection Reflectio
- Page 161 and 162: Reflection 156 Glossy Reflection Fu
- Page 163 and 164: Reflection mapping 158 Cube mapping
- Page 165 and 166: Render Output unit 160 Render Outpu
- Page 167 and 168: Rendering 162 • indirect illumina
- Page 169 and 170: Rendering 164 Ray tracing Ray traci
- Page 171 and 172: Rendering 166 Academic core The imp
- Page 173 and 174: Rendering 168 • 1984 Distributed
- Page 175 and 176: Retained mode 170 Retained mode In
- Page 177 and 178: Scanline rendering 172 Comparison w
- Page 179 and 180: Screen Space Ambient Occlusion 174
<strong>3D</strong> projection 125<br />
Perspective projection<br />
When the human eye looks at a scene, objects in the distance appear smaller than objects close by - this is known as<br />
perspective. While orthographic projection ignores this effect to allow accurate measurements, perspective definition<br />
shows distant objects as smaller to provide additional realism.<br />
The perspective projection requires greater definition. A conceptual aid to understanding the mechanics of this<br />
projection involves treating the 2D projection as being viewed through a camera viewfinder. The camera's position,<br />
orientation, and field of view control the behavior of the projection transformation. The following variables are<br />
defined to describe this transformation:<br />
• - the <strong>3D</strong> position of a point A that is to be projected.<br />
• - the <strong>3D</strong> position of a point C representing the camera.<br />
• - The orientation of the camera (represented, for instance, by Tait–Bryan angles).<br />
• - the viewer's position relative to the display surface. [1]<br />
Which results in:<br />
• - the 2D projection of .<br />
When and the <strong>3D</strong> vector is projected to the 2D vector .<br />
Otherwise, to compute we first define a vector as the position of point A with respect to a coordinate<br />
system defined by the camera, with origin in C and rotated by with respect to the initial coordinate system. This is<br />
achieved by subtracting from and then applying a rotation by to the result. This transformation is often<br />
called a camera transform, and can be expressed as follows, expressing the rotation in terms of rotations about the<br />
[2] [3]<br />
x, y, and z axes (these calculations assume that the axes are ordered as a left-handed system of axes):<br />
This representation corresponds to rotating by three Euler angles (more properly, Tait–Bryan angles), using the xyz<br />
convention, which can be interpreted either as "rotate about the extrinsic axes (axes of the scene) in the order z, y, x<br />
(reading right-to-left)" or "rotate about the intrinsic axes (axes of the camera) in the order x, y, z) (reading<br />
left-to-right)". Note that if the camera is not rotated ( ), then the matrices drop out (as<br />
identities), and this reduces to simply a shift:<br />
Alternatively, without using matrices, (note that the signs of angles are inconsistent with matrix form):<br />
This transformed point can then be projected onto the 2D plane using the formula (here, x/y is used as the projection<br />
plane, literature also may use x/z): [4]<br />
Or, in matrix form using homogeneous coordinates, the system<br />
in conjunction with an argument using similar triangles, leads to division by the homogeneous coordinate, giving