Chapter 10: 3D Models

Quiz Answers

  1. What model format(s) are supported in XNA?

    • XNA supports .x and .fbx model files.

  2. Why use a model when you can just draw things on your own?

    • Models allow you to build a model or design in a third-party tool specifically designed for artistically modeling and molding three-dimensional objects. It would be nearly impossible to develop objects by hand in XNA 3D using primitives and attain the same level of detail and complexity that is achievable using a model.

  3. What type of effect are models loaded with by default when they're loaded into XNA?

    • By default, models in XNA use BasicEffects.

  4. Fact or fiction: if your model has separate texture files associated with it, but those files aren't in the location specified by the model file, your game will crash when it tries to load the model.

    • Fiction. Your game would not compile if textures were missing. The content pipeline would throw a compilation error.

  5. What number comes next in the sequence {4, 8, 15, 16, 23}?

Exercise Answer

  1. Take the code from this chapter and create a new subclass of BasicModel in which the ship moves back and forth between (0, 0, 0) and (0, 0, −400). Make the ship turn appropriately to always face the direction in which it is going.

    • There are numerous solutions that will give you the effect described here. The following solution uses a ...

Get Learning XNA 3.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.