Category: 

What Is an OpenGL® Animation?

Article Details
  • Written By: Eugene P.
  • Edited By: Angela B.
  • Last Modified Date: 17 September 2016
  • Copyright Protected:
    2003-2016
    Conjecture Corporation
  • Print this Article
Free Widgets for your Site/Blog
The atmosphere of Jupiter's moon Io collapses every time it is eclipsed by the planet.   more...

September 29 ,  2008 :  The Dow Jones Industrial Average experienced its largest one-day drop in history.  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.

Ad

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.

Ad

You might also Like

Recommended

Discuss this Article

Post your comments

exception 'Exception' with message 'error writing captcha: Duplicate entry '2147483647' for key 'PRIMARY'' in /ssd/www/wisegeek/public_html/_core/classes/public/Captcha.php:44
Stack trace:
#0 /ssd/www/wisegeek/public_html/_core/controls/public/ControlDiscussionPostBox.php(324): Captcha->createCaptcha()
#1 /ssd/www/wisegeek/public_html/framework/classes/Control.php(104): ControlDiscussionPostBox->preRender(false)
#2 /ssd/www/wisegeek/public_html/framework/classes/Control.php(149): Control->render()
#3 /ssd/www/wisegeek/public_html/tpl/default-nocustom-lu/pages/public/article/article.htm(526): Control->__toString()
#4 /ssd/www/wisegeek/public_html/framework/classes/Control.php(300): require('/ssd/www/wisege...')
#5 /ssd/www/wisegeek/public_html/framework/classes/Control.php(309): Control->requireTpl('pages/public/ar...', Object(PageArticleCom), true)
#6 /ssd/www/wisegeek/public_html/framework/classes/Control.php(131): Control->renderTpl('pages/public/ar...', Object(PageArticleCom))
#7 /ssd/www/wisegeek/public_html/framework/classes/FormDataControl.php(87): Control->renderTemplate()
#8 /ssd/www/wisegeek/public_html/framework/classes/Control.php(109): FormDataControl->renderTemplate()
#9 /ssd/www/wisegeek/public_html/framework/classes/ScriptPage.php(50): Control->render(false)
#10 /ssd/www/wisegeek/public_html/framework/classes/Control.php(149): ScriptPage->render()
#11 /ssd/www/wisegeek/public_html/framework/classes/Page.php(97): Control->__toString()
#12 /ssd/www/wisegeek/public_html/_core/classes/public/PublicFrontController.php(443): Page->processRequest()
#13 /ssd/www/wisegeek/public_html/_core/classes/public/PublicFrontController.php(7): PublicFrontController->renderPage()
#14 /ssd/www/wisegeek/public_html/index.php(11): PublicFrontController::run()
#15 {main}