Xbox LIVE Indie Games
Sort Discussions: Previous Discussion Next Discussion
Page 1 of 1 (5 posts)

3D Animation Questions

Last post 6/25/2012 4:04 AM by Thromshall. 4 replies.
  • 6/22/2012 8:30 PM

    3D Animation Questions

    My end goal is to be able to take .x or .fbx files and render them and be able to call upon an animation (and use multiple animations per file so I don't have to split them).  I figure to do this it would be best to use a preexisting library.  I came accross Kilowatt and their example looks a lot like what I'm trying to do, so I'm thinking that I should aim towards being able to use that.  However, it is a little bit over my head so I'd like to know where I can start so that I can eventually work my way up to being where I would like to be.

    Where would be a good place to start that will take my knowledge of 3D animating in the right direction?  And is Kilowatts a good library to use or does somebody have a better suggestion?

    Thanks for any help offered!
  • 6/24/2012 1:13 PM In reply to

    Re: 3D Animation Questions

    Hi again.

    There are only three animation libraries for XNA that I am aware of. 

    Kilowatt animation library: http://www.enchantedage.com/node/24
    XNAnimation library: http://xnanimation.codeplex.com/
    Skinning Sample: http://xbox.create.msdn.com/en-US/education/catalog/sample/skinned_model
    The latter is not really a library but a starting point to build your own.

    There may be others built in to engines but I have not come across those.

    As far as tutorials go they are few and far between.  I have not really come across any.  I fumbled about in the dark for ages before I got my head round the way they work and I still have limited knowledge about the exact maths for bone transforms!

    I have probably learnt more about the structure of models from 3D modelling applications than I have from XNA.   The whole lot go hand in hand.  You need to understand shaders to know how the triangles are transformed when they appear on the screen.  You need to know what the bones are and how the bones link together and are transformed relative to their parent.  You also need to know about bone weights and how multiple weights can be applied from multiple bones.

    I wish I could tell you where to start but I don't know.  I started with the skinning sample because it was the simplest.
    None of the libraries have much in the way of documentation and none are intended as tutorials.

    Some other related samples that may be of interest:
    Skinning Sample extensions: http://xbox.create.msdn.com/en-US/education/catalog/tutorial/skinned_model_extensions
    Avatar animation blending: http://xbox.create.msdn.com/en-US/education/catalog/sample/avatar_animation_blending
    CPU Skinning sample: http://xbox.create.msdn.com/en-US/education/catalog/sample/cpu_skinning

    Thromshall:
    ...to take .x or .fbx files and ... (and use multiple animations per file so I don't have to split them).  I figure to do this it would be best to use a preexisting library...

    I'm guessing the comment in brackets is because of my previous post.  I'll expand further because I didn't make it clear that the FBX fault is outside of any of our control.  You would have to work round it.

    The FBX Importer is or at least was FAULTY in Windows phone SDK 7.1.
    It is writen by Microsoft as part of the XNA framework and which uses the official FBX importer written by Autodesk and neither of which you can change nor even distribute.  Please see this post to which someone from Microsoft replied and confirmed my findings that it was faulty:
    http://xboxforums.create.msdn.com/forums/p/93794/561812.aspx
    It may have been fixed in SDK 7.1.1 but I do not know.

    There are several work rounds for that which can be manual or automatic but all involve splitting the FBX, using some simple text Parsing code, Importing them individually and merging them back together.  This can all be automated within the Content Pipeline but I have not seen any complete samples or tutorials for doing this.

    I have written my own project which can help with some parts of this process but there is no documentation:
    http://code.google.com/p/3d-model-prep/
    There is also some extra code on the download tab supplied by C J Bailey which does the content pipeline splitting and merging.

    Now for one other problem with multiple animations in FBX files.  As far as I know, Blender is perhaps the only modelling programme to save multiple FBX animations in to one file.  I only use Blender so I am only going by what I have read about the other but the Autodesk products appear to only save one FBX animation.  Most artists just quote the frame numbers, from and to, for each animation within the single take!  You would need a way to know what those ranges were while importing to be able to separate the animations.

    The KW-Exporter might help with that but I do not know anything about that.

    The only alternative to FBX available within the XNA framework is DirectX (.X) but this is becoming less well supported so I don't know what results you will get.  My own experience was poor getting animations to work but I have read posts by others that prefer it.

    The alternative would be to write your own importer.  Which I think would be great but that is a massive undertaking.

    I've been working on Diabolical: The Shooter for over three years partly because I have had to learn things like 3D animation from scratch. 
    My blog might help a tiny bit: http://blog.diabolicalgame.co.uk/

    I hope this information sets your expectations and perhaps leads you in the right direction.

    Regards
  • 6/24/2012 1:16 PM In reply to

    Re: 3D Animation Questions

    I did reply to this but got a moderator warning.  Probably too many links.  Edit: See my post above.

    Until it's authorised you might want to see my blog: http://blog.diabolicalgame.co.uk/
    The reminders tab has some links to animation samples.

    Regards
  • 6/25/2012 1:41 AM In reply to

    Re: 3D Animation Questions

    Without telling us what your current level of knowledge, I don't know what the correct topics to read up on would be, so I'll just start with basics.

    In order to understand 3D animation, you first need to know some general 3D math basics...in particular, "spaces" (aka frames of reference) and how they are represented with matrices, as well as how to use those matrices to transform (move) points.

    This is the best link I found in a brief google search to get you started:

  • 6/25/2012 4:04 AM In reply to

    Re: 3D Animation Questions

    My current level of knowledge is limited.  I know 'what' an animation is, and that it uses math to 'transform' the model over time (with each frame).  But how to access those within XNA to use an animation within the model, that's completely foreign to me. 

    But thank you guys that should be some good material to get me started ;)

Page 1 of 1 (5 posts) Previous Discussion Next Discussion
var gDomain='m.webtrends.com'; var gDcsId='dcschd84w10000w4lw9hcqmsz_8n3x'; var gTrackEvents=1; var gFpc='WT_FPC'; /*<\/scr"+"ipt>");} /*]]>*/
DCSIMG