Monday, 20 January 2014

HA4 Task 2 - Displaying 3D Polygon Animations

In this segment of m assignment I will be discussing how 3D models are displayed, what API is and how a Graphics Pipeline works. I will also be including information on what the rendering process is and what it involves. 

For a model to be displayed, it has to go through a process in 3D software using mathematical information, rendering. Graphics rendering is the central processing unit that tells the graphics processing unit what to render, such as textures, lighting and shadows.

API

Game engines use software known as  API (application programming interface) which is a set of actions and tools for building software applications, API's makes it easier to develop programs by providing all the necessary tools so someone can create whatever they wish with the 3D software.

Below is an image of a game engine including is own API which can be manipulated of the creation of games by an individual or team.

http://www.ferdthenerd.com/wp-content/uploads/2012/05/UDK-Dev-1024x640.png

When some developers create games, they sometimes create their own engine from scratch so the tools in which they used to create the game are more exclusive and a game is more unique. 

Direct3D

One example of an API is Direct3D. This is an API used to manipulate and display 3D objects, Direct3D provides programmers with a way to create 3D programs that utilize the graphics of an individuals  machine, nearly all PC's support Direct3D.

http://www.codesampler.com/d3dbook/chapter_05/chapter_05_files/image010.jpg

OpenGL
OpneGL is another example of an API, this particular API is a 3-D graphics language developed by Silicon Graphics. OpenGL is a cross language, multi-platform application programming interface  for rendering 2D and 3D graphics. The API is typically used to interact with a GPU (graphics processing unit), to achieve hardware-accelerated rendering of a high quality. 
http://images.anandtech.com/doci/6134/OGLGenerations.jpg

Graphics Pipeline
http://blog.shengbin.me/images/2013-11-03-opengl-concepts.png 

Graphics pipelines are the way in which the 3D mathematical information contained within objects in scenes are converted into objects and videos. The input of a pipeline is a 3D model and the output is a 2D raster image. 

Stages of the Graphics Pipeline

3D Geometric Primitives
A scene is created out of geometric primitives, usually this is done using triangles, which always exist on a single plane.

Modelling and Transformation
Transform from the local coordinate system to the 3D world coordinate system.

Camera Transformation
Transform the 3D world coordinate system into the 3D camera coordinate system, with the camera as the origin.

Lighting
Illuminate according to lighting and reflect. If an object is completely white but in a totally black room, then the camera sees it as black, the effect of lighting and reflections are calculated to create the final output. 

Projection Transformation
Transform the 3D world coordinates into the 2D view of the camera, he camera object is centered in the 2d view of the camera. In the case of a Perspective projection, objects which are distant from the camera are created smaller. This is achieved by dividing the X and Y coordinates of each vertex of each primitive by its Z coordinate to create the final outcome. 

Clipping
Geometric primitives that fall completely outside of the view will not be visible and are destroyed, meaning they no longer exist. 

Scan Conversion or Rasterization
Rasterization is the process in which a 2D image space representation of a scene is converted into raster format and the correct resulting pixel values are determined fro this infomration. Operations will then be carried out on each single pixel to create the final outcome. 

Texturing, Fragment Shading
At this stage of the pipeline pre-pixels are assigned a color based on values from the vertices during the rasterization process, from a texture in memory, or from a shader program.

Display
The final coloured pixels can then be displayed on a computer monitor or other display.
http://techpubs.sgi.com/library/dynaweb_docs/linux/SGI_Developer/books/Perf_PG/sgi_html/figures/04.1.pipe.single.gif

The graphics pipeline process is also known as the rendering process, it describes the rendering process of an asset, leading to its final outcome, a fully rendered asset, featuring appropriate lighting and calculations. An asset must be rendered to be at its optimum visibility and standard. 

No comments:

Post a Comment