Xaml Export Script for Blender

[UPDATE: The Xaml Exporter now is hosted on CodePlex (here)] 

The 3D features in the Windows Presentation Foundation make it easier than ever to integrate 3D content into your applications.  However, unless you are satisfied with basic solid geometry you are going to need more than just the WPF.  You’re going to need 3D authoring tools to create interesting content.

Unfortunately 3D tools tend to use their own proprietary file formats with limited import/export support for other formats.  Xaml, being new to the scene (no pun intended), is not yet supported by most tools.  However, some modeling programs feature an add-in architecture that allows custom exporters to be written by 3rd parties.  The free 3D software package Blender is such a tool.

All very interesting you say, but where is this going?

I have posted a new release of the 3D Tools for the WPF which includes a Python script to export Blender scenes as Xaml.  The Xaml can then be dynamically loaded or compiled into your WPF applications.  Figure 1a shows a 3D model being edited with Blender.  Figure 1b shows the final exported Xaml as viewed with the WPF Model Viewer.

Figure 1a
The Steve Ballmer model* is authored in Blender and then exported to Xaml.
Figure 1b
The final model as it appears in the WPF Model Viewer.

(Click for full sized images)

Because the WPF and Blender have different goals for their rendering engines their feature sets do not match precisely.  Specifically, the WPF uses the hardware accelerated real-time rendering capabilities of your GPU.  Blender is a software based rendering engine not targeted at real-time applications.  However, the results of the export are frequently quite good.  Figure 2a is the same 3D model as rendered by Blender.  Figure 2b is the exported model viewed from a similar angle with the same lighting configuration in the WPF Model Viewer.

Figure 2a
Steve Ballmer model* rendered using Blender’s internal software engine.
Figure 2b
Exported model rendered using the WPF.  The blue background is not part of the scene.

(Click for full sized images)

To get the Xaml Export Script for Blender and the WPF Model Viewer download the latest version of the 3D Tools for WPF (available here).  Copy the xaml_export.py script to your Blender scripts directory.  Blender will automatically add the script to the ~File~Export menu the next time it is started.  More detailed instructions and a list of known issues are included in the Read-Me.

* Steve Ballmer model courtesy of Bonnie Lehenbauer

Comments (7)

  1. Americo says:

    Thanks Daniel,

    I will make some tests and if all is OK I will create a tutorials serie about the use of Blender+your converter+WPF for beginners in 3D modelling.

    And using the tricks presented at our site:


    for hobbyistic 3D games creation.

  2. danlehen says:

    You are quite welcome. 🙂

    Note that there is a Bug Tracker page in the workspace where you can report issues with the exporter:


  3. I’ve posted a minor release of the 3D Tools for the Windows Presentation Foundation which is built against…

  4. Instead of writing individual blog posts for each WPF tool or control that I become aware of, I thought…

  5. Je vois de plus en plus d’articles sur le web qui compare XAML à certains formats de fichier 3D basés…

  6. brent's blog says:

    First Open Movie…

    I have been fascinated by open source technology and business models for some time…

  7. The last few days I played around with the 3d capabilities of the Windows Presentation Foundation (WPF).

Skip to main content