Monday 20 January 2014

HA4 Task 2 - Displaying 3D Polygon Animations

How are 3D models displayed? Describe and explain what an API and a Graphics pipeline are.


Remember that you are trying to comprehensively explain the theory and applications of 3D with elucidated examples and consistently using subject terminology correctly.

API


Application program interface also referred to as API, is a set of routines, protocols, and tools for building software applications. A good API makes it easier to develop a program by providing all the building blocks. A programmer then puts the blocks together.




Operating environments, such as Microsoft's Windows, provide an API so that programmers can write their own applications consistent with the operating environment. Although APIs are designed for programmers, they are ultimately good for users because they guarantee that all programs using a common API will have similar interfaces. This makes it easier for users to learn new programs.

Direct3D


Direct 3D is an API for Displayed and Manipulating 3D Objects. It was developed by Microsoft, Direct3D provides programmers with a way to develop 3-D Programs that will utilize whatever graphics acceleration device is installed on the machine. All 3-D Accelerator cards for PCs support Direct3D.
http://www.webopedia.com/TERM/D/Direct3D.html
http://www.ozone3d.net/public/jegx/201006/directx-logo.jpg


OpenGL
OpenGL is a 3-D graphics language developed by Silicon Graphics. There are two main implementations: Microsoft OpenGL which was developed by Microsoft and Cosmo OpenGL which was developed by Silicon Graphics. Microsoft OpenGL was built into Windows NT and is Designed to improve performance on hardware that supports the OpenGL Standard. Cosmo OpenGL, on the other hand, is a software-only Implementation specifically designed for machines that do not have a graphics accelerator.

Graphics Pipeline

In 3D computer graphics, the terms graphics pipeline or rendering pipeline most commonly refer to the way in which the 3D mathematical information contained within the objects and scenes are converted into images and video. The graphics pipeline typically accepts some representation of a three-dimensional primitive as input and results in a 2D raster image as output. OpenGL and Direct3D are two notable 3d graphic standards, both describing very similar graphic pipelines.

Stages of the graphics pipeline


Per-vertex lighting and shading


In a complete 3D scene the the light is defined location of the light sources, reflectance, and other surface properties. Most older hardware implementations of the graphics pipeline compute lighting that is only at the vertices of the polygons that are being rendered. The lighting values between vertices are then interpolated during rasterization. Per-fragment or per-pixel lighting, as well as other effects, can be done on modern graphics hardware as a post-rasterization process by means of a shader program. Modern graphics hardware also support per-vertex shading using vertex shaders.

Clipping

Geometric primitives that now fall completely outside of the viewing frustum will not be visible and are discarded at this stage.

Projection Transformation


If you are using a perspective project, objects which are distant from the camera are made smaller. This is created by dividing the X and Y coordinates of each vertex of each primitive by its Z coordinate which represents its distance from the camera. If there is an orthographic projects, objects retain their original size regardless of distance from the camera.

Viewport Transformation

Post-clip vertices are transformed once again to be in window space.To do this it is very simple: Apply a scale (Multiplying by the width of the window) and a bias (adding to the offset from the screen origin). At this point, the vertices have coordinates which directly relate to pixels in a raster.

Scan Conversion or Rasterisation

Rasterisation is the process by which the 2D image space representation of the scene is converted into raster format and the correct resulting pixel values are determined. From now on, operations will be carried out on each single pixel. This stage is rather complex, involving multiple steps often referred as a group under the name of pixel pipeline.

Texturing, Fragment Shading

At this stage of the pipeline individual fragments (or pre-pixels) are assigned a color based on values interpolated from the vertices during rasterization, from a texture in memory, or from a shader program.

Display

The final colored pixels can then be displayed on a computer monitor or other display.

http://en.wikipedia.org/wiki/Graphics_pipeline
http://www.iamthomasvogel.de/wp-content/uploads//graphics_pipeline.jpg

No comments:

Post a Comment