×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Mar 2013
    Location
    Egypt
    Posts
    12

    Question Importing 3d model to Direct3D 11 [Example]

    Hi,

    I'm building an WP8 app with Direct3D 11, and need to load 3dModel.

    I know how to load it in XNA, but there is no XNA anymore.

    I need an example of how to load a 3d model in Direct3D 11 in WP8.

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,674

    Re: Importing 3d model to Direct3D 11 [Example]

    You may want to specify the file format you want to support (something what is missing from your StackOverflow question too, http://stackoverflow.com/questions/1...t3d-11-example)
    The official MarbleMaze example uses some "SDKMesh" format, and it also seems to have the loader for it http://msdn.microsoft.com/en-us/libr...spx#loadmeshes

  3. #3
    Registered User
    Join Date
    Dec 2012
    Location
    Zagreb, Croatia
    Posts
    73

    Re: Importing 3d model to Direct3D 11 [Example]

    DirectX Tool Kit was created for XNA programmers struggling with some (basic) concepts in C++ and DirectX. Since you are missing quite a lot of basic functionality, you can use it to simplify your rendering code. It can load meshes in .CMO or .SDKMESH format, for others you will need to reinvent content pipeline by yourself.

    But if you still prefer using XNA, I suggest you take a look at MonoGame. You can basically "port" your applications by removing XNA assemblies and adding MonoGame's ones.

  4. #4
    Registered User
    Join Date
    May 2009
    Location
    Guatemala
    Posts
    186

    Re: Importing 3d model to Direct3D 11 [Example]

    If you decide to give MonoGame a try, you might want to check these two Wiki articles:

    XNA Games On Windows Phone 8 with MonoGame
    MonoGame on Windows Phone 8 Post-Processing Your Game
    -CarlosDL

  5. #5
    Registered User
    Join Date
    Feb 2013
    Posts
    9

    Re: Importing 3d model to Direct3D 11 [Example]

    If you go the MonoGame root you'll need XNA as well. At the moment MonoGame depends on XNA Content Pipeline project. The content project outputs it's content to XNB files, which can later be loaded with MonoGame. After this is done MonoGame behaves exactly the same way as XNA would. However there are some points to consider. This comes from the using XAML as bacground surface for drawing and presenting the scene. There are two options at the moment. DrawingSurface and DrawingSurfaceBackgroundGrid. The first supports screen rotation (landscape) including touch the second does not support this. So you'll have to deal with this on your own.

    1) if you want maximum performance with MonoGame you'd better choose the DrawingSurfaceBackgroundGrid and do orientation stuff by yourself.
    2) choose DrawingSurface if you want maximum flexibility and you are not willing to deal with rotation of screen and touch points.

    I preferre the first option. For landscape mode this requires an additional rendertarget that later is rotated to fill the screen. Also if you use SpriteBatch for drawing the rendertarget you will need storing and restoring the graphics device states due to a known problem of mixing 3D and 2D drawing in a single loop.

    If you do not want the XNA-like approach (loading *.xnb files) I would recommend using SharpDX. It can load models of varying formats. However I'm not much helpful here. See this URL for details. The sample is located under Samples directory in download package. Also SharpDX can used both XNA style (with the Toolkit namespace) and plain Direct3D style but with C#.

    For C++/Direct3D I would recommend the DirectX Toolkit that was mentioned previously
    Last edited by this_is_ridiculous; 2013-05-21 at 13:21.

Similar Threads

  1. Accessing Camera in Windows Phone Direct3d App
    By Shayan Rais in forum Windows Phone General
    Replies: 6
    Last Post: 2013-03-06, 18:13
  2. Model/view, apply a filter on model
    By remy_david in forum Qt
    Replies: 2
    Last Post: 2011-02-08, 12:16
  3. Replies: 2
    Last Post: 2010-02-24, 15:21
  4. Importing
    By bugge in forum Symbian
    Replies: 2
    Last Post: 2008-12-02, 05:19
  5. read model no from model.txt
    By rkmohanty in forum Symbian
    Replies: 5
    Last Post: 2008-07-24, 07:34

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×