Advices about 3D animated character programming.

Started by
0 comments, last by RobTheBloke 10 years, 11 months ago

Hello there.

I'm working on a mobile 3D game, and I'm encountering difficulties about the animation of my meshes.

The game is about giant robot battles, something between Mechwarrior and Gundam. I'm willing to have humanoïde robots fighting each others, in third person view, with cool animations enhanced by physics and ragdoll.

I'm using Bullet physics, along a custom multi-platform engine allowing me to work on Windows and produce for Android (and later iPhone). The 3D part work with openGL ES 2. The main way to import stuff is through xml, wich will be compiled as binary for the distribution app.

The game will be only multiplayer. The gameplay and physics will be computed on a remote server, the client will use physics for the particle effects and ragdoll.

My main issue is :

1°) What to choose to animate my robots : A) Mesh interpolation, B) rigged character or C) skinned character?

A) Mesh interpolation would cost a lot of memory, and I couldn't use VBO (or could I?)

B) Rigged character, well maybe the name is not well choosed but as I think it, is about linking static meshes together and moving them following some kind of skeletal laws. It is different from Skinned as I will load the static meshes as VBO and use matrices to move them. It could be done thanks to the robots stuff, wich I can compose of solid parts.

C) Skinned character, it could allow me to add some wires and deformable stuff on the robots, but won't it cost a lot more CPU to compute the models each frames?

2°) How to implement it?

I'm doing my own 3D engine with OpenGL ES 2, following some books and taking my inspiration from Irrlicht. I kind of understand the way to use matrixes, but each A, B or C system have its own way, so I would need some tips to implement the one I choose.

3°) How to prepare my workflow to create the animations?

Here is the tricky part. So far, I'm using COLLADA to import my 3D meshes from 3DS Max, but the way max manage the animations, I feel it will be awefull to process. (Like only one animation per .max, or using some dirty tricks...) But writting something like an animation editor, with its 3D view, importing meshes and rigging them together will be a huge work as well. For this, I'd like some advice or returns of people who got some experience in this domain.

Advertisement

1. B, or C, or a mix of both (the underlying animation system will be the same for both). A would be a waste of memory.

2. store Position + Quaternion keyframes (in local space), interpolate to get the (local space) transform for each bone at a given time, traverse down the bone hierarchy accumulating the world space transforms as you go.

3. Collada files -> custom tool (that extracts the bones you need from each file, and write the animation data to your own file format). Load your simplified file format in your game. This is always the most tedious job.

This topic is closed to new replies.

Advertisement