Visual Studio 3D Starter Kit

This sample contains the starting point for a basic game for Windows Store and Windows Phone, a “Starter Kit” which provides support for consuming runtime assets produced by the VS tools. This includes loading and rendering assets (meshes, textures and shaders).

 
 
 
 
 
(19)
9,460 times
Add To Favorites
2/12/2013
E-mail Twitter del.icio.us Digg Facebook
Sign in to Ask a Question


  • Where is the C#? and Are other resources available?
    2 Posts | Last Post May 09, 2013
    • I just ran across this and it looks interesting.  It says  "Technologies ..  C# .."  So, does it use C# for scripting (or anything else) or is this totally a c++ product?  I really don't to re-learn c++ if I don't have to.
      
      And.. Does Microsoft have any plans to share additional resources.  I am totally new here, and would much prefer to use someone's existing teapot or spotted ball, or modify it rather than draw every item that I am going to need from scratch.  It would be nice to get a large library, zip file, whatever .. of many objects.  Or have a spot for people to share objects.  Maybe tat is included already.  I have not as yet installed it.  I am just trying to decide whether I need to use another product.  I much prefer to use this (need free products for now).
      
      
      
    • Hello ScCrow2,
      
      C# is used on the Windows Phone sample - the XAML part of it is developed with C#.
      The Starter Kit is built on top of DirectX, and therefore it's mostly C++. 
      
      About meshes, the Visual Studio Graphics tools supports converting from some of the most popular mesh formats, such as FBX, OBJ and DAE. DAE, for example, is compatible with SketchUp, which is a free and simple 3D model editor. Other free apps like Blender can also export to those formats.
  • Localization in 3D resources
    5 Posts | Last Post May 08, 2013
    • Hello Roberto,
      
      We are now in the process of coding English version of our local app.
      
      What is the best way to localize the texture images (some in the form of shaders)? What method do Microsoft or you recommend?
      
      Thanks.
    • One way that I can suggest is to change the code on the Starter Kit header (VSD3DStarter.h) to load different textures based on the user locale. 
      
      For example you can save the textures as MyTexture.en-us.png, MyTexture.tr-tr.png, etc., and they will be converted to dds with the same name.
      
      Hope this helps!
      Roberto
    • Thanks for the answer. Although I had to create a few redundant .fbx and .dgsl files, I was able to do it. What I did is below:
      
      - Created separate textures for each language and named as you suggested.
      - Created separate shaders using above textures.
      - Assigned english version of shader to the original FBX file.
      - Assigned other versions of shaders to some dummy FBX files so that Visual Studio produces DDS files from them. Otherwise DDS files from textures not generated because they are not referenced in an FBX file.
    • Hi Gokhan,
      
      I'm glad to know it worked; a few suggestions for you:
      - You don't need separate shaders - you can load different textures by changing the texture loading code (GetOrCreateTexture on VSD3DStarter.h) to change the file path according to the language.
      - You also don't need to create FBX or DGSL in order to generate the DDS. Simply change the PNG/JPEG build task to "Image Content Pipeline" and the DDS will be generated for you :)
      
      Hope this improves your solution!
    • "Image Content Pipeline" is what we were missing to make this better. Thanks!
  • Thanks Roberto ... too FUNNYY ... had me ROTFL
    1 Posts | Last Post April 26, 2013
    • Looking forward to playing with this code.
      
      Hope you've got more GR8 demos coming!
      
      Art
  • While parsing CMO file the specular values are always 0
    4 Posts | Last Post April 26, 2013
    • After Visual Studio converts FBX file into CMO file seems like information regarding specular/specular power is missing. Tried on multiple files.
      
      Files generated with blender, both asci/ASCII, tested on VS2010 Express/Pro
      
      Example file
      https://mega.co.nz/#!KFRyFRKa!HZ9xTFF_LMUNktcRD8t5GAdpyO5omBb8QTpjiXSg-l0
    • VS2012*
    • Hi Lufiks,
      Thanks for the feedback! Can you please open a bug on http://connect.microsoft.com/visualstudio ? This will ensure that the team will see the issue and give you feedback on the status as fast as possible.
      Please mention that this bug is related to the Visual Studio Graphics Tools - Content Pipeline. 
      
      Thanks!
      Roberto
    • Will do, thanks
  • OnHitObject Bug?
    1 Posts | Last Post April 10, 2013
    • In game.cpp > OnHitObject , you have the following code:
      
              if (hit && t < closestT)
              {
                  result = name;
              }
      
      However, this wasn't working when selecting appliances in my virtual building.  It kept returning the building's walls.  I modified your code as follows, and it now works:
      
              if (hit && t < closestT)
              {
                  result = name;
                  closestT=t;   // NVF-I added this, Microsoft bug? 09Feb13
                                // Only return name if object is closer that last
              }
  • Only GlowEffect Works on the WIndows Phone
    3 Posts | Last Post April 10, 2013
    • How do you get other shaders to work on the Windows Phone 8?  If you try to change one of the objects in gamelevel.fbx to use another shader like Lambert or Phong, it will not work on the Windows Phone (works fine on Windows Store Apps).
      
      Thing I have tried: I have tried adding phong.dgsl & lambert.dgsl to the projects, exporting as .hlsl files, and compiling to .cso files, but this does not seem to work. 
      
      Any ideas?  Again, this is just for the Windows Phone 8.  It works fine on Windows Store Apps.
      
      Great job on this code, btw.
      
      
    • Hello BladeProfessor,
      
      You were definitely on the right way to make your shaders work on Phone 8.
      You need to make sure that the exported HLSL files are set to be compiled as Pixel Shader and the feature level is 9.3 (4_0_level_9_3) on the properties page of the HLSL file (shortcut: Alt+Enter). 
      
      You may need to disable debugging output and enable optimizations (on the same property page) to make sure the shader fits.
      
      Hope it works!
      Roberto
    • Thanks, I was finally able to get this to work.  I actually  did all those compile options that you mentioned.  But that wasn't the problem.  The problem was that I did not add the .hlsl file from the Shared/Assets into StarterKitPhone/Shared/Assets.  Therefore VS2012 was never creating the .cso file.
      
      So to summarize, the solution is: everything you mentioned + "Add Item" the .hlsl file from the Shared/Assets folder into the StarterKitPhone/Shared/Assets folder.
      
      Thank you again.
  • the picking effect
    2 Posts | Last Post March 29, 2013
    • Hi, Reberto!
          the OnHitObject(int x, int y)function should compare the t of ( bool hit = this->LineHitTest(m, &point, &dir, &meshTransform, &t);) because the meshs are overmapping。am I right, I ,m new to 3D.
    • Hi JalenKingKong,
      
      If I understand correctly, you want to understand why we compare the "t" with the "closestT" to determine the hit. The idea is that we hit test every mesh that intersect the ray cast by the mouse and return only the object that is closest to the screen.
      
      Hope that answers your question!
      Roberto
  • 2d Image rendering
    3 Posts | Last Post March 28, 2013
    • Hi, Reberto!
      
      I got a trouble in showing image on a surface control, could you help me? Here are the demo project. http://sdrv.ms/11BzVXs
      
      I just want to load the image(a.jpg) in ImageRender class to do some process and show it on a drawsurface control.
    • Hello HamGuy15,
      
      Your app does not seem to be using the Visual Studio Starter Kit. For general help with DirectX for Windows Phone, please try the DirectX app forum:
      
      http://social.msdn.microsoft.com/Forums/en-US/wingameswithdirectx/threads
      
      or the Windows Phone development forum:
      
      http://social.msdn.microsoft.com/Forums/en-US/wpdevelop/threads
    • Hi, Roberto
      Thanks for the reply. I had post my question on the Windows Phone development forum:
      http://social.msdn.microsoft.com/Forums/en-US/wpdevelop/thread/e1ffb5d7-49bc-4f62-943a-cb6b375c75e1
  • Assert on ParentIndex == -1
    5 Posts | Last Post March 27, 2013
    • I'm having an assert trigger when the UpdateAnimation code tries to update a bone with a ParentIndex of -1. This is in Animation.h line 144. 
      -1 seems a pretty standard way for the exported hierarchy data to indicate this bone doesn't have a parent, but the case isn't handled. 
      
      In a related note, I wasn't sure where best to report this -> The FBX convertor doesn't seem to export bones which are part of a transform hierarchy, but which aren't directly referenced by a specific vertex. This also leaves handing -1 parent references to missing bones. 
    • Sorry if this isn't the best place to talk about this, but at least I do know you're reading posts here. ;)
      
      I wanted to point out a related issue to the above. The UpdateAnimation code in Animation.h, specifically the transform to world loop, assumes that bones in the list are stored in parent to child order. This can work fine in small chain hierarchies which by coincidence are in the right order, but quickly breaks with more complex FBX animations. As is, the code assumes a read parent bone has been transformed to world space, which it might not have been transformed yet. The bones should be traversed in a parent to child sequence, which will be difficult given the previously pointed out issue that the FBX convertor in VS12 skips bones which aren't associated with specific vertices. 
      I hope the above helps with fixing a few bugs! :)
    • Hi Gavin,
      
      I just wanted to let you know that we didn't ignore your issues. Could you please report the bug(s) you found on Connect? http://connect.microsoft.com/VisualStudio
      
      Thank you!
      Roberto
    • Hi Roberto
      I've reported the Visual Studio bug to Connect, but I note from the latest build of your example, you've not addressed the assumption that bones will always be traversed in a forwards order, from the first bone in a list to the last, this might not always be the case. 
      When the bones are initially loaded, each needs to store a list of it's child bones. Then when you transform start from the root bone, and visit each child bone, in that order. This ensures when a child refers to it's parent transform, such is guaranteed to have been transformed already. As is, this might not be the case depending upon the bone index order.
      (Bones not being in a 0 to last referenced order is NOT a bug in Visual Studio, this is intended behavior)
      Hope this helps! :)
      Gavin
    • Thanks again for the feedback Gavin. I'll try to work on this issue when I have some time, no promises :)
      
      Thanks for the tip!
  • Shadow Mapping
    2 Posts | Last Post March 27, 2013
    • Hello Roberto!
      
      I'm having a lot of trouble trying to implement a Shadow Mapping using your architecture, Could you please help me out?
    • Hi Carlos,
      
      The Starter Kit does not provide any extra helpers that would help you create a shadow map. You will need to implement one using HLSL shaders.
      
      You can learn more about this in MSDN: http://msdn.microsoft.com/en-us/library/windows/desktop/ee416324%28v=vs.85%29.aspx
      
      The DirectX 9 SDK has some samples on this, as well as some books like Frank Luna's series (http://www.d3dcoder.net/)
      
      Hope it helps!
      Roberto
1 - 10 of 34 Items