Solar Wind 3D Sample

This sample for Silverilght 5 uses the new 3D features to draw the Earth with day and night transitions, atmosphere layers, and population density overlays. It demonstrates advanced concepts like mipmaps, texture blending, multiple drawing passes, sampler states...

C# (10.4 MB)
 
 
 
 
 
4.4 Star
(8)
9,096 times
Add to favorites
9/12/2011
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • Error building ShaderBuildTask
    2 Posts | Last post March 26, 2012
    • I am very excited to find your project. I have geographic based dataset I want to visualize.
      
      ( I am not a c++ dev )
      
      I installed the June 2010 Directx sdk, and am trying to build ShaderBuildTask. I am getting the following error:
      
      Error	1	error MSB3073: The command "sn -Ra "C:\Users\rguess\Downloads\Silverlight\HLSL Shader Build Task\C++\Debug\ShaderBuildTask.dll" ShaderBuildTaskStrongNameKey.snk
      :VCEnd" exited with code 1.	C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets	113	6	ShaderBuildTask
      
      
    • ah.. ok, just removed the .snk as a build task....
  • How to fit build error?
    2 Posts | Last post December 07, 2011
    • I have installed the DirectX SDK and the HLSL Shader Build Task. However I get the following error. what should I do?
      
      Error	1	The "ShaderCompile" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with <UsingTask> in the project file, or in the *.tasks files located in the "C:\Windows\Microsoft.NET\Framework\v4.0.30319" directory.	C:\Users\dwhi045\Downloads\SolarWind\SolarWind\SolarWind\SolarWind.csproj	171	5	SolarWind
      
    • I am getting the exact same error. Im using DirectX 10 SDK if that helps. When i try an compile in Visual Studio I get the following error. 
      
      Error	1	The "ShaderCompile" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with <UsingTask> in the project file, or in the *.tasks files located in the "c:\Windows\Microsoft.NET\Framework\v4.0.30319" directory.	C:\Users\chri6255\Documents\Visual Studio 2010\Projects\Demo\API\SilverlightWPF\Silverlight 5 Spikes\Solar Wind 3D Sample\C#\SolarWind\SolarWind.csproj	175	5	SolarWind
      
  • Unknown compile error
    2 Posts | Last post November 08, 2011
    • I can't compile the project. I get:
      Unknown compile error (check flags against DX version)...\AtmosphereCommon_ps.hlsl
      Build error. I fallowed instructions and installed that HLSL Shader Build Task and directX. Any advice please.
    • You can try to install the last DirectX 9 runtime:
      http://www.microsoft.com/download/en/details.aspx?id=8109
      
  • Change Solar Wind UserControl to a Navigation Page
    3 Posts | Last post October 21, 2011
    • 0 down vote favorite
      share [fb] share [tw]
      	
      
      I want to create a Navigation Page (Silverlight 5) that shows the same as the Solar Wind Usercontrol http://code.msdn.microsoft.com/Solar-Wind-3D-Sample-4cb56170 - I can get the Solar Wind Application itself to show up correctly in Silverlight but changing this to a Navigation Page doesn't show the 3D-Earth on the page - and there is no errors showing why this is happening - The background is there and the Control is showed but NO 3D-object. The Page itself loads without any errors but the Earth will not show up.
      
      I have runned the HLSL shaders.
      
      I have added the extra XML-script to the CSPROJ-file.
      
      I have set the Build Actions to VertexShader & PixelShader.
      
      Does anyone have any idea why I cant get the 3D-Earth to show up on my Navigation Page while it shows up correctly with Solar Wind Usercontrol?
      
    • One of our testers verified that nav pages do work, but you can't just change the control type. Additional updates are required. I'm following up on the details.
    • For Nav pages, when you navigate away the visual tree is torn down and when you navigate back it recreates the tree. You may need to make a few fields static and also change the way the DrawingSurface.Loaded event handler is wired up (using code instead of xaml) so that navigating away from a page doesn't trigger a reload.
      
  • No Earth Display :)
    4 Posts | Last post August 19, 2011
    • I am able to run this application, but I am not able to see any Earth on screen, only Galaxy (Image) is disable with Zoom and other check box controls.
      
      Regards
      Rushi
    • What OS and browser are you using? What kind of video card do you have? Are you running using the web project which has EnableGPUAcceleration=true? Can you check and post the value of GraphicsDeviceManager.Current.RenderModeReason?
    • Right click and go to the Silverlight Menu, select permissions, and enable the graphics device driver for the page you're trying to view.
    • @Zangl: Thanks, that's a good point. If you're using an XPDM video driver (e.g. Windows XP), you must manually give permissions for the site host to use 3D.
  • Issues running/modifying program
    2 Posts | Last post June 15, 2011
    • I have two problems that occur when I'm trying to run this program. First off, even though I have the HLSL Shader Build Task installed correctly (and necessary code added to the .csproj file), and the shaders themselves have been given the correct build actions (PixelShader/VertexShader), I still get a null reference error in GetResourceStream.
      
      Second, after attempting to disable the additional layers (population, magnetic field, etc) I get the following error:
      
      System.CrossAppDomainMarshaledException was unhandled
      Message: System.ArgumentException: [Arg_ArgumentException]
         at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
         at Microsoft.Xna.Framework.Silverlight.DrawGraphicsDevice.DrawIndexedPrimitives(PrimitiveType primitiveType, Int32 baseVertex, Int32 minVertexIndex, Int32 numVertices, Int32 startIndex, Int32 primitiveCount)
         at Primitives3D.GeometricPrimitive.Draw(GraphicsDevice gd)
         at SolarWind.Earth.Draw(GraphicsDevice device, SceneTime time, Camera camera)
         at SolarWind.Scene.Draw(GraphicsDevice graphicsDevice, SceneTime time)
         at SolarWind.MainPage.DrawingSurface_Draw(Object sender, DrawEventArgs e)
         at System.Windows.Controls.DrawingSurface.StaticDrawCallback(IntPtr nativeDS, Single time, Boolean& invalidated)
      
      Any help would be appreciated!
    • The code to enable the HLSL build task and the appropriate build actions should have already been setup in the .csproj file. Did you make changes to the included project?
      
      Without a working set of shaders compiling into the assembly as resources the sample will not run. The second error you reported could be related to that or to the way you disabled the other layers. What was the motivation for disabling the other layers and how was that done?