Tuesday, August 13, 2019
Graphics and Games Essay Example | Topics and Well Written Essays - 1000 words
Graphics and Games - Essay Example However it has a merit in that the processes involved in generating images are flexible. It is more or less like a graphics assembly language whereby there is the possibility of combining the pieces of the softwareââ¬â¢s functionality as building blocks to create innovative graphics. Another aspect of the software is that its specifications are not pixel exact. There are high possibilities of two OpenGL unlikely rendering the same graphics. As a result, the software can be implemented in a range of hardware platforms. Exact specifications would limit hardware acceleration, and further its standard applicability. In the single implementation, lack of pixel exactness persists. The divergent paths through implementation generate different fragments. Despite this, the specifications do not allow for a set of invariance rules guarantee repeatable actions in various circumstances. Features in OpenGL Features existing in OpenGL are Lighting, Shading, Material and Texture Mapping. This pa per will limit its discussion to Lighting and Shading in the programming perspective. Lighting Since light is a science and an art, there are many techniques of creating magnificent light in computer graphics. Through the design of OpenGL software, the lighting system approximates light behavior in a simple and efficient fashion. It fits best for computer games since it is possible to render light in real-time. Its lighting does not calculate reflections and scattering of light. At the same time, no shadows are produced. Lighting effects are achieved through textures, shadow mapping and shaders. Practically, light is present everywhere as objects too, react differently in the presence of light. Since light works with materials and has impact when a surface reflects it, OpenGL optimizes on this. Through its functions, it can define the characteristics of surfaces. The definitions focus on; what is the color of the surface now? And how much or little light does the surface reflect? Th ese material properties describe surface. The software applies default material values until the programmer specifies his or her own settings. The following are the lighting effects supported by OpenGL; directional, Spot, Ambient lights and attenuation. Lighting in OpenGL is defined by the Lighting and Shading models. Before any setting is done, lighting mode is enabled since it requires enabling of the depth buffer. The glEnable is a function that enables several features in OpenGL and one of the features is lighting. This feature becomes the input parameter but still light will be required. Since the software has a direct support for approximately 8 lights, a light has to be enabled through a call. A disabling function is also available to disable unwanted light functions during programming. During programming, there are two types of light properties to be considered; one that describes a light source and the other that describes light reflected by the material of an objectââ¬â ¢s surface. This is specified by the function glLightfv. The light attenuation feature is responsible for reducing light intensity in relation to distance. It states the real-world policy that light intensity decreases with distance. During the operation, the position of the source of light must be specified (Ahmed, 2009 pp.1-2). Shading In the shading model, the function call glShadeModel
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.