Advertisement

openGL Animations/Bones/Multiple Armour

Started by April 22, 2014 01:12 PM
1 comment, last by swiftcoder 10 years, 9 months ago

Hi, I have a few questions and was hoping you could help point me in the right direction.

I basically want to create a 3D Model/Character in a game that can load different armours.

I'm thinking the best way is to use some kind of bone structure/system as keyframes on verticies would be a pain to update, if for example someone wanted to change the animation slightly all armour would need re-exporting too.

If I use bones I could load the bones and mesh seperately and have it calculated in-game. Then only the bone needs updating and all armours will update accordngly when used. (Im assuming I'm thinking of this correctly).

My problem is I don't really know where to start. It would be great if you had some resources/info on this subject. Preferably using Blender/openGL/C++.

Or if you don't have any resources perhaps you could answer some questions:

  • Can bones be exported seperately from mesh in Blender (if so any idea how?)
  • What is the best format to store all this information. I know .obj doesnt support bones so thats out
  • Am i going about this the right way (for multiple armour/gear) or is there another way to think about this

I'd really love a tutorial or something though. Anyway any kind of help is appreciated! So Thanks.

There is no universal "best". It depends on the engine and the technologies available to you.

When I worked on The Sims where individual characters could be deformed for weight, height, and other factors, the engine would merge the clothing and generate a custom model for every outfit. This works well for the game since there can be a large number of variously-clothed individuals and we don't have time for more than a single pass.

I have worked on other titles where the characters are fixed, they would simply be drawn individually and in order. In Littlest PetShop, if a bunny was wearing a hat it would draw the bunny, then transform the hat's origin to the bone on the head, and draw the hat separately. It required more processing but we had plenty of processor power to spare.

As for the other questions, yes, bones can be separated out in Blender. They are called an armature, and like all objects you can use external links. Often an armature will be shared among many models so the animators need to just do it once. The best format is entirely up to your tool chain for your game.

For the last one, usually there are bones or other markers used as reference points. You might parent an object to a character's right hand, so the object's origin will be set to the final transformed position of the hand bone.

Advertisement


What is the best format to store all this information. I know .obj doesnt support bones so thats out

"Best format" is generally not a productive question in game development, since most teams roll their own runtime formats.

Typically one would either write a plugin for blender to export to the format you define, or export to a 'standard' format like COLLADA and convert that to your own format.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

This topic is closed to new replies.

Advertisement