2013年8月15日 星期四

Computer Graphics---Beginners_Chapter1.2_E

Polygon-mesh representation is the one of the general modeling methods. The basic idea is that using the triangle meshes to construct the shape of the scene’s object as shown in Figure 1.

File:Dolphin triangle mesh.png
Fig. 1
For example, we have to know which triangles make up the square and these triangles that are made up from which edges respectively. Finally, we also have to know these edges are constructed from which vertices as shown in Figure 2.
Fig. 2


Consequently, we should have the information of vertex, edge and face for a triangle. All the above information need to be store in a data structure. In order to efficiently develop, there are some common formats for storing these data such as the “OBJ” file format shown in Figure 3. In the gray block, the small letter v represents a vertex, and the three numerical values behind it are the coordinate of it in three dimensions. 

Fig. 3

Letter vt depicts the texture coordinate uv of a vertex. This coordinate can be used to map the corresponding pixel’s color in the texture map as shown in Figure 4

Fig. 4


Letter vn describes the normal vector of a vertex and be used to compute the lighting interaction. Letter f represents a face that is made up from which vertices, and these vertices have their corresponding normal vectors and texture coordinates. We also can define the materialof the model to simulate the rough skins and the glossy feeling. These information are placed in the ”mtl” file.

However, if only has model information, it is not sufficient to synthesize the realistic image. We need to set up the lighting information to illuminate the model and the observer ( camera) to receive the reflective radiant flux .We also have to decide the position of the screen for displaying the final result. We can use the Graphics API such as OpenGL and Direct3D to finish the above operations as shown in Figure 5. The further introduction of the rendering processing in current graphic hardware will appear in next part.

Fig. 5



沒有留言:

張貼留言