BlockLeftTop, PRELOAD BlockLeftBottom, PRELOAD BlockLeftStretch, PRELOAD BlockTop, PRELOAD BlockBottom, PRELOAD BlockStretch, PRELOAD BlockRightTop, PRELOAD BlockRightBottom, PRELOAD BlockRightStretch, PRELOAD
DeltaEngine

How to export Collada (.dae) files from 3DS Max for use in XNA

by Benjamin Nitschke 9. April 2008 22:11
This article is similar to the last one (How to export .X files from 3DS Max for use in XNA), but this time we are going to export a 3D Model from 3DS Max as a Collada (.dae) file. Most tips are similar, just the output file (Cactus.dae) is different and the engine we will be using is DungeonQuestGDC or the "Skeletal Bone Animation and Skinning with Collada Models in XNA" engine (I will write another article about that in a bit), which support Collada model files.

As I just said, parts of this article will be similar to the last one: First of all you (or your graphic artist) need a version of 3DS Max, I recommend the most recent available version (e.g. Max 2008 has much better support for .DDS files and makes the exporting process way easier). If you do not have 3DS Max, you can test it for 30 days, that should be enough for testing and exporting some existing 3D Models ^^

You will need the ColladaMax Exporter for your Max version, you can find all versions and downloads at the http://www.feelingsoftware.com/ website, more specific information can be found at: http://www.feelingsoftware.com/content/view/65/79/lang,en/. You can register on the site and then download the ColladaMax plugin for 3DS Max for free there.

Similar as discussed in the last article you have to make sure that each mesh that you export has a shader material assigned to it and in order to work correctly with your XNA Graphic engine it must be a shader that is supported by the engine like ParallaxMapping.fx, NormalMapping.fx or some other test shader.

Lets go through all the steps. Please note that experienced 3DS Max users will probably only need the ColladaMax Exporter and figure the rest out themselves. This tutorial is for beginners and people having trouble getting 3D Models exported for the XNA Graphic Engine in DungeonQuestGDC or SkinningColladaModelsInXna (or similar engines). See http://XnaProjects.net for more details and downloads of these projects!

Step 1: Load the Cactus.max (312 KB) model as an example. If you put the used texture Cactus.dds (170.8 KB) in the same directory you should see the following result:


Step 2: In case you can't see the model, also make sure the used Shader (NormalMapping.fx (10.99 KB, for 3ds Max) for this model, make sure you have a NormalMapping.fx in your XNA Graphic engine) and all other required files exist in the same directory; like the normal map texture CactusNormal.dds (341.47 KB).
If you want to change an existing 3D model and let it use a shader, open up the Material Editor in 3DS Max (e.g. by using the M hotkey) and create a new DirectX shader material. To do that click on a free material spot, click Standard (1.) and then select DirectX Shader (2.), now select the shader you want to use and fill in all the required shader parameters (colors, textures, etc.).


Step 3: Now export the 3D Model as an Collada (.dae) file via the ColladaMax Exporter mentioned above. Make sure settings are similar as follows, basically just activate everything. In case you have animation data in your 3D Model you can also activate the Export Animation checkbox. Multiple animations or the so called Animation Clips do not work very well, so I usually export all the frames and then add some extra animation tracks into an extra .xml file. Anyway, our model does not have any animation and in this case it is much easier both to export and to test.


Step 4: Now you should have the Cactus.DAE (38.95 KB) model file. Unlike previous projects I do not use the XNA Content pipeline for Collada models, I just create a /Models directory and put all the models in there. The textures are stored in /Textures/Models and finally the Shaders go in the /Shaders directory. Thanks to the fact that we do not use the XNA Content pipeline we can keep the game application running while exchanging 3D models and loading them again and again to make improvements, which is cool :)

Step 5: Now with everything in place it is time to test if we can load the model and see it on the screen. I usually use the following unit test in the Model.cs class called TestLoadModel:



Step 6: And finally we should see something like this (this test is from the DungeonQuestGDC engine from http://XnaProjects.net):


I hope this helps.

Comments


4/9/2008 10:58:46 PM #

Thanks for this. The collada file format is very comprehensive, but getting it to work in XNA is not always straight forward, this helps alot. The article on Skeletal Bone Animation was excellent and any update on it will certainly be worth the read.

Aaron Devaney | Reply



4/1/2010 11:11:24 AM #

You can if you think you can.

lose weight | Reply



4/14/2010 10:46:09 PM #

I would like to thank you for the efforts you have made in writing this post. I am hoping the same best work from you in the future as well. In fact your creative writing abilities has inspired me to start my own BlogEngine blog now. Really the blogging is spreading its wings rapidly. Your write up is a fine example of it.

Rapidshare Search | Reply



4/17/2010 3:32:30 PM #

Silent gratitude isn't much use to anyone.

payday loans | Reply



4/20/2010 7:01:04 AM #

I like it very much especially the information you have putted here is like training. Keep the blog up to date. Thanks a lot.

china phone | Reply



4/20/2010 11:44:47 AM #

I was wondering what is up with that weird gravatar??? I know 5am is early and I\'m not looking my best at that hour, but I hope I don\'t look like this! I might however make that face if I\'m asked to do 100 pushups.

collada | Reply



4/20/2010 9:52:44 PM #

I admit, I have not been on this webpage in a long time... however it was another joy to see It is such an important topic and ignored by so many, even professionals.

Rapidshare Search Engine | Reply



4/21/2010 6:23:16 PM #

I admit, I have not been on this webpage in a long time... however it was another joy to see It is such an important topic and ignored by so many, even professionals. элитные проститутки Москвы

Проститутки Москвы | Reply



4/21/2010 9:04:18 PM #

I recently came across your article and have been reading along. I want to express my admiration of your writing skill and ability to make readers read from the beginning to the end. I would like to read newer posts and to share my thoughts with you.  элитные проститутки Москвы

Проститутки | Reply



4/21/2010 11:30:02 PM #

Just want to say your article is striking. The clearness in your post is simply spectacular and i can take for granted you are an expert on this field. Well with your permission allow me to grab your rss feed to keep up to date with forthcoming post. Thanks a million and please keep up the effective work. проститутки Москвы

Prostitutki Moskwa | Reply



4/23/2010 3:01:17 PM #

Just want to say your article is striking. The clearness in your post is simply spectacular and i can take for granted you are an expert on this field. Well with your permission allow me to grab your rss feed to keep up to date with forthcoming post. Thanks a million and please keep up the effective work. элитные проститутки Москвы

Prostitutki Moskwa | Reply



4/24/2010 6:44:58 AM #

While this subject can be very touchy for most people, my opinion is that there has to be a middle or common ground that we all can find. I do appreciate that youve added relevant and intelligent commentary here though. Thank you!

Voi clothing | Reply



4/24/2010 11:22:53 AM #

I think more people need to read blogs like this.  Its so important to know how to construct a great blog to get people interested and youve done just that.  The content is great, the videos are perfect for what youre trying to say.  Awesome, man. Really awesome!  Cant wait to read more.

Barter | Reply



4/25/2010 8:55:46 PM #

Just want to say your article is striking. The clearness in your post is simply spectacular and i can take for granted you are an expert on this field. Well with your permission allow me to grab your rss feed to keep up to date with forthcoming post. Thanks a million and please keep up the effective work.  Texas Holdem online

online Texas Holdem | Reply



4/26/2010 7:45:07 PM #

The key to successful leadership is influence, not authority.

faxless payday loans | Reply



4/27/2010 10:38:00 PM #

I\'m happy I found this blog, I couldnt discover any info on this subject matter prior to. I also run a site and if you want to ever serious in a little bit of guest writing for me if possible feel free to let me know, i\'m always look for people to check out my site. Please stop by and leave a comment sometime!

Rapidshare | Reply



5/4/2010 5:05:41 PM #

Top Rapidshare Search engine

Rapidshare Search engine | Reply


Add comment




biuquote
  • Comment
  • Preview
Loading



Disclaimer: The opinions expressed in this blog are own personal opinions and do not represent the companies view.
© 2000-2011 exDream GmbH & MobileBits GmbH. All rights reserved. Legal/Impressum

Poll

Which platform should Soulcraft be released on next?











Show Results Poll Archive

Recent Games

Soulcraft

Fireburst

Jobs @ exDream

Calendar

<<  May 2012  >>
MoTuWeThFrSaSu
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910