locked
how to use and design 3D objects for windows 8 app with C# and XAML

    Question

  • Hi, 

    i need help with an app i am making. It's basically a windows 8 game, i want it to be in 3D.

    i am using xaml and c#. I want to know which tools i can use to make 3d objects for my game and, how i can integrate or use it in my app (xaml and c#).

    I have used google sketchup 8 before for 3d design but never used it in programming.

    I am using visual studio 2012 currently i will upgrade it to 2013.

    Tuesday, November 4, 2014 2:14 PM

Answers

  • There is no 3d environment for Windows.UI.Xaml. You will need to use Direct3d, either directly or via Xaml/Direct3D interop.

    There is no C# support for Direct3D included with Windows. For that you will need to either write your own interop layer or use an existing 3rd party layer such as SharpDx.

    --Rob

    • Marked as answer by Pharaoh() Thursday, November 6, 2014 3:48 PM
    Wednesday, November 5, 2014 8:08 PM
    Owner

All replies

  • There is no in-box API for 3d rendering in C#, but you can interop with Direct3D and there are 3rd party packages (such as SharpDX) which will wrap some of that interop for you.

    See Developing apps (DirectX) to get started with DirectX.

    See DirectX and XAML interop for information on displaying a DX scene in your Xaml scene and Xaml over a DX scene.

    If you want to stay in C# but use a more game oriented engine then take a look at (3rd party products) MonoGame (similar to XNA) and Unity3d (a full fledged game engine).

    --Rob

    Tuesday, November 4, 2014 8:52 PM
    Owner
  • thanks for the help rob. i will check all the method you suggested, actually it is a project and i have to use c# for logic and xaml for the UI but i want game environment to be in 3d, buy using a third party software for 3d model creating and then using it with c# and xaml so that the main criteria of the project will complete. sorry if am disturbing anyone just need to know the process (means what i should use with visual studio)  

    and the direct X and xaml link use c++ in the guide i have to use c#.

    • Edited by Pharaoh() Wednesday, November 5, 2014 7:58 AM
    Wednesday, November 5, 2014 7:51 AM
  • There is no 3d environment for Windows.UI.Xaml. You will need to use Direct3d, either directly or via Xaml/Direct3D interop.

    There is no C# support for Direct3D included with Windows. For that you will need to either write your own interop layer or use an existing 3rd party layer such as SharpDx.

    --Rob

    • Marked as answer by Pharaoh() Thursday, November 6, 2014 3:48 PM
    Wednesday, November 5, 2014 8:08 PM
    Owner
  • Thanks Rob , really appreciate your help. I am going with SharpDx it will work good. so any thing i should keep  on mind while using SharpDx, and which tool is good for sprite creation (google sketchup is an easy one i think what you recommand) and really thank you.
    Thursday, November 6, 2014 3:55 PM
  • I can't give any specific recommendations for that. I haven't used Sketchup for model development. Blender is another well-regarded free modeling tool.
    Thursday, November 6, 2014 6:07 PM
    Owner