0%

Book Description

A step-by-step guide to adding the 3D graphics effects used by professionals to your XNA games.

  • Improve the appearance of your games by implementing the same techniques used by professionals in the game industry

  • Learn the fundamentals of 3D graphics, including common 3D math and the graphics pipeline

  • Create an extensible system to draw 3D models and other effects, and learn the skills to create your own effects and animate them

  • In Detail

    XNA is a very powerful API using which it's easy to make great games, especially when you have dazzling 3D effects. This book will put you on course to implement the same 3D graphics used in professional games to make your games shine, and get those gamers addicted! If you think 3D graphics is something that limits your games, then this book is for you.

    3D Graphics with XNA Game Studio 4.0 is a step by step companion to implement the effects used in professional 3D games in your XNA games. By the time you're done with this book your games would have eye-catching visuals and 3D effects.

    The one thing that can make or break a game is its appearance; players will mostly be attracted to a game if it looks good. With this book you will create your 3D objects and models and make them look more interesting by using shadowing and lighting techniques, and make them move in nasty ways using animation. Want to create realistic terrians for your games? Need some place for your 3D models to engage in battle? This book will enable you to do all that and more, by walking you through the implementation of numerous effects and graphics techniques used in professional games so that you can make them look great.

    Table of Contents

    1. 3D Graphics with XNA Game Studio 4.0
      1. 3D Graphics with XNA Game Studio 4.0
      2. Credits
      3. About the Author
      4. About the Reviewers
      5. www.PacktPub.com
        1. Support files, eBooks, discount offers and more
          1. Why Subscribe?
          2. Free Access for Packt account holders
      6. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Errata
          2. Piracy
          3. Questions
      7. 1. Getting Started with 3D
        1. Setting up a new project
        2. The 3D coordinate system
        3. Matrices
        4. Loading a model
        5. Drawing a model
        6. Creating a Custom Model class
        7. Creating a Camera class
          1. Creating a target camera
          2. Upgrading the camera to a free camera
        8. Calculating bounding spheres for models
        9. View frustum culling
        10. Additional camera types: Arc-Ball
        11. Additional camera types: chase camera
        12. Example—spaceship simulator
          1. XNA Graphics Profiles
        13. Summary
      8. 2. Introduction to HLSL
        1. Getting started
        2. Assigning a shader to a model
        3. Creating a simple effect
        4. Texture mapping
        5. Texture sampling
        6. Diffuse colors
        7. Ambient lighting
        8. Lambertian directional lighting
        9. Phong specular highlights
        10. Creating a Material class to store effect parameters
        11. Summary
      9. 3. Advanced Lighting
        1. Implementing a point light with HLSL
        2. Implementing a spot light with HLSL
        3. Drawing multiple lights
        4. Prelighting
        5. Storing depth and normal values
        6. Creating the light map
        7. Drawing models with the light map
        8. Creating the prelighting renderer
        9. Using the prelighting renderer
        10. Summary
      10. 4. Projection and Shadowing Effects
        1. Projective texturing
        2. Shadow mapping—drawing the depth map
          1. Shadow mapping—projecting the depth texture onto the scene
          2. Shadow mapping—performing the depth comparison
        3. Variance shadow mapping—soft shadows
          1. Variance shadow mapping—blurring the depth texture
        4. Variance shadow mapping—generating shadows
        5. Summary
      11. 5. Shader Effects
        1. Fog
        2. Normal mapping
        3. Generating normal maps with Photoshop
        4. Cube mapping: Making a sky sphere
        5. Cube mapping: Reflections
        6. Rendering sky boxes with Terragen
        7. Creating a reflective water effect
        8. Summary
      12. 6. Billboard and Particle Effects
        1. Creating the BillboardSystem class
        2. Drawing Billboards
        3. Creating clouds with spherical billboarding
        4. Non-rotating billboards
        5. Particle effects
        6. Particle fire
        7. Particle smoke
        8. Summary
      13. 7. Environmental Effects
        1. Building a terrain from a heightmap
        2. Multitexturing
        3. Adding a detail texture to the terrain
        4. Placing plants on the terrain
        5. Adding the finishing touches
        6. Summary
      14. 8. Advanced Materials and Post Processing
        1. Advanced Materials
        2. Post processing
        3. Black and white post processor
        4. Gaussian blur post processor
        5. Depth of field
        6. Glow post processor
        7. Summary
      15. 9. Animation
        1. Object animation
        2. Keyframed animation
        3. Curve interpolation
        4. Building a Race Track from a Curve
        5. Moving a car along the track
        6. Hierarchical animation
        7. Skinned animation
        8. Loading a skinned model
        9. Playing a skinned animation
        10. Changing an animation's play speed
        11. Model attachments
        12. Summary
    18.216.205.123