Adam Barney
Adam Barney

Reputation: 2387

Are there (free) tools or libraries for 3D WPF objects?

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!

Upvotes: 9

Views: 6106

Answers (5)

Sergey Orlov
Sergey Orlov

Reputation: 509

IMHO, Do not use Petzold Media 3D for primitives drawing. It works by unusual way for WPF 3D overriding OnDraw() method. It is not a right way. It is a good resource for learning some features, no more. Of course, there is great free library Helix 3D in codeplex. Any tool for 3D object creation is a good start. Take a look for a post 3D models fatures in WPF Good luck in WPF 3D! p.s. I like to draw 3D primitives by hand also...

Upvotes: 3

Ruben Steins
Ruben Steins

Reputation: 2820

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.

Upvotes: 1

Coderer
Coderer

Reputation: 27264

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...

Upvotes: 4

Thomas Dufour
Thomas Dufour

Reputation: 1941

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 ;)

Upvotes: 7

Coderer
Coderer

Reputation: 27264

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.

Upvotes: 3

Related Questions