API
Games use software known as an API (Application Programme Interface) which is a set of tools for building software applications a good API makes it easier for the software to be developed as it gives you all the building blocks you need to make the software you're trying to make.
The Graphics pipeline
The graphics pipeline is the way that a computer transferees the mathematical data that it has on the object into the object that we see on the screen the 3D graphics pipeline typically takes a 3D object when it's in data and converts it into a 2D raster image Open GL and direct 3D both have very similar graphics pipelines
Stages of the graphics pipeline
First the scene is created out of geometric primitive shapes this is usually done using triangles as they are good for this as they always exist on a single plane.
After this stage comes the modelling
Modelling and Transformation
This stage transforms the local objects consternates into the 3D world coordinate system
Next it transforms the 3D world Coordinates into 3D Camera Coordinates with the camera as the origin
Illuminates according to the lighting and reflectiveness of the object for example if the room as pitch black the objects will be seen as black
This stage transfares the 3D coordinates into a 2D view of the camera a object further away from the camera looks smaller and one's that are closer up look larger this is caused by the x and y coordinates of each of the objects being divided by it's z coordinate (this represents it's distance from the camera) in orthographic projection objects retain there original size regardless of distance from the camera



No comments:
Post a Comment