www.xbdev.net xbdev - software development
Friday December 14, 2018
home | about | contact | Donations

     
 

XNA & 360

The bits and bytes of XNA and C# for your 360...

 

 

XNA Lets you load basic .X models, but to take it to the next level, load custom .X files with skinning or modified includes in the .X format such as cameras, paths or splines.

 

I wrote the custom .X parser to assert if any problems arise.  I tried to check for any sort of problems and its pretty robust, so if you find any major bugs let me know.  The parser is pretty fast a bit of work is still needed on the renderer code though.

 

Parts:

    o Tokenizer (Reads the file in and checks and chops the file into valid string tokens)

    o X Parser (Parses the .X file, including checking templates and putting the data into valid arrays)

    o X Loader (Takes the raw data from the Parser and builds it into classes that represent meshes/hierarchy etc)

    o X Renderer (Draw class that actually updates the animations and renders the the models and textures)

 

 

Download Source Code (Code000)
On the right you can see a simple screenshot of the .x model loader running.  Takes a few seconds to start up as its parsing and loading the .x model in.

 

If you download the sourcecode I've included the .x file (xwarrior.x and its texture warrior.bmp).

 

Currently its a bit slow as I'm brute force rendering and updating the model to show the bone hierarchy and just to make sure things work at this stage, its very good for educational purposes though to tinker with things and see exactly how things are put together.

 

In the demo I render the bones and let you turn on various debugging options (wireframe, static pose view etc in the renderer).

 

 

 

 

 

 

 

 

 

 

 

 
 Visitor: 9534626  { 209.237.238.175 } Copyright (c) 2002-2017 xbdev.net - All rights reserved.
Designated tutorial and software are the property of their respective owners.