Saturday, April 7, 2012

3: Getting Multiple Animated Models Working



       Welcome back everyone! In this progress update, I tried to get multiple models into the scene that both contain animations. With the help of the Skinned Model Sample, I was able to process and render the animated models using the XNA Framework Content Pipeline. The sample shows how to use an added Animation Controller to animate the skinned dude.fbx character. The sample worked great but was limited in its ability to do much with blending between multiple animations. Blending helps smooth the transitions when one animation clip switches to another. So in the future, I am considering looking into the XNAnimation Libarary. These first two screenshots below were mistakes I made in the program. It took me forever to figure out why the player marine’s bone animation was getting mixed up with the beast animation in my program. I felt so silly when I realized that I was using the same AnimationPlayer variable in the beasts for the Marine character’s Draw Method.  




At last, I had it fixed and the bone animations for both models were no longer getting mixed up in the program. Success!




       This character marine model in the screenshot above was created by Carlos Augusto of Floatbox Studios. It was originally used for a demo at the SBGames 2007 Independent Games Festival under the XNA catagory and contributed to coming in third place. It was also used for the book published in 2008 "Beginning XNA 2.0 Game Programming". If you are interested in purchasing this book, I recommend buying the 3.0 version of the book. Click on this link here.

Melee WIP

       I haven't created a melee animation yet. For now I have coded a simple place-holder for the melee animation which simply rotates the gun model to the left side and then downwards so that the butt of the gun model moves towards the character to simulate a hit. To detect hit detection and basic collision, I will add bounding spheres to the character model at some point.



       This beast model in the picture above is a free 3D model you can use in your game projects which can be found at http://www.psionic3d.co.uk. I did not make this beast model or the player marine model just to be clear. The other models in the scene besides these are mine such as the ground, buildings and the gun model.



The is a work-in-progress screenshot above I captured of the I have hands and arms I was modeling for the gun. The fingers weren't rigged yet which is why they appear to be going through the gun model. 


       Next I will be working on some AI and starting out I won’t try to code anything too difficult as far as the AI goes. I’m still a beginner myself. Thanks for reading.

No comments:

Post a Comment