Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I have a PhD in Mathematics with some experience in C++ programming. I am very interested in computer animation, and would like to try to teach myself in C++.

My humble resources at the moment are: Borland Builder 6 and a Toshiba laptop with 1.49 GG of ram and a maths co-processor. Please give me as generous advise as you can, detailing what resources are essential, and if at all possible give me some idea of cost.

Finally, is it possible to integrate animation created in C++ in web design?

Thank you in advance for your help.

share|improve this question
1  
You have two questions here, one about how to do animation in C++, which is too broad and has tons of books written about it. The other question is integrating animation in web design, which depends entirely on what animation and what web design you're talking about. –  thedaian Feb 6 '12 at 18:22

2 Answers 2

First of all, I find merely impossible to learn a programming language without a clear project in mind. So you should first try to define more precisely what in computer animation you like. This is a vast domain containing (but not limited to):

  • Character animation;
  • Fluid simulation;
  • Crowd simulation;
  • Rigid bodies simulation;
  • etc.

Learn more about computer animation

Two books I found globally interesting:

  • Computer Animation Complete: All-in-One: Learn Motion Capture, Characteristic, Point-Based, and Maya Winning Techniques
  • Computer animation: algorithms and techniques

Learn C++ by yourself

I suggest you read:

  • Thinking in C++
  • The C++ Programming Language

Tools for C++ programming

Forget Builder 6... Then, it depends on which OS you are programming:

  • WINDOWS: Visual Studio express.
  • MAC OSX: XCode.
  • Linux: Eclipse + a lot of others...

Those are FREE and easy to start with for a non-programmer.

Hope this help.

share|improve this answer

Your question is very broad / not specific, but I'll take a stab.

Skinning

Are you wanting to animate 3d models? The most common approach to this is referred to as "skeletal animation," and essentially boils down to a lot of matrix multiplication. Each vertex in a model has one or more "bones" that it is influenced by, and the bones are connected to each other to form a "skeleton." Each bone has a 4x4 matrix that is used to describe its orientation relative to its parent bone. For example, an elbow bone might be the child of a shoulder bone, and the matrix of the elbow would express the elbow's orientation relative to the shoulder.

Each frame, you start with a single root node in the skeleton (perhaps the chest) and you assign the object's "world" orientation (another 4x4 matrix) to it. Then you traverse your graph of bones and multiply the bone's local orientation matrix by the parent bone's world matrix to get the bone's world matrix. This is often called the matrix palette.

Finally, each vertex in the model uses the matrices from one or more bones that it is "skinned" to to find its final location for the frame. For example, a vertex in the middle of ones leg would likely be influenced only by the leg bone, whereas a vertex near the shoulder might be influenced by two or more bones. Doing this would allow a model's arm to be raised while vertices near the shoulder would appear to "compress" (rather than fold into the upper body.)

Animation

Animation is generally achieved with keyframes in which the relative orientations of each bone are expressed. For example, an animation that depicts a model running might have a duration of 10 seconds and have keyframes every half second or so. To achieve a looping animation, the first and last keyframes can be identical. During playback of the animation, the skeleton will be "blended" between its nearest keyframes. This would have to take place before the world orientations of each bone are calculated.

Tools

There are free tools available for compiling C++, namely the Gnu Compiler Collection (GCC), as well as a free version of Microsoft Visual Studios. I'd recommend that you take advantage of a very recent version of one of these. I've been very pleased with GCC.

You might want to take a look at the video card that is available on your machine. You'll need something fairly recent to achieve some of animation techniques.

C++ and the Web

In part as a security measure, HTML is generally not capable of running native code, such as code written in C++. There are many different ways you could do 3d animation in the browser, perhaps the most interesting of which is WebGL (basically OpenGL bindings in Javascript.)

Note that there are other ways to do animation, and even skeletal animation can be achieved differently than described. For example, you can use quaternions to represent rotations instead of matrices.

share|improve this answer
    
HTML is generally not capable of running native code With the notable exception of NaCl (Native Client) but it's not as widely available as WebGL and you have to compile it for each platform. –  PeterT Feb 7 '12 at 10:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.