































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A chapter extract from the book '3D Graphics for Game Programming' by J. Han. It covers the concepts of vertex processing, spaces, transforms, and affine transforms in computer graphics. The chapter explains the main stages of the rendering pipeline, the role of vertex processing, and the use of affine transforms for scaling, rotation, and translation. It also provides examples and explanations of homogeneous coordinates, world transform, view transform, and projection transform.
Typology: Study notes
1 / 39
This page cannot be seen from the preview
Don't miss anything!
































3D Graphics for Game Programming (J. Han)
§ Main stages in the pipeline § The vertex processing stage operates on every input vertex stored in the vertex buffer and performs various operations such as transform. § The rasterization stage assembles polygons from the vertices and converts each polygon into a set of fragments. (A fragment refers to a set of data needed to update a pixel in the color buffer. The color buffer is a memory space storing the pixels to be displayed on the screen.) § The fragment processing stage operates on each fragment and determines its color. § In the output merging stage, the fragment competes or combines with the pixel in the color buffer to update the pixel color.
§ Typical operations on a vertex § Transform - This chapter § Lighting - This chapter and Chapter 5 § Animation - Chapter 11 § Transforms at the vertex processing stage § World transform § View transform § Projection transform.
§ The world and view transforms are built upon affine transforms. § Affine transform § Linear transform § Scaling § Rotation § Translation § Scaling examples in 2D § If all of the scaling factors, sx , sy , and sz , are identical, the scaling is called uniform. Otherwise, it is a non-uniform scaling. 1 2 2 2 1 1 2 4 (-1,-1) (-2,-1) (-1,-1/2) (-2,-2) ( sx , sy )=(2,1) ( sx , sy )=(1,1/2) ( sx ,^ sy )=(2,2)
§ 3D rotation about z - axis ( Rz ) § 3D rotation about x - axis can be obtained through cyclic permutation, i.e., x- , y- , and z- coordinates are replaced by y - , z - , and x - coordinates, respectively. § One more cyclic permutation leads to 3D rotation about y - axis.
§ Translation does not fall into the class of linear transforms, and is represented as vector addition. § We can describe translation as matrix multiplication if we use the homogeneous coordinates. Given the 3D Cartesian coordinates ( x , y , z ) of a point, we can simply take ( x , y , z , 1) as its homogeneous coordinates. § The matrices for scaling and rotation should be extended into 4x4 matrices.
§ A model is created in its own object space. The object space for a model typically has no relationship to that of another model. § The world transform ‘assembles’ all models into a single coordinate system called world space.
§ When we successively rotate an object about the x - , y - , and z - axes, the object acquires a specific orientation.
are combined into one, it is called Euler transform.
§ The world transform has been done, and now all objects are in the world space. § Next step: camera pose specification § EYE : camera position § AT : a reference point toward which the camera is aimed § UP : view up vector that roughly describes where the top of the camera is pointing. (In most cases, UP is set to the y - axis of the world space.) § Then, the camera space , { EYE , u , v , n }, can be created.
§ A point is given different coordinates in distinct spaces. § If all the world-space objects can be newly defined in terms of the camera space in the manner of the teapot's mouth, it becomes much easier to develop the rendering algorithms. In general, it is called space change. § The view transform converts each vertex from the world space to the camera space.
§ Orthonormal basis = an orthogonal set of unit vectors § The camera space has an orthonormal basis { u , v , n }. § Note that u ⋅ u = v ⋅ v = n ⋅ n =1 and u ⋅ v = v ⋅ n = n ⋅ u =0. orthonormal standard non-orthonormal non-standard orthonormal non-standard
§ The coordinates of p are (1,1) in the world space but (-√2,0) in the camera space. § Let’s superimpose the camera space to the world space while imagining invisible rods connecting p and the camera space such that the transform is applied to p. § As the camera space becomes identical to the world space, the world-space coordinates of p" can be taken as the camera-space coordinates. translation by (-2,-2) rotation by^ -^45 º