locked
import 3d models created in a 3d package like maya/max into metro apps?

    Question

  • Is it possible to create a 3d model with textures and animations in a 3d package like Maya or 3ds max and import it into a metro style app for your game??

    if so, can anyone point me to a resource/sample/tutorial etc? Unfortunately my DirectX is not as strong as it probably should have been but I can learn and adapt very quickly by looking at a code sample or documentations..

    I know its not ideal but I need to know how to do this urgently. I have no option or time!

    Please help!!

    Friday, July 27, 2012 1:18 PM

Answers

All replies

  • A common way is to use the Autodesk FBXSDK which parses an fbx file that was exported from 3ds/maya/other. The FBXSDK is free and there is great documentation to help learn it. Search Autodesk for the FBX area.

    Xna uses the Autodesk FBXSDK in the background in it's model processor. Having said that, another way that may be quicker if you are familiar with working with models in Xna is to create an Xna project that imports an fbx model, then writes the Mesh, ModelMesh, ModelMeshParts, & ModelBone info (vertex/index buffers, stride, transform, etc. etc.) into your own binary file. Then you read that binary file data from your metro app into similarly defined class instances within the metro app.  That's what I ended up doing. In reality, it merely saved me the time to learn the FBXSDK to build an importer... which I aught to do anyway.




    • Edited by Shazen Friday, July 27, 2012 2:24 PM
    Friday, July 27, 2012 2:18 PM
  • A common way is to use the Autodesk FBXSDK which parses an fbx file that was exported from 3ds/maya/other. The FBXSDK is free and there is great documentation to help learn it. Search Autodesk for the FBX area.

    Xna uses the Autodesk FBXSDK in the background in it's model processor. Having said that, another way that may be quicker if you are familiar with working with models in Xna is to create an Xna project that imports an fbx model, then writes the Mesh, ModelMesh, ModelMeshParts, & ModelBone info (vertex/index buffers, stride, transform, etc. etc.) into your own binary file. Then you read that binary file data from your metro app into similarly defined class instances within the metro app.  That's what I ended up doing. In reality, it merely saved me the time to learn the FBXSDK to build an importer... which I aught to do anyway.





    Thanks for that, I will look into it right away...
    Friday, July 27, 2012 4:19 PM
  • Hmm... The Windows 8 version of Visual Studio 2012 express RC only lets us create Metro Style app projects. I suppose the XNA idea is out of the window :(
    Friday, July 27, 2012 4:25 PM
  • No, you simply install VS2010 (any version, even the free express version) on win8RC and Xna installs onto vs2010.

    But, you kinda have to know and understand what Xna does with the model and how it works in Xna or the learning curve might be the same as figuring out the FBX SDK.

    Friday, July 27, 2012 11:00 PM
  • For the first time you can load mesh data, stored in *.obj file, and texture (*.dds) from different files using modified obj2vbo file from Direct3D Resource Loading sample and DDSTextureLoader from MarbleMaze game or DirectXTex library. If you need to load animation, texture and mesh data stored in one file, then it seems to me that Autodesk FBX format is only option, though I think that it will be hard for beginner in DirectX programming to write parser for *.fbx files even using FBX SDK.
    Saturday, July 28, 2012 9:17 AM
  • I just don't know what to do right now, I seem to understand the Marble Maze example fine... well not entirely but got hang of most of it.... the problem I have is, the BasicLoader class has methods LoadMesh and LoadMeshAsync to load meshes. But neither of them are called anywhere in the project. So I am not sure how the meshes in the marble maze app are loaded.

    Then comes the .sdkmesh and the SDKMesh class. First thing the class says is to not use it. Ok fine. What shall I use then?? and how?

    I do not need animations, textures, materials and model all in one file. I just need to know, supposed I have a marble.x or marble.obj or any file format, and use that model and textures etc to replace the one in the app.

    Right now I have no clue no matter how many times I look at the code. Basically, if one of my artists creates a 3d model, how can I put it in a game, to start with in the marble maze game...

    I absolutely do not mind using separate methods/classes to load individual aspects of a mesh.

    I am running out of time... please help...

    Monday, July 30, 2012 2:02 PM
  • You can make use of .sdkmesh. The disclaimer is there because it's really designed for the needs of samples, and not for 'production' games. That said, if it works for you then go for it.

    http://blogs.msdn.com/b/chuckw/archive/2012/04/25/samples-content-exporter-update.aspx

    Monday, July 30, 2012 7:59 PM
  • But I do need to make a game that is as close to 'Production' as possible. Besides, My artist has no clue how to export to .sdkmesh format?
    Tuesday, July 31, 2012 8:40 AM
  • anyone??
    Tuesday, July 31, 2012 3:05 PM
  • You export to an .sdkmesh by using the tool I link above. It uses the Autodesk FBX library to read in an .fbx file, which your artist can author.

    Wednesday, August 1, 2012 12:07 AM