Animate Car Exterior Parts?


Hello everybody,

I’m quite new to graphical programming and OpenGL and would like to ask the following:
Is it possible to somehow make the doors, hood and trunk of this car model animate with open/close actions?

I see it’s written “Animation: No” in the description but I’m having a hard time finding any model that supports animation according to its description. Should the model specifically or it’s possible to somehow create it myself?
I searched for video tutorials and so on but found none for what I need.

I should create this project in the next two weeks so any help is greatly appreciated, even if it means using a different 3D car model or even a different car model than a Dodge Charger.

Hope anyone can shed some light on this :slight_smile:


Without editing the model in a 3D modeling package? Depends on how the model is constructed.

I’m not famiilar with that site, but a few words about “Rigged” and “Animated”. These are terms that often refer to “Skeletal Animation”. Generally, “Rigged” means the model has been fitted to a joint skeleton to which animations can be applied (by changing the joint transforms). “Animated” sometimes means that, not only has the model been “Rigged” but that pre-defined animation sequences (keyframes of joint transforms for the joint skeleton) have been generated to animate the model through a sequence of named animation sequences. With these, and software that supports rendering such models, you can animate the model through these predefined animation sequences at-will.

I don’t know what your requirements and scope are. But (in the absense of that) you could find a simple (non-rigged, non-animated) model with an obvious joint, segment the model’s vertices and faces into its 2 (or 3) distinct pieces, and then apply a simple animation to those parts.

Alternatively you could load a rigged and animated model and play the joint transforms. However, I’d at least be hesitant about this latter as the learning curve for skeletal animation is pretty steep at the beginning.

Consider using an asset import library like Open Asset Import Library to accelerate the loading piece of this, as well as tutorials to get a kick-the-tires test up and running quickly (e.g. this one).


Bear in mind that mechanical constructs typically don’t need skeletal animation. They can be decomposed into sub-objects (e.g. body, hood, trunk, doors) such that each sub-object can transformed as a whole.

Skeletal animation is used for objects where different vertices within a connected mesh of triangles can be transformed independently. This is typically used for people or other “organic” entities with a flexible skin attached to an articulated skeleton.

Skeletal animation is more general, so a system which supports skeletal animation can be used for both types of model. Transformation hierarchies can only handle the former.


Right. That’s what I was trying to suggest (possibly poorly) with “find a simple (non-rigged, non-animated) model … and then apply a simple animation to those parts.”

The tricky part comes with things like this car, where you might want to animate the door opening and closing. It’s possible (especially since this model isn’t animated) that the side edges of the car door and door recess in the car frame for this model weren’t modeled such that you could just rotate the door polygons out of the way and not see holes the model. You might have to augment the existing model by adding those interior faces to preserve the illusion of a 3D model.

Unless you have 3D modeling skills, I’d look for simple models where you can pretty well gauge by appearance whether they’re going to work for you. Alternatively, look for models pre-modeled into separate parts that you can just “snap together” to generate your animated model.

True, though it can also be used for animating rigid body shapes like a car door opening as well (as you said below). There are advantages to having the same animation interface across both.

I think I see what you’re trying to point out (Rigid Body Animation), but terming it “transform hierarchy” can lead to confusion.

Just for the OP’s benefit (I know you understand this GClements): Both techniques make use of “transform hierarchies”. In fact, that’s exactly what the joint skeleton is in skeletal animation. A hierarchy (tree) of transforms, where the nodes in that tree are called joints. Beyond this foundation…

In basic “Rigid Body Animation”, each of the faces in the model’s geometry is tied 100% completely and totally to 1 (and only 1) node in the transform hierarchy. This is the classic “robot animation” example often used as an OpenGL 101 programming assignment. Each geometry part (group of faces) is assigned to one node in this transform tree. For rendering, once you’ve activated the composite transform for a transform node, you just draw the part’s geometry. No fancy shader tricks required for transforming the geometry here.

A step up from that technique in fidelity is called “Simple Skinning”. Here we loosen up the requirements just a bit for how the model’s geometry is tied to nodes in the transform hierarchy. Now, instead of requiring all vertices of each face to be tied to 1 (and only 1) node in the transform heirarchy, we just require each vertex to be tied to 1 (and only 1) node in the hierarchy. However, different vertices within a face may be tied to “different” nodes in the hierarchy. This technique is useful as a stepping stone for understanding the next technique, but it has its shortcomings in animation quality.

Yet another step up from that is “Blend Skinning”. Here we allow each each vertex within the mesh to be tied to a “blend” of the transforms for N nodes (N often <= 4) in the transform hierarchy. For instance, a specific vertex’s position might be computed as 50% of node A’s transform and 50% of node B’s transform. When folks just say “Skeletal Animation” rendering, they often mean this (or a variant of it).

Just keep in mind: all of these make use of a transform hierarchy. The distinction is how the mesh geometry is attached to this hierarchy.

So to sum up:

  • Rigid Body Animation - Transform hierarchy with geometry attached to 1 node per face
  • Simple Skinning - Transform hierarchy with geometry attached to 1 node per vertex
  • Blend Skinning - Transform hierarchy with geometry attached to N nodes per vertex


I think I overestimated what I think I can do with this. If I can load any 3D model car and just display it, it would be great as that’s needed to pass the exam.
On a side note, if I am using a very old GPU from 2008, would that affect the ability to open OpenGL projects and so on? My Radeon 6970 died recently and got some old Radeon 4670 or something but cannot even open the example projects of my lecturer.

Thanks for the extensive answers and explanations, really appreciated. :slight_smile:


Looks like that supports OpenGL 3.3:

so it really just depends on what requirements your instructor places on the OpenGL driver implementation that you must use.


I don’t get it, if I use the nanosuit example model from or whatever it works, but when I use my own .obj model it shows gray screen. What could be wrong here?
I literally just changed the model and nothing else. The new model is smaller in size than the nanosuit one. I also searched for some premade .obj loaders but nothing that just worked came up - always errors I can’t fix (I fix one, 3 new come up) :frowning:
So I ended up using code from my instructor which doesn’t work when I change the model. The model is downloaded for free from the internet, also tried other models but same result - gray screen.


All ok now, I won’t be doing animation (at least not yet) but I loaded a few models and it’s going well. :slight_smile: