Download Latest Version SlimDX-ColladaLoader-Sample-1.0.zip (4.6 MB)
Email in envelope

Get an email when there's a new version of SlimDX Collada Loader

Home
Name Modified Size InfoDownloads / Week
SlimDX-ColladaLoader-Sample-1.0.zip 2010-06-10 4.6 MB
SlimDX-ColladaLoader-1.0.zip 2010-06-10 1.6 MB
SlimDX ColladaLoader-SimpleCollada10-tutorial.pdf 2010-06-10 778.5 kB
SlimDX ColladaLoader-SimpleCollada10-readme.txt 2010-06-10 3.7 kB
Totals: 4 Items   7.0 MB 0
SlimDX ColladaLoader Sample aka SimpleCollada10

You need the following things to run this sample:
SlimDX February 2010 SDK
DirectX February 2010SDK
The ColladaLoader package (included in the sample)
Visual Studio 2010 (not a requirement, but you'll have to remake the solutions if u use another IDE)


Make sure all references are ok if you want to build the sample. See the PDF tutorial for more information.

This collada loader sample is a very simple implementation of how to parse a collada file, therefore it does not yet support all features collada supports.
Neither will it load every mesh brainlessly. If you want to do complex things with it, you will have to adapt the sample to your needs, and read the correct
nodes out of the collada file yourself. It is merely a sample of how to parse a collada file, and how to convert it to a format which DirectX 10 understands,
and how to draw it by using the SlimDX sdk in a managed environment.

Variables are not passed in a very fashionable way, or stored in a correct manner. 
For example: for each mesh object I create, I have an effect variable, though often when u load 2 models, both will use the same effect. So this is evidently 
not good in a final application, but it is how it is to keep the sample easy to understand.
Same with the mesh data, though the sample displays the same model twice, it has 2 copy's of the mesh data in it's memory.


I integrated the code into the "SimpleModel10' sample from the february 2010 SlimDX SDK, to get an easy starting point.
This sample is far from an ideal base to start upon, since it has no camera class or anything but it just does what it is supposed to do, 
load a simple model, load a simple shader, and draw the model to the screen. I'm sure theres plenty more fun stuff you can do with the sample framework, 
but I havent had the time to look into that yet.

When certain models do not draw correctly this is most likely due to the following:

*Depth buffering is not setup correctly. I might do a tutorial on this later.
*Face culling is not setup correctly. You have to make sure you draw your triangles in the right order, 
otherwise DX might go cull things you dont want culled.
*Some other rasterizer state (like blending or stenceling) might be incorrectly setup.
*Make sure the correct resource view is bound to your shader before drawing
*The model's coördinates fall outside of the visible range (an easily overlooked error)

This sample is FAR from optimal, it is what it is, for educational purpose. I hope some people actually learn something from it, I know I did ;)

Copyright note:

This code is completely based upon free samples and tutorials from the internet. Most of the actual collada parsing code is based upon Benjamin "Abi" Nitschke's 
"Skeletal Bone Animation and Skinning with Collada Models in XNA" code sample, but then simplefied a lot. 
This sample can be found at "http://abi.exdream.com/Blog/post/2007/02/25/Skeletal-Bone-Animation-and-Skinning-with-Collada-Models-in-XNA.aspx". 

I ripped out most of the actual skinning code, as I didnt want to go that far yet, I just wanted to load a static mesh from a Collada file in DirectX 10.
Maybe if I get around to doing it , I might reimplement Benjamin's skinning code in a later sample. Other parts of the code come from various samples on the internet.
I want to thank each and everyone of those ;)

See copyright.txt for more info.

Further, you can use and distribute this sample freely, just mention the people who worked on it somewhere in the credits, and everyone is happy ;)

(c) Tom Boeckx 2010
http://www.tomsdevshack.be/projects/colladaloader
Source: SlimDX ColladaLoader-SimpleCollada10-readme.txt, updated 2010-06-10