Google Search

Sunday, September 27, 2009

Google SketchUp Xaml exporter

I wanted to build a WPF 3D application, that will present models. I didn't want to include code that loads different formats and creates WPF models at runtime, and I wanted an easy-to-use, free modeler.
Blender is free, but I find it very cumbersome. Google SketchUp is very easy to use, but was lacking a way to export to XAML.
Fortunately, SketchUp has a very easy-to-use Ruby API that I could use to build an exporter.
It currently exports the meshes separated by materials, and grouped together in geometry groups according to the same hierarchy structure of the model. Materials include front faces only (i.e. no BackMaterials) and support solid color and textures. If no material is given, a solid white material is used.
While it's not perfect, it does a pretty good job. Feel free to use and please send feedback,
http://cid-8fbcae0caa96d592.skydrive.live.com/self.aspx/.Public/xamlExporter.rb

UPDATE:
I updated the plugin. Check out the follow-up post: XAML exporter for Sketchup - Round 2.