人机接口与图形学(双语)06-Color

上传人:lizhe****0001 文档编号:57365015 上传时间:2018-10-21 格式:PPT 页数:85 大小:2.36MB
返回 下载 相关 举报
人机接口与图形学(双语)06-Color_第1页
第1页 / 共85页
人机接口与图形学(双语)06-Color_第2页
第2页 / 共85页
人机接口与图形学(双语)06-Color_第3页
第3页 / 共85页
人机接口与图形学(双语)06-Color_第4页
第4页 / 共85页
人机接口与图形学(双语)06-Color_第5页
第5页 / 共85页
点击查看更多>>
资源描述

《人机接口与图形学(双语)06-Color》由会员分享,可在线阅读,更多相关《人机接口与图形学(双语)06-Color(85页珍藏版)》请在金锄头文库上搜索。

1、Camera Models and Color,Department of CS & E, East China University of Science & Technology,Content,Camera Models Color in Vision Color perception Color representations,Content,Camera Models Color in Vision Color perception Color representations,Rendering with Natural Light,Fiat Lux,Light Stage,Movi

2、ng the Camera or the World?,Two equivalent operations Initial OpenGL camera position is at origin, looking along -Z Now create a unit square parallel to camera at z = -10 If we put a z-translation matrix of 3 on stack, what happens? Camera moves to z = -3 Note OpenGL models viewing in left-hand coor

3、dinates Camera stays put, but square moves to -7 Image at camera is the same with both,A 3D Scene,Notice the presence of the camera the projection plane the world coordinate axesViewing transformations define how to acquire the image on the projection plane,Viewing Transformations,Goal: To create a

4、camera-centered viewCamera is at origin Camera is looking along negative z-axis Cameras up is aligned with y-axis (what does this mean?),2 Basic Steps,Step 1: Align the worlds coordinate frame with cameras by rotation,2 Basic Steps,Step 2: Translate to align world and camera origins,Creating Camera

5、Coordinate Space,Specify a point where the camera is located in world space, the eye point (View Reference Point = VRP) Specify a point in world space that we wish to become the center of view, the lookat point Specify a vector in world space that we wish to point up in camera image, the up vector (

6、VUP) Intuitive camera movement,Constructing Viewing Transformation, V,Create a vector l from eye-point to lookat-pointNormalize the vectorDesired rotation matrix should map this vector to 0, 0, -1T Why?,Constructing Viewing Transformation, V,Construct another important vector from the cross product

7、of the lookat-vector and the vup-vectorThis vector, when normalized, should align with 1, 0, 0T Why?,Constructing Viewing Transformation, V,One more vector to defineThis vector, when normalized, should align with 0, 1, 0T Now lets compose the results,Composing Matrices to Form V,We know the three wo

8、rld axis vectors (x, y, z) We know the three camera axis vectors (u, v, n) Viewing transformation, V, must convert from world to camera coordinate systems,Composing Matrices to Form V,Remember Each camera axis vector is unit length. Each camera axis vector is perpendicular to othersCamera matrix is

9、orthogonal and normalized OrthonormalTherefore, M-1 = MT,Composing Matrices to Form V,Therefore, rotation component of viewing transformation is just transpose of computed vectors,Composing Matrices to Form V,Translation component tooMultiply it through,Final Viewing Transformation, V,To transform v

10、ertices, use this matrix:And you get this:,Canonical View Volume,A standardized viewing volume representationParallel (Orthogonal) Perspective,1,-1,-1,Front Plane,Front Plane,Back Plane,Back Plane,x or y = +/- z,Why do we care?,Canonical View Volume Permits Standardization Clipping Easier to determi

11、ne if an arbitrary point is enclosed in volume Consider clipping to six arbitrary planes of a viewing volume versus canonical view volume Rendering Projection and rasterization algorithms can be reused,Projection Normalization,One additional step of standardization Convert perspective view volume to

12、 orthogonal view volume to further standardize camera representation Convert all projections into orthogonal projections by distorting points in three space (actually four space because we include homogeneous coordinate w) Distort objects using transformation matrix,Projection Normalization,Building

13、 a transformation matrix How do we build a matrix that Warps any view volume to canonical orthographic view volume Permits rendering with orthographic camera,All scenes rendered with orthographic camera,Projection Normalization - Ortho,Normalizing Orthographic Cameras Not all orthographic cameras de

14、fine viewing volumes of right size and location (canonical view volume) Transformation must map:,Projection Normalization - Ortho,Two steps Translate center to (0, 0, 0) Move x by (xmax + xmin) / 2 Scale volume to cube with sides = 2 Scale x by 2/(xmax xmin) Compose these transformation matrices Res

15、ulting matrix maps orthogonal volume to canonical,Projection Normalization - Persp,Perspective Normalization is Trickier,Perspective Normalization,Consider N=After multiplying: p = Np,Perspective Normalization,After dividing by w, p - p,Perspective Normalization,Quick Check,If x = z x = -1 If x = -z

16、 x = 1,Perspective Normalization,What about z? if z = zmaxif z = zminSolve for a and b such that zmin -1 and zmax 1 Resulting z is nonlinear, but preserves ordering of points If z1 z2 ,then z1 z2,Perspective Normalization,We did it. Using matrix N Perspective viewing frustum transformed to cube Orth

17、ographic rendering of cube produces same image as perspective rendering of original frustum,Color,Next topic: ColorTo understand how to make realistic images, we need a basic understanding of the physics and physiology of vision. Here we step away from the code and math for a bit to talk about basic principles.,

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 高等教育 > 其它相关文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号