views:

894

answers:

4

I wanted to play around with some 3D controls in WPF, but was mildly surprised to find that there were no primitive solid controls in WPF - I just wanted to plop a few spheres and cubes in a scene, but didn't realize I had to render them using meshes.

Surely someone has created libraries of 3d primitives that can be added to WPF 3D scenes by now. Are any of these libraries free?

How about modeling tools? I know there are a few free modeling applications (like Blender), but is there a way to export models from these and include them in a WPF application?

Thanks!

+1  A: 

I don't know how well it will play with WPF, but you can download XNA direct from Microsoft for free. It gives you some pretty wrappers around the 3D APIs.

Also, check out Matt's answer to this question. I don't know if waiting for .NET 4.0 is an option for you...

"Dr. WPF" wrote a CodeProject article about the WPF D3DImage control, then blogged about it.

Coderer
+4  A: 

Charles Petzold has written a library of basic 3D shapes for WPF that you can find here : http://www.charlespetzold.com/3D/

Admittedly, is comes with a weird license, but all in all it's rather cheap and you get a free book, which I recommend by the way ;)

Thomas Dufour
A: 

I should add something else terribly, terribly important that I forgot to mention in my first post -- why are you looking at 3D controls? I looked at the link Thomas posted, and they have a 3D animated "knife switch" to replace a check box.

FOR THE LOVE OF ALL THAT IS PURE AND HOLY, do not foist that on a commercial desktop app! If you want to play with it, if you want to make childrens' software interesting or something, fine, great. But I just want to make sure you're not trying to "add punch" to your accounting package or something...

Coderer
A: 

If you're planning on using Blender, you can export the models using the XAML Exporter for Blender There are also exporter for 3D Studio MAX and Maya 3d and more than likely for most other commercial packages as well.

Ruben Steins