Case Study B: 3DTieFighterProject


What this chapter covers:
  • Importing the free Tie Fighter model that ships with ZAM 3D

  • Adding a lighting scheme to the model in ZAM 3D

  • Exporting the model to XAML

  • Creating a new WPF project

  • Importing the XAML of the model

  • Cleaning the XAML

  • Creating buttons that are placed next to the model (windshield, left wing, right wing, etc.)

  • Spinning the model to show a particular model part better, while repositioning the buttons next to their respective model parts

  • In C#, creating a TextBlock placed outside the visual Workspace that describes the selected model part

  • Brushing the content of the description onto a Viewport3D of a 3D plane primitive

Now that you know how to use ZAM 3D, you are going to import a 3ds model into ZAM 3D and export it as XAML. You will then create a new WPF Application project in Visual Studio 2008 called 3DTieFighterProject and pull the XAML model into the project. You will create buttons all around the model (windshield, left wing, right wing, etc.) and then use your knowledge of Triggers and Storyboards so that when a button is clicked, the model will rotate to show the corresponding part better. Further, you are going to add dummy text to a TextBlock off the Workspace and then use a VisualBrush to brush that text onto a 3D plane you are going to create. With that, let’s get cracking!


Code Block Descriptive Text Visual Studio Left Wing Visible Workspace 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Victor Gaudioso 2008

Personalised recommendations