Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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!

like image 590
Adam Barney Avatar asked Jan 14 '09 14:01

Adam Barney


People also ask

What is Ab3d?

Ab3d. PowerToys is an ultimate WPF and WinForms 3D toolkit library that greatly simplifies developing desktop applications with scientific, technical, CAD or other 3D graphics. The library has been proven in many professional applications.

How do you draw a line in WPF?

To draw a line, create a Line element. Use its X1 and Y1 properties to set its start point; and use its X2 and Y2 properties to set its end point. Finally, set its Stroke and StrokeThickness because a line without a stroke is invisible. Setting the Fill element for a line has no effect, because a line has no interior.


3 Answers

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

like image 121
Thomas Dufour Avatar answered Nov 15 '22 19:11

Thomas Dufour


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

like image 34
Coderer Avatar answered Nov 15 '22 19:11

Coderer


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

like image 21
Sergey Orlov Avatar answered Nov 15 '22 18:11

Sergey Orlov