3 Replies - 2180 Views - Last Post: 20 August 2012 - 06:48 AM

#1 blindstone  Icon User is offline

  • D.I.C Head

Reputation: 21
  • View blog
  • Posts: 175
  • Joined: 17-August 11

XNA 3d Animation

Posted 19 August 2012 - 01:30 PM

So i've taken a bit of a break from my main game in java and started working on a small xna project. However I'm starting the animation process (3D) and cannot for the life of me figure out if when you load the model (.x format) how you can access the animation data from that x file. Going for keyframe animation. Is this possible to get the animation data without creating your own loader? or should I be going a different approach? Does anyone have good tutorials for this? Id be happy to check em out. Any tutorials that link to apphub however since they changed the site up, thoes links seems useless cause it just brings you to the splash page.

Thanks in advance!

Is This A Good Question/Topic? 0
  • +

Replies To: XNA 3d Animation

#2 BBeck  Icon User is offline

  • Here to help.
  • member icon


Reputation: 591
  • View blog
  • Posts: 1,317
  • Joined: 24-April 12

Re: XNA 3d Animation

Posted 19 August 2012 - 07:05 PM

You picked a really bad time to work on skinned annimation. As far as I know, the tutorial on App Hub is the place to learn this. And I just confirmed that they've got their links totally hosed up. So, the info just isn't out there anymore.

I haven't actually gone through that tutorial, but I've looked it over. And it seems there isn't any way to do key frame annimation without extending XNA's functionality quite a bit, and that's what that tutorial did.

I was pretty annoyed when I found out that you can't play annimations in XNA out of the box. You definately have to extend XNA a bit.

Although, you can do sub-mesh movements. So, if you had a car and it's wheels were a sub-mesh, you could rotate the wheels. That's not as complicated as skinned annimation where you're using bones and what not.

Also, I don't think you can use the annimations in a .X file, at least not if it came from Blender. When I was looking in to annimation, I discovered that you can only read annimations out of a Blender .fbx file.

This post has been edited by BBeck: 19 August 2012 - 07:08 PM

Was This Post Helpful? 0
  • +
  • -

#3 blindstone  Icon User is offline

  • D.I.C Head

Reputation: 21
  • View blog
  • Posts: 175
  • Joined: 17-August 11

Re: XNA 3d Animation

Posted 20 August 2012 - 02:28 AM

View PostBBeck, on 19 August 2012 - 07:05 PM, said:

As far as I know, the tutorial on App Hub is the place to learn this. And I just confirmed that they've got their links totally hosed up. So, the info just isn't out there anymore.
I've noticed this myself, pain in the arse >.<

View PostBBeck, on 19 August 2012 - 07:05 PM, said:

Also, I don't think you can use the annimations in a .X file, at least not if it came from Blender. When I was looking in to annimation, I discovered that you can only read annimations out of a Blender .fbx file.

Hmm thats good to know, does XNA load FBX files smoothly? Or do I need to write a script for that?
Was This Post Helpful? 0
  • +
  • -

#4 BBeck  Icon User is offline

  • Here to help.
  • member icon


Reputation: 591
  • View blog
  • Posts: 1,317
  • Joined: 24-April 12

Re: XNA 3d Animation

Posted 20 August 2012 - 06:48 AM

I have to think that Microsoft is going to clean up App Hub and get it working again. I'm chosing to be an optimist and thinking maybe they are in the process of rolling out the new development path and we'll find out what the future of XNA type development is soon. These are big changes to the website that seem to have a Windows 8 flavor to them. I think that bodes well because it suggests that Microsoft plans on continuing to support Indie game developers. And a new App Hub would seem to me to say that maybe they're finally ready to reveal more of their plans as to what's ahead.

XNA loads .fbx models as well as it loads .x models. From an XNA perspective, I'm not sure you can really tell the difference. Most of the "gotchas" I've encountered when loading .fbx models are problems created by Blender. I don't know what modeling program you'll be using, but Blender definately has some "gotchas". First of all, Blender uses different axes than XNA, so all the models import with the wrong orientation (think upside down). There are export checkboxes for XNA in Blender's .fbx exporter, but I haven't gotten really any of them to work. Amongst other things, they are supposed to rotate the models back to the correct orientation for XNA (I think). The only export option I've seen work is the strict XNA checking which makes the file size about 4 times smaller. The second "gotcha" is that you can scale a model in Blender and not have it scale. So, you scale your model larger in Blender, then you load it into XNA and it's still the original size. I finally figured out that there are multiple ways to scale in Blender and only one of them works when exporting to XNA, plus you have to hit apply even with the one that works. And third, the only way to get textures on a .fbx model from Blender for XNA is to UV un-wrap the model, create a texture file, paint the texture file, then uv-wrap it. Anything else will look great in blender, but be completly lost on the way to XNA. Besides UV mapping, I think the only other material information that will make it into XNA is color of the polygon. So, if you export to XNA without a UV map, you'll just get colored polygons. Oh. And I also found out that Blender doesn't allow you to assign HLSL shaders (High Level Shader Language) to a model; apparently, you have to hard code the shader assignments in the game.

Incidently, there's a chapter in this book that covers annimation.
http://www.amazon.co...-9&keywords=XNA

I think the author took a lot from the App Hub tutorial because he uses the exact same model for his tutorial.

This post has been edited by BBeck: 20 August 2012 - 06:51 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1