WPF and 3D

Apress eBooks · 2008

What this chapter covers: How to create a 3D image in Blend 2 Working with ZAM 3D Using OBJ files in WPF The 3D Tools library One of the most powerful features of Windows Presentation Foundation is its ability to make use of 3D objects. 3D objects are created in the XAML in what is known in WPF as a Viewport3D. However, trying to create a XAML Viewport3D by hand would be very impractical, if not impossible; you could spend a lot of time at it and still end up with something that looked only somewhat attractive. So for almost all of the XAML Viewport3Ds in this chapter, I am going to show you how to use third-party software such as ZAM 3D by Electric Rain to create your models. You are going to download that program and make use of it in this chapter. Blend 2 at this time has very limited capabilities for creating 3D objects, and I will cover what it can do in this chapter as well. Then I am going to show how to import and make use of OBJ, or object, files. Object files are a common file type for 3D objects that all of the major 3D software programs have the ability to export. Finally, I am going to teach you how to make use of a library called 3D Tools that will allow you to “paint” 2D WPF controls such as a MediaElement onto a 3D object and interact with it. Without this library, you could still “paint” 2D controls onto 3D objects, but you would then lose the ability to interact with those controls. By “interact,” I mean you would no longer be able to click the buttons. With that, let’s get started and make some 3D magic!

Read the paper · More papers on PaperTik