Silverlight 3D Model Importer Project
If you’re looking for a quick way to get a 3D model loaded using the Silverlight 5 Beta, check out the Silverlight 3D Model Importer project on CodePlex by Simon Ferquel. You can export content from an XNA GS4 project:
1 2 3 4 5 6 7 8 |
var interopModel = InteropModel.FromXnaModel(model); // and serializes it into a file using (var fs = File.Create("model.bin")) using (var writer = new BinaryWriter(fs)) { interopModel.Save(writer); } |
Then import it back into Silverlight using InteropModel.FromBinaryReader(). Here are some examples:
Babylon Project
Related, David Catuhe has added OBJ format and updated model support to the Babylon Toolkit. He blogged about the toolkit updates here.
Hi,
Could you please let 3D newbies know what are the intended way to make a 3D Silverlight Game? Today we create 2D apps this way: draw graphics using Expression Blend/Design then we use code to animate the XAML elements by playing with Canvas.Left and Canvas.Top and the built-in animations, transformations.. etc, what are the equivalents to make 3D stuff?
Please write a tutorial about drawing the models, importing them to Silverlight, animate them, rotating, scaling, moving the camera.. etc, I just want to know the basics and the best practices. Thanks in advance.
Hi Aaron, thank you very much for sharing the project !
Please let me know if you get any feedback about it. @Taz you should have a look at Xna tutorials, as the APIs are very similar
I am trying to view the samples, but I’m always getting an error in my browser when the loader reaches 100%:
Unhandled Error in Silverlight Application Could not Load Type ‘System.Windows.Controls.DrawingSurface’ from assembly ‘System.Windows, version=5.0.5.0, Culture = neutral etc etc etc
There were breaking changes between Beta and RC. You need to rebuild the project and fix up the references. DrawingSurface is no longer in System.Windows.dll but instead in System.Windows.Xna.dll.
See http://aarononeal.info/?p=203
hmmmm interesting, but what about the online samples that are around and I can’t see them?
Example: http://www.simonferquel.net/blog/sl3dmi/tank.html
If those haven’t been updated to comply with the SL5 RC changes then you will not be able to view them.