Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Papervision3D Essentials

You're reading from  Papervision3D Essentials

Product type Book
Published in Sep 2009
Publisher Packt
ISBN-13 9781847195722
Pages 428 pages
Edition 1st Edition
Languages

Table of Contents (18) Chapters

Papervision3D Essentials
Credits
About the Authors
About the Reviewers
1. Preface
1. Setting Up 2. Building Your First Application 3. Primitives 4. Materials 5. Cameras 6. Moving Things Around 7. Shading 8. External Models 9. Z-Sorting 10. Particles 11. Filters and Effects 12. 3D Vector Drawing and Text 13. Optimizing Performance

Example—shading the Earth in our galaxy


In the previous chapters, we have created a galaxy made of planes, the Earth, a flat-shaded paper plane, and several camera types. With what we have learned in this chapter, we can extend the example and apply shading. We can add more realism to the Earth by adding a shader and a bump map to it. This way we can simulate the presence of the sun and add some relief to the Earth.

Let's take the galaxy example from Chapter 6 as the starting point for this example. There we made use of several classes to create the galaxy. Let's fresh up our memory by summing them up:

  • Galaxy creates a visual representation of the galaxy. It adds the Earth and planes that are used as stars.

  • Player is responsible for creating a flat-shaded paper plane instance as the visual representation of the player.

  • UserInputHandler takes care of handling the user's keyboard input in order to move our player.

  • CameraController is used in order to switch between several camera types...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}