What Is an OpenGL® Animation?

Article Details
  • Written By: Eugene P.
  • Edited By: Angela B.
  • Last Modified Date: 07 November 2019
  • Copyright Protected:
    Conjecture Corporation
  • Print this Article
Free Widgets for your Site/Blog
Scientists use the term "boring billion" to describe when evolution stalled and life on Earth was basically slime.  more...

November 12 ,  1927 :  Joseph Stalin became the leader of the Soviet Union.  more...

OpenGL® animation is a general term applied to any scene that has objects moving within it and is rendered utilizing the OpenGL® libraries. From a programming perspective, there are several methods that can be used to create an OpenGL® animation. Within a more computer graphics oriented view, an OpenGL® animation can be any animated sequence that was rendered with OpenGL®, whether the scene was generated inside program source code or within a standalone modeling program. There are several types of animations that can be done with OpenGL® and other supporting libraries, but two of the most used are keyframe animation and skeletal animation.

The most basic type of OpenGL® animation simply involves moving an object through a scene. This is usually done by changing the location of each of the vertex coordinates equally, translating them slowly toward the desired position. The position of the camera in a scene also can be changed to create an animation effect, although the entire scene will remain static in this case. This basic form of animation is frequently used in two-dimensional (2D) programs in which the objects are just placeholders to display textures.


Keyframe animation is a much more complex process. This form of OpenGL® animation involves taking a model that has been loaded into the scene and moving it incrementally toward another position, called a keyframe. One example is a model of a hand waving. The initial position of the hand is compared to another model, or keyframe, of animation in which the hand is fully extended. The averaging and incremental movement of the hand creates the animation without the need to store the position of the hand in each increment along the path.

Another type of OpenGL® animation is known as skeletal animation. This involves creating a model, usually of an articulated human or animal, and then creating a type of bone structure inside the model. Each of the bones is attached, virtually, to the surrounding vertices of the model. The bones exert a certain force, or weight, on each vertex so that when the bone itself is moved, the surrounding model reacts and the mesh that makes up the "skin" of the model deforms. This type of animation takes time to create but can provide very lifelike movements when done correctly.

An OpenGL® animation relies both on the model created to be animated and on the way a program performs the animation. The most used way is to render frames of animation to an off-screen area known as a buffer before being drawn to the visible screen. This allows the image to be drawn in its entirety without the user having to watch it if it is too slow. Many computer programs that use OpenGL® animation also need to make sure they maintain a consistent frame rate to prevent jumpy animations, which is accomplished by timing each frame drawn and either waiting or speeding up the rendering process.


You might also Like


Discuss this Article

Post your comments

Post Anonymously


forgot password?