Jump to content
  • Advertisement
  • entries
  • comments
  • views

Adding skinned meshes to Caveman

Sign in to follow this  
Norman Barrows


Adding skinned meshes to Caveman

A quick update since i haven't posted anything in a while.

I'm busy adding skinned meshes to the game.

When i started working on the game, i was not sure if i could draw the required number of skinned meshes on the target platform, so i used rigid body models to start with.

Now that i'm putting the final whammy on graphics, i decided to give skinned meshes a try.

A test run of the DX9 multianim sample showed the code could draw the required number of characters onscreen at once on the target platform.

So I turned the code from tiny.cpp into a skinned mesh library, got the dx9 animation controllers working, and figured out how to get blender and directx to work together.

You can take a look at the code here:

I'm able to share skeletons in blender, share animations via a batch file of copy+ commands, and the code has been designed to share meshes, textures, and materials. meshes, textures, materials, and controllers are all pooled.

The first thing i did was a test routine in the game to test the drawing of 100 characters onscreen at once with individual animations.

so far i've made all the human models and all the movement animations, and they are all up an running in the game.

i also added "change character appearance" to the playtest menu, allowing you to change a band member's appearance (even sex) at any time. This was required to assign new skinned mesh values for the band members in the long term playtest game.

attack animations are the next step. and then comes drawing weapons in hand, and equipment which is worn. i hope to simply attach all equipment to a bone, but i may need to animate some with the skeleton, the way i do for bra and loincloth. even attaching to a bone, i'll probably need a fixup transform on a per object basis to position it precisely with respect to a bone. and there are 65 kinds of weapons....

and then comes action animations.

and then comes skinned mesh animals... i'm going to be busy for a while!

actually, its going faster than anticipated. about 2 weeks to figure out dx skinned meshes. about 1 week for coding - really only about 3 days work there. another week or so to figure out blender. perhaps a week to do the meshes - there's basically just two, a male and female, 5 versions of each with different facial features and shared skeletons and animations. animations are taking about 30 minutes each on average to create, add to the game, test, and fix as needed.

i think there are only about a dozen attack animations per sex. and two to three dozen action animations. maybe a week's worth of work there.

for animals, i hope to use a few basic skeletons (such as quadruped) scaled to various body meshes, with shared animations. i think i'll be able to share animations between similarly scaled quadrupeds. so maybe one set for large quadrupeds, and one for small. each animal will only need about half a dozen animations. but there are fifty of them....

i don't plan to release a new beta until i have at least the attack and a few placeholder action animations in, as well as drawing weapons and equipment. The current demo expires soon, so there may not be a demo available for a while while i make the necessary changes.

once attack and weapons are in, i'll post a new demo, then move on to doing more action animations and skinned mesh animals.
Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!