You are previewing Professional Papervision3D.
O'Reilly logo
Professional Papervision3D

Book Description

Professional Papervision3D describes how Papervision3D works and how real world applications are built, with a clear look at essential topics such as building websites and games, creating virtual tours, and Adobe's Flash 10. Readers learn important techniques through hands-on applications, and build on those skills as the book progresses. The companion website contains all code examples, video step-by-step explanations, and a collada repository.

Table of Contents

  1. Copyright
  2. About the Author
  3. Acknowledgments
  4. Credits
  5. Introduction
    1. Who This Book Is For
    2. What This Book Covers
    3. How This Book Is Structured
      1. Part I: Getting Started
      2. Part II: Working with Models and Data
      3. Part III: Building Games and Websites
      4. Part IV: Extending PV3D and Beyond
      5. Appendices
    4. What You Need to Use This Book
    5. The Book's Companion Website
    6. How to Use This Book
    7. Conventions
    8. Source Code
    9. Errata
    10. p2p.wrox.com
  6. I. Getting Started
    1. 1. Understanding Flash3D
      1. 1.1. 3D Coordinates in Flash 10
      2. 1.2. Building a 3D Flash 9 Engine in 18 Lines of Code
        1. 1.2.1. Applying Thales Theorem
        2. 1.2.2. Deriving the Scaling Equation
        3. 1.2.3. Rendering to the Screen
        4. 1.2.4. Coding Animation
          1. 1.2.4.1. Initialize: Steps 1.3
          2. 1.2.4.2. Listen: Step 4
          3. 1.2.4.3. Loop: Step 5
        5. 1.2.5. Running the Code
        6. 1.2.6. Vanishing Point (Asymptotic Zero)
        7. 1.2.7. Adding a Camera
        8. 1.2.8. Using CS4 (3D Flash 10 Engine in 13 Lines of Code)
        9. 1.2.9. Vanishing Point
      3. 1.3. Using the Big 3
        1. 1.3.1. Translation
          1. 1.3.1.1. Creating a Parametric Particle System (Torus Worm)
          2. 1.3.1.2. Depth Sorting
            1. 1.3.1.2.1. Objects on the Stage
            2. 1.3.1.2.2. Objects in a Display Container
        2. 1.3.2. Rotation
          1. 1.3.2.1. 3D Rotation
          2. 1.3.2.2. Flash 10 Rotation
          3. 1.3.2.3. Creating a Carousel and Image Ball
            1. 1.3.2.3.1. Carousel
            2. 1.3.2.3.2. Image Ball
        3. 1.3.3. Scaling (Basic Principles of Animation)
          1. 1.3.3.1. Turning Timeline Animation into ActionScript
            1. 1.3.3.1.1. Converting Your Animation
          2. 1.3.3.2. Collada Files
      4. 1.4. Summary
    2. 2. Getting Started With Papervision3D
      1. 2.1. Getting Papervision3D
      2. 2.2. Diving into 3D
        1. 2.2.1. Shapes Versus Objects
          1. 2.2.1.1. Splines
          2. 2.2.1.2. Objects
          3. 2.2.1.3. Triangles
        2. 2.2.2. Hidden Surface Drawing
        3. 2.2.3. Painter's Algorithm
        4. 2.2.4. The View Frustum (Culling and Clipping)
          1. 2.2.4.1. Culling
          2. 2.2.4.2. Clipping
      3. 2.3. Exploring the Guts of Papervision3D
        1. 2.3.1. DisplayObject3D
        2. 2.3.2. Running Papervision3D Four Different Ways (Hello World)
        3. 2.3.3. Using Flash or Flex
      4. 2.4. Building a Class
        1. 2.4.1. Writing an OOP (Object Oriented) Class
          1. 2.4.1.1. Extending Your Class (Inheritance)
          2. 2.4.1.2. Chinese Hello
            1. 2.4.1.2.1. HelloClass
            2. 2.4.1.2.2. GoodByeClass
          3. 2.4.1.3. Creating Methods
          4. 2.4.1.4. Defining Scope
          5. 2.4.1.5. Custom Properties
        2. 2.4.2. Formulating a Papervision3D Class
          1. 2.4.2.1. Viewport
          2. 2.4.2.2. Camera
          3. 2.4.2.3. Scene
          4. 2.4.2.4. Renderer
          5. 2.4.2.5. Final Base Code
      5. 2.5. Running Papervision3D Applications
        1. 2.5.1. Document Class
        2. 2.5.2. Class Path
        3. 2.5.3. Flex Builder
      6. 2.6. Adding Motion
        1. 2.6.1. Setting the Stage
        2. 2.6.2. Align
        3. 2.6.3. Scale Mode
        4. 2.6.4. Quality
      7. 2.7. Using BasicView (Hello Plane)
        1. 2.7.1. Encapsulation
        2. 2.7.2. Undulating Sphere using BasicView
      8. 2.8. Incorporating CS4
      9. 2.9. Summary
    3. 3. Rezzing Primitives
      1. 3.1. Understanding Primitives
        1. 3.1.1. Exploring the Guts of a Papervision3D Primitive
          1. 3.1.1.1. Vertices
          2. 3.1.1.2. Face Indices
          3. 3.1.1.3. UV Coordinates
          4. 3.1.1.4. Constructing a Plane
      2. 3.2. Rezzing Primitives to the Stage
        1. 3.2.1. Prim Template Code (Using a Wireframe Material)
        2. 3.2.2. Plane
        3. 3.2.3. Cube
          1. 3.2.3.1. Sphere
          2. 3.2.3.2. Slicing a Sphere
          3. 3.2.3.3. Cylinder
          4. 3.2.3.4. Cone
        4. 3.2.4. Making Ellipsoids
          1. 3.2.4.1. Cylindrical Ellipsoid (oval table)
          2. 3.2.4.2. Spherical Ellipsoid (blimp)
      3. 3.3. Creating Custom Prims
        1. 3.3.1. Pinched Sphere
        2. 3.3.2. Pyramid
        3. 3.3.3. Geodesic
        4. 3.3.4. Curved Plane
        5. 3.3.5. Puckered Cube
        6. 3.3.6. Torus
        7. 3.3.7. Tube
          1. 3.3.7.1. Completing the Cycle
        8. 3.3.8. Hourglass
        9. 3.3.9. Second Life Tree
        10. 3.3.10. Double-Sided Plane
      4. 3.4. Creating CS4 Primitives
        1. 3.4.1. Second Life Tree in Flash CS4
          1. 3.4.1.1. Ease of Use
            1. 3.4.1.1.1. CS4, No Programming Required
            2. 3.4.1.1.2. PV3D, Programming Intensive
          2. 3.4.1.2. Code Required
          3. 3.4.1.3. Portability
          4. 3.4.1.4. CS4 Tree Code
        2. 3.4.2. Plane
        3. 3.4.3. Cube
          1. 3.4.3.1. Create Cube
          2. 3.4.3.2. Animate Cube
        4. 3.4.4. Pyramid
        5. 3.4.5. CS4 Super Prim (Plane, Cylinder, Cone, Sphere, Half Torus . . . )
          1. 3.4.5.1. Adding an Image to a Prim
          2. 3.4.5.2. Timer
      5. 3.5. Dissecting the Big Three
        1. 3.5.1. Camera and Viewport
      6. 3.6. Summary
    4. 4. Adding Materials
      1. 4.1. Applying Textures
        1. 4.1.1. Using Simple Materials (or just Materials)
          1. 4.1.1.1. Wireframe Material Only
          2. 4.1.1.2. Color Material Only
        2. 4.1.2. Material Types
        3. 4.1.3. Adding Materials to a Prim
          1. 4.1.3.1. Texture Template Code (Using Sphere Primitive)
          2. 4.1.3.2. WireframeMaterial
          3. 4.1.3.3. ColorMaterial
        4. 4.1.4. Bitmaps
          1. 4.1.4.1. BitmapMaterial
          2. 4.1.4.2. BitmapAssetsMaterial
          3. 4.1.4.3. BitmapFileMaterial
          4. 4.1.4.4. BitmapViewportMaterial
          5. 4.1.4.5. Putting it all Together
          6. 4.1.4.6. Bitmap Color and Bitmap Wireframe
        5. 4.1.5. Movie Clips
          1. 4.1.5.1. MovieMaterial
          2. 4.1.5.2. MovieAssetsMaterial
          3. 4.1.5.3. VideoStreamMaterial
          4. 4.1.5.4. Video on a Papervision3D Prim
          5. 4.1.5.5. Video on a CS4 Prim
        6. 4.1.6. Understanding Light
        7. 4.1.7. Using Shaders
          1. 4.1.7.1. Shaders Code Template
          2. 4.1.7.2. FlatShadeMaterial
          3. 4.1.7.3. GouraudMaterial
          4. 4.1.7.4. EnvMapMaterial
          5. 4.1.7.5. PhongMaterial
          6. 4.1.7.6. CellMaterial
        8. 4.1.8. Adding Brightness
          1. 4.1.8.1. Updating DisplayObject3D
          2. 4.1.8.2. Updating Shaders
            1. 4.1.8.2.1. Flat
            2. 4.1.8.2.2. Gouraud
            3. 4.1.8.2.3. Cell, Phong, Environment (three-in-one)
        9. 4.1.9. Bump Map
          1. 4.1.9.1. Creating a Bump Map
          2. 4.1.9.2. Putting Your Bump Map in a Panorama
          3. 4.1.9.3. Using Fog and Composite Materials
      2. 4.2. Summary
  7. II. Working with Models and Data
    1. 5. Creating 3D Models
      1. 5.1. Modeling for Papervision3D
        1. 5.1.1. Bringing Down the Count
        2. 5.1.2. Gauging Performance in PV3D
          1. 5.1.2.1. How it Works
          2. 5.1.2.2. Fps
          3. 5.1.2.3. Memory Usage
          4. 5.1.2.4. All the Others
      2. 5.2. Choosing a Modeling Application
        1. 5.2.1. Blender
        2. 5.2.2. 3DSMax
        3. 5.2.3. Google SketchUp
        4. 5.2.4. Swift3D
      3. 5.3. Papervision3D Importers
        1. 5.3.1. What's MD2?
        2. 5.3.2. Model Pack
          1. 5.3.2.1. The Big Trick to Handling Multiple Models
        3. 5.3.3. Creating MD2 Files (MilkShape to the Rescue)
        4. 5.3.4. Making Things Move
        5. 5.3.5. What's Up with KMZ?
        6. 5.3.6. Hello Collada
        7. 5.3.7. Single and Multiple Objects with Simple Images
          1. 5.3.7.1. Setting Planets in Place
          2. 5.3.7.2. Setting Planets in Motion
        8. 5.3.8. Single Object with Multiple Images
          1. 5.3.8.1. Creating a Cubic Panorama Using Multi/Sub-Objects
          2. 5.3.8.2. Creating Your Pano Object
          3. 5.3.8.3. Putting It into PV3D
        9. 5.3.9. Interactive Objects (or Vehicles) and Environments
          1. 5.3.9.1. Grabbing Names from Collada
          2. 5.3.9.2. Creating a Steering Mechanism
          3. 5.3.9.3. Rolling Wheels and Moving the Car
          4. 5.3.9.4. Moving Around the Screen
        10. 5.3.10. Animated Objects
          1. 5.3.10.1. Loading Images from DAE
          2. 5.3.10.2. Loading Images from a Materials List
          3. 5.3.10.3. Spinning Monkey Head
        11. 5.3.11. What's Up with SketchUp?
        12. 5.3.12. Binary versus XML
      4. 5.4. Writing Your Own Parsers
        1. 5.4.1. Papervision3D and Collada
        2. 5.4.2. Simple Blender Exporters
        3. 5.4.3. Simple 3DSMax Exporters
        4. 5.4.4. Understanding Collada Parsers
      5. 5.5. Processing Images (and Pixel Bender)
        1. 5.5.1. What's Pixel Bender?
        2. 5.5.2. Getting Started with Pixel Bender
        3. 5.5.3. Writing a Pixel Bender Filter
          1. 5.5.3.1. Step 1
          2. 5.5.3.2. Step 2
          3. 5.5.3.3. Step 3
        4. 5.5.4. Adding Parameters
        5. 5.5.5. Typical Point Processes
        6. 5.5.6. Grayscale
        7. 5.5.7. Complement
        8. 5.5.8. Brightness
        9. 5.5.9. Exposure
        10. 5.5.10. Color Balance
        11. 5.5.11. Binary Contrast
        12. 5.5.12. Simple Pixelate
        13. 5.5.13. Simple Blur
        14. 5.5.14. Sharpen
        15. 5.5.15. Simple Point Light
        16. 5.5.16. Bloom Brightness
        17. 5.5.17. Multiple Image Processing
        18. 5.5.18. CrossFade
        19. 5.5.19. Subtraction and Addition
        20. 5.5.20. Bringing Pixel Bender into Flash
          1. 5.5.20.1. Exporting Pixel Bender
        21. 5.5.21. Adding Pixel Bender to Papervision3D
          1. 5.5.21.1. Step 1: Creating a Pixel Bender Filter
          2. 5.5.21.2. Step 2: Creating a Pixel Bender Bitmap File Material Class
          3. 5.5.21.3. Step 3: Creation of a Pixel Bender Bitmap Material Class
        22. 5.5.22. Creating a Multiple Light Source
        23. 5.5.23. Animating Your Light Sources
      6. 5.6. Summary
    2. 6. Working with Particle Systems
      1. 6.1. Particle Systems in PV3D
        1. 6.1.1. Creating Particles in PV3D
        2. 6.1.2. Putting Stars in a Skybox
          1. 6.1.2.1. Step 1: Adding Stars around the Earth
          2. 6.1.2.2. Step 2: Adding a SkyBox with Motion
          3. 6.1.2.3. Step 3: Adding Motion
      2. 6.2. Creating a Generic CS4 Particle Class
        1. 6.2.1. Building a Particle3D Class
          1. 6.2.1.1. Connecting to the Movie Clip
          2. 6.2.1.2. ActionScript Main Code
          3. 6.2.1.3. Key Particle Concepts
            1. 6.2.1.3.1. Emitter
            2. 6.2.1.3.2. Regenerator
            3. 6.2.1.3.3. z-Sorter
            4. 6.2.1.3.4. Velocity
            5. 6.2.1.3.5. Gravity
            6. 6.2.1.3.6. Bounce
          4. 6.2.1.4. Lifetime or Bounding Box
          5. 6.2.1.5. Making Things Explode (in Flash CS4)
          6. 6.2.1.6. Slicing an Image
            1. 6.2.1.6.1. Slicing an Image
            2. 6.2.1.6.2. Polymorphism & Encapsulation
            3. 6.2.1.6.3. Interactivity
          7. 6.2.1.7. Integrating Particles and Video
          8. 6.2.1.8. Handling Your Particle Trash
            1. 6.2.1.8.1. Using Dictionaries
          9. 6.2.1.9. Making 2D Surfaces Look 3D (Billboarding)
          10. 6.2.1.10. Mipmapping
      3. 6.3. Plug-in Media
        1. 6.3.1. Making it Snow for Christmas
          1. 6.3.1.1. Scanning
      4. 6.4. Flint Particles
        1. 6.4.1. Viewing Particle Examples
        2. 6.4.2. Using Flint in Papervision3D
      5. 6.5. Getting More Bang Out of Flash
      6. 6.6. Summary
    3. 7. Geocoding, XML, and Databases
      1. 7.1. Geocoding
        1. 7.1.1. Putting a Google Map on a PV3D Prim
        2. 7.1.2. Using Air (Flash Sandbox Security Issue)
        3. 7.1.3. Putting it on the Web with Flex 4 (Gumbo)
      2. 7.2. XML
        1. 7.2.1. What Is XML Anyway?
          1. 7.2.1.1. Using E4X
        2. 7.2.2. Taking a Historic Tour
          1. 7.2.2.1. Importing XML into Flex and Flash
          2. 7.2.2.2. Feeding XML Data into Your Popup
        3. 7.2.3. Building a Planetarium in PV3D
          1. 7.2.3.1. Solution
        4. 7.2.4. Building a Flash CS4 Planetarium
      3. 7.3. Working with MySQL and PHP
        1. 7.3.1. What's a Database Anyway?
        2. 7.3.2. Using Flex with a Database
        3. 7.3.3. Installing a Test Server
        4. 7.3.4. Creating a Map Maker Database
        5. 7.3.5. Automatically Generating PHP
          1. 7.3.5.1. Using the Flex Data Wizard
          2. 7.3.5.2. PHP Side
          3. 7.3.5.3. Creating the Custom Client Side Application
            1. 7.3.5.3.1. What's a Token?
            2. 7.3.5.3.2. Creating Map Makers
            3. 7.3.5.3.3. Changing Data
      4. 7.4. Summary
    4. 8. Gliding on AIR
      1. 8.1. Building a Simple Modeling Program
        1. 8.1.1. Placing Particles at Vertices
          1. 8.1.1.1. Large Cube
          2. 8.1.1.2. Small Cubes
        2. 8.1.2. Modeling Terrains
          1. 8.1.2.1. What's a Heightmap
          2. 8.1.2.2. Displacing Vertices
          3. 8.1.2.3. Adding Color to Your Terrain
      2. 8.2. Creating a Terrain Editor in AIR
        1. 8.2.1. Drawing Code
        2. 8.2.2. Using Radio Buttons
        3. 8.2.3. Adding Sliders
        4. 8.2.4. Using Buttons
        5. 8.2.5. Working with Perlin Noise
        6. 8.2.6. Adding Key listeners
      3. 8.3. Incorporating Adobe AIR
        1. 8.3.1. Accessing your Local File System
        2. 8.3.2. Saving BitmapData
        3. 8.3.3. Saving to Your Local PC Using Flash 10
        4. 8.3.4. Turning Your Webcam into a PV3D Heightmap
        5. 8.3.5. Using SQLite
        6. 8.3.6. Deploying AIR
      4. 8.4. Sculpting a Prim Using face3d
      5. 8.5. Summary
  8. III. Building Games and Websites
    1. 9. Incorporating 3D Physics
      1. 9.1. Understanding the Guts of Physics
        1. 9.1.1. Adding Physics to Your Camera
        2. 9.1.2. Creating Camera Perspectives
        3. 9.1.3. Cruising the Stars Using Cameras
        4. 9.1.4. Adding Physics to the DisplayObject3D Class
          1. 9.1.4.1. Add properties
          2. 9.1.4.2. Iterate the routine
          3. 9.1.4.3. Update the values
        5. 9.1.5. Building Your Own Physics Classes
        6. 9.1.6. Simple Pendulums: Line, Ball, Animation
        7. 9.1.7. Double Pendulum: What's pinning?
        8. 9.1.8. Torsion Pendulum: Cylinder on a Rod
        9. 9.1.9. Foucault Pendulum: A Little More Realism
      2. 9.2. Interacting with Objects in PV3D
        1. 9.2.1. Building an Interactive Cube: Face Level
          1. 9.2.1.1. Method #1
          2. 9.2.1.2. Method #2
        2. 9.2.2. Browser Double-Click Problems
        3. 9.2.3. Building Interactive Particles: Object Level
        4. 9.2.4. Rotating Small Sphere
        5. 9.2.5. Clicking on Particles
        6. 9.2.6. Rolling Over the x, y, z Gizmo
      3. 9.3. Taking it to the Next Level: 3D Wall Course
        1. 9.3.1. The Big Problem
        2. 9.3.2. Rapid Large-Scale Development
      4. 9.4. Using 3rd Party Physics Engines
        1. 9.4.1. WOW Physics
        2. 9.4.2. Jiglibflash
        3. 9.4.3. Implementing Jiglibflash
          1. 9.4.3.1. BasicView Starter Code
          2. 9.4.3.2. Adding Objects
            1. 9.4.3.2.1. Plane
            2. 9.4.3.2.2. Cube
            3. 9.4.3.2.3. Sphere
          3. 9.4.3.3. Jiglib Hello World
        4. 9.4.4. Building an Example Viewer
          1. 9.4.4.1. Using Modules
          2. 9.4.4.2. Adding a Simple Preloader
      5. 9.5. AS3Dmod
        1. 9.5.1. The Heart of AS3Dmod
        2. 9.5.2. Making National Treasure: Porting
      6. 9.6. Summary
    2. 10. Building 3D Games for Wii
      1. 10.1. Shooting Pool in Space
      2. 10.2. Five Game States: Start, Play, Win, Lose, Cancel
        1. 10.2.1. What's Modal Control?
        2. 10.2.2. Adding a Background Image
        3. 10.2.3. Using View States
          1. 10.2.3.1. Filling Your States
          2. 10.2.3.2. Programming Panel Containers
            1. 10.2.3.2.1. Intro State Panel
            2. 10.2.3.2.2. Win and Lose Panels
        4. 10.2.4. Building a Custom Skybox
        5. 10.2.5. Building a Jiglib Bounding Box
        6. 10.2.6. Creating Your Game Elements
          1. 10.2.6.1. Building a Ray Gun
          2. 10.2.6.2. Animating Your Muzzle
          3. 10.2.6.3. Making a Tracer
          4. 10.2.6.4. Creating Pool Balls with Bullet Imprint
          5. 10.2.6.5. Racking Pool Balls
          6. 10.2.6.6. Exploding Balls
          7. 10.2.6.7. Scoring Balls
            1. 10.2.6.7.1. Game Time
            2. 10.2.6.7.2. Game Score
            3. 10.2.6.7.3. Show Gun and Keyboard Focus
          8. 10.2.6.8. Game Sight
        7. 10.2.7. Following Game Flow
          1. 10.2.7.1. initPV3D()
          2. 10.2.7.2. init3D()
          3. 10.2.7.3. createGun()
          4. 10.2.7.4. init2D()
          5. 10.2.7.5. setUpCamera()
          6. 10.2.7.6. setUpListeners()
          7. 10.2.7.7. Game Play
      3. 10.3. Optimizing Your Game for the Web
      4. 10.4. Using Your Wii
        1. 10.4.1. Wii Starter Code
        2. 10.4.2. Drawing with Silly String
          1. 10.4.2.1. Got the Jitters
          2. 10.4.2.2. Virtual Wii Driving
        3. 10.4.3. Adding Wii to Your Game
          1. 10.4.3.1. Using a Sensor Bar
          2. 10.4.3.2. Adding a Virtual Mouse
          3. 10.4.3.3. Integrating Environments
      5. 10.5. Playing Wii Jiglib Pong
        1. 10.5.1. Building the Bounding Box
        2. 10.5.2. Adding Jiglib
        3. 10.5.3. Moving at Constant Velocity
        4. 10.5.4. Adding AI
        5. 10.5.5. Making Game Levels and a Scoring System
        6. 10.5.6. Creating Textboxes
        7. 10.5.7. Adding Reflectivity and a SkyBox
        8. 10.5.8. Building a Wii Navigation System
        9. 10.5.9. Adding Mouse-Controlled Paddle Motion
          1. 10.5.9.1. Getting Your IR Data
      6. 10.6. Summary
    3. 11. Integrating the Flash Media Server
      1. 11.1. Getting Started
        1. 11.1.1. Configuring Your Development Environment
        2. 11.1.2. Connecting to the FMS
        3. 11.1.3. The Big Mistake
        4. 11.1.4. Checking on Your Program's Performance
        5. 11.1.5. Running a RSO Hello World
          1. 11.1.5.1. Instantiating Your RSO
            1. 11.1.5.1.1. Using getRemote
            2. 11.1.5.1.2. Using setProperty
            3. 11.1.5.1.3. Using Sync Event
            4. 11.1.5.1.4. Using changeList
          2. 11.1.5.2. Using the Flex Embed Tag in Flash
        6. 11.1.6. Unprojecting Coordinates
        7. 11.1.7. Dragging Objects
      2. 11.2. Building a Race Track
        1. 11.2.1. Creating a Track
          1. 11.2.1.1. Constructing a Visible Track Class
            1. 11.2.1.1.1. Making a Dash
          2. 11.2.1.2. Constructing a Virtual Highway
            1. 11.2.1.2.1. Having a Wreck
        2. 11.2.2. Adding the FMS to Your Slot Car
        3. 11.2.3. Turning Your Code into a Game
      3. 11.3. FMS Alternatives
        1. 11.3.1. Red 5
        2. 11.3.2. Wowza
        3. 11.3.3. Adobe Flash Collaboration Service
      4. 11.4. Summary
    4. 12. Developing 3D Websites
      1. 12.1. What You Need to Know
        1. 12.1.1. Why Use 3D
        2. 12.1.2. Building it Right in Flash
        3. 12.1.3. Learning Photoshop
        4. 12.1.4. Creating a Site Map
      2. 12.2. Converting CSIS to 3D
        1. 12.2.1. Making it 3D
        2. 12.2.2. Using Reflection
        3. 12.2.3. Making your Collage
        4. 12.2.4. Making Clouds
        5. 12.2.5. Making Trees
        6. 12.2.6. Placing your Panels with XML
          1. 12.2.6.1. Toggling Panels
        7. 12.2.7. Building a Nav System
        8. 12.2.8. Hey! Where's the Preloader?
      3. 12.3. Flirting with Web Spiders
        1. 12.3.1. Using HTML
        2. 12.3.2. Using SWFObject
      4. 12.4. Summary
  9. IV. Extending PV3D and Beyond
    1. 13. Making 3D Movies
      1. 13.1. Houston . . . We've Got a Problem
      2. 13.2. Using Flash CS4
        1. 13.2.1. Rebuilding CSIS Seven Revolutions in Flash CS4
          1. 13.2.1.1. Comparing PV3D and Flash CS4
          2. 13.2.1.2. Placing a TextArea on a 3D Panel
          3. 13.2.1.3. Building Your Navigation Panel
          4. 13.2.1.4. Creating a Sliding Display Object
        2. 13.2.2. Adding a Preloader
      3. 13.3. Bridging the Gap with Flash Catalyst
        1. 13.3.1. Laying it out in Photoshop
        2. 13.3.2. Creating Code Automatically in Flash Catalyst
        3. 13.3.3. Sending Your Work to Flash Builder
      4. 13.4. Pushing the Envelope with Flash Builder
        1. 13.4.1. Birthing a Spark
        2. 13.4.2. Animating in 3D Using Flash Builder
      5. 13.5. Going 3D with Photoshop
        1. 13.5.1. Getting Started Tips
        2. 13.5.2. Unlocking the Power of Google 3D Warehouse
      6. 13.6. Recording 3D Animations
        1. 13.6.1. Creating an Animation Recorder in PV3D
        2. 13.6.2. Storing Your Results Using the DOM
        3. 13.6.3. Animating Spark
      7. 13.7. Building a PV3D Studio
        1. 13.7.1. VizualPV3D
      8. 13.8. Summary
    2. 14. Taking Virtual Tours
      1. 14.1. Hello "Uncle Sam"
        1. 14.1.1. Embracing the Yin of VR
        2. 14.1.2. Using Drones – the Yang of VR
      2. 14.2. Creating Augmented Reality
        1. 14.2.1. Playing a Game in Augmented Reality
          1. 14.2.1.1. Creating BasicView Starter Code
          2. 14.2.1.2. Generating Your Own Markers
          3. 14.2.1.3. Adding Jiglib Physics to FLAR
          4. 14.2.1.4. Creating Multiple Markers
          5. 14.2.1.5. Adding Pong to FLAR
          6. 14.2.1.6. Making FLAR Run Faster
          7. 14.2.1.7. Putting a 3D Model into FLAR
      3. 14.3. Building 3D Worlds
      4. 14.4. Summary
    3. 15. Adding Services
      1. 15.1. Tweeting
        1. 15.1.1. Creating Your Layout in Photoshop
        2. 15.1.2. Adding Interactivity in Flash Catalyst
          1. 15.1.2.1. Creating a Scroll Bar
          2. 15.1.2.2. Creating a List Box
          3. 15.1.2.3. Adding Search
            1. 15.1.2.3.1. Button
            2. 15.1.2.3.2. Search Input
          4. 15.1.2.4. Collapsing Your Entire Panel
        3. 15.1.3. Building Connectivity in Flash Builder
          1. 15.1.3.1. Creating a Data Provider
            1. 15.1.3.1.1. Grabbing Data from the Web
      2. 15.2. Adding 3D to Your Flickr Menu
        1. 15.2.1. Using Photoshop
        2. 15.2.2. Adding 3D in Flash Catalyst
        3. 15.2.3. Hooking it up in Flash Builder
      3. 15.3. Mining Yahoo's Treasure Trove
        1. 15.3.1. Checking Your Local Weather
          1. 15.3.1.1. Examining Your Weather XML
          2. 15.3.1.2. Creating Your Web Service Code
          3. 15.3.1.3. Making Your Widget Interface
            1. 15.3.1.3.1. Input panel
            2. 15.3.1.3.2. Output panel
      4. 15.4. Building a CNN News Feed
        1. 15.4.1. Connecting Your Service
        2. 15.4.2. Binding Your Data
        3. 15.4.3. Configuring Your Data
          1. 15.4.3.1. The Problem
            1. 15.4.3.1.1. Code before
            2. 15.4.3.1.2. Code after
          2. 15.4.3.2. Doing a little Styling
      5. 15.5. Summary
    4. 16. Flash & Math: Exploring Flash 10 and Beyond
      1. 16.1. Rebuilding the 3D Pool "Shooting"
        1. 16.1.1. Laying out Your Game's Framework
          1. 16.1.1.1. Adding Game States in Flash Catalyst
        2. 16.1.2. Adding Code in Flash Builder
        3. 16.1.3. Optimizing PV3D for Flash 10
          1. 16.1.3.1. What do you do?
          2. 16.1.3.2. How long will it take?
          3. 16.1.3.3. Will you get a performance boost?
      2. 16.2. Rendering 3D Models in Flash 10
        1. 16.2.1. Creating a 3D Image Ball
        2. 16.2.2. Using drawTriangles to Build a Shaded TIE Fighter
          1. 16.2.2.1. Flat Shading in CS4
            1. 16.2.2.1.1. The trick
            2. 16.2.2.1.2. How the gradient fill works
            3. 16.2.2.1.3. How the light map is implemented
            4. 16.2.2.1.4. Creating a flat shaded model
          2. 16.2.2.2. Using drawTriangles
        3. 16.2.3. An Orbiting Ship using drawTriangles
          1. 16.2.3.1. So what's the problem?
          2. 16.2.3.2. How the Code Works
        4. 16.2.4. Taking drawTriangles to the Next Level
        5. 16.2.5. Building a Google Wormhole
        6. 16.2.6. Creating a Molecule Viewer
          1. 16.2.6.1. Realizing Huge Time and Code Savings in CS4
          2. 16.2.6.2. Molfile Parser
          3. 16.2.6.3. Creating an Atom File
          4. 16.2.6.4. Creating Molecules and Bonds
          5. 16.2.6.5. Placing Atoms
          6. 16.2.6.6. Creating Chemical Bonds
        7. 16.2.7. Mapping a Single Image onto an Octahedron
          1. 16.2.7.1. Polar Octahedron Derivation
          2. 16.2.7.2. 3D Case
          3. 16.2.7.3. Coding the Parametric Equations
      3. 16.3. Using ILayoutElement
      4. 16.4. Summary
  10. A. Pocket Reference
    1. A.1. Chapter 1: Understanding Flash3D
      1. A.1.1. Helpful Links
      2. A.1.2. Perspective Scaling
      3. A.1.3. Generating Random Colors
      4. A.1.4. 3D Engine in 13 Lines of Code
      5. A.1.5. Torus Parametric Equations
      6. A.1.6. Simple CS4 Depth Sorting
      7. A.1.7. Keith Peters' Depth Sorting
      8. A.1.8. Flash & Math Depth Sorting
      9. A.1.9. 3D Rotation Equations
      10. A.1.10. Degree/Radian Conversions
      11. A.1.11. drawRec Method for Creating Planes
      12. A.1.12. 2D Trig
      13. A.1.13. 3D Trig
    2. A.2. Chapter 2: Getting Started With Papervision3D
      1. A.2.1. Helpful Links
      2. A.2.2. Adding a Viewport to Flex
      3. A.2.3. Simple Extended Class
      4. A.2.4. BasicView Starter Code
    3. A.3. Chapter 3: Rezzing Primitives
      1. A.3.1. Helpful Links
      2. A.3.2. Embedding an Image
      3. A.3.3. Create a Timer
      4. A.3.4. Plane Grid Code
      5. A.3.5. Prim Template Code
      6. A.3.6. Material List (for a Cube)
      7. A.3.7. Cylindrical Ellipsoid Parametric Equations
      8. A.3.8. Spherical Ellipsoid Parametric Equations
      9. A.3.9. Pinched Sphere
      10. A.3.10. Pyramid Grid Code
      11. A.3.11. Curved Plane Grid Code
      12. A.3.12. Elliptical Torus Parametric Equations
      13. A.3.13. Cone Parametric Equations
      14. A.3.14. Switch Case
    4. A.4. Chapter 4: Adding Materials
      1. A.4.1. Helpful Links
      2. A.4.2. Triangle in Flash
      3. A.4.3. Texture Template Code
      4. A.4.4. Affine Transformation
      5. A.4.5. Simple Image Loader
      6. A.4.6. Bitmap Video Capture
      7. A.4.7. Connecting Video to a Netstream
      8. A.4.8. Adding Video to a Primitive
      9. A.4.9. Shader Code Template
      10. A.4.10. Splitting Color into its RGB
      11. A.4.11. Getter/Setter Method
      12. A.4.12. Creating a Bump Map
      13. A.4.13. Rotate Sphere Method
      14. A.4.14. Net Stream in CS4
      15. A.4.15. Creating a Composite Material
    5. A.5. Chapter 5: Creating 3D Models
      1. A.5.1. Helpful Links
      2. A.5.2. Adding StatsView
      3. A.5.3. Frames-per-second
      4. A.5.4. Memory Usage
      5. A.5.5. Adding MD2 to PV3D
      6. A.5.6. MD2 Models as Particles
      7. A.5.7. Master Morphing Equation
      8. A.5.8. Morphing Code Snippet
      9. A.5.9. Referencing Collada Elements by Name
      10. A.5.10. Steps to Adding a Collada File
      11. A.5.11. Grabbing Vehicle Parts from a Collada File
      12. A.5.12. Steering Car Wheels
      13. A.5.13. Rolling Car Wheels
      14. A.5.14. Translating Using Local Coordinates
      15. A.5.15. Loading an Animated Collada File
      16. A.5.16. Loading an Animated Collada File with Material List
      17. A.5.17. Pixel Bender Starter Code
      18. A.5.18. Gray Scale Pixel Bender (PB)
      19. A.5.19. Complement PB
      20. A.5.20. Brightness PB
      21. A.5.21. Exposure PB
      22. A.5.22. Color Balance PB
      23. A.5.23. Binary Contrast PB
      24. A.5.24. Simple Pixelate PB
      25. A.5.25. Sharpen PB
      26. A.5.26. Simple Point Light PB
      27. A.5.27. Bloom Brightness PB
      28. A.5.28. Cross Fade PB
      29. A.5.29. Subtraction PB
      30. A.5.30. Average PB
      31. A.5.31. Simplified Lively Light PB
      32. A.5.32. Creating a Pixel Bender Bitmap Material
      33. A.5.33. Double Lights PB
      34. A.5.34. Animating PB Light Sources
      35. A.5.35. Adding and Removing Particles
    6. A.6. Chapter 6: Working with Particle Systems
      1. A.6.1. Helpful Links
      2. A.6.2. Adding a PV3D Particle System
      3. A.6.3. Adding Additional Particles to PV3D
      4. A.6.4. Adding Sets of Stars
      5. A.6.5. CS4 Particle Starter Code
      6. A.6.6. Emitter at Mouse
      7. A.6.7. Particle Position Based on Velocity
      8. A.6.8. Gravity
      9. A.6.9. Bounce
      10. A.6.10. Explosion Starter Code
      11. A.6.11. Random Number Generator
      12. A.6.12. Book Slicing Code
      13. A.6.13. Polymorphism
      14. A.6.14. Generalized Slicing Code Using an Array Collection
      15. A.6.15. Dragging and Dropping Images
      16. A.6.16. Removing a Particle
      17. A.6.17. Add and Remove Listener
      18. A.6.18. Mipmapping
      19. A.6.19. Christmas Ornaments
      20. A.6.20. 3D Text
    7. A.7. Chapter 7: Geocoding, XML, and Data Bases
      1. A.7.1. Helpful Links
      2. A.7.2. Adding a Google Map to a PV3D Prim
      3. A.7.3. Adding a Google Map to CS4
      4. A.7.4. Switching Button Labels
      5. A.7.5. Flex Slider Code
      6. A.7.6. E4X Expressions
      7. A.7.7. Loading XML
      8. A.7.8. Splitting CSV Data
      9. A.7.9. Toggle Audio
      10. A.7.10. Adding Stars to a Planetarium
      11. A.7.11. Creating Map Marker
      12. A.7.12. Data Base Switch Case
    8. A.8. Chapter 8: Gliding on Air
      1. A.8.1. Helpful Links
      2. A.8.2. Arranging Cubes with geometry.vertices
      3. A.8.3. Grayscale for Elevation Map
      4. A.8.4. Displacing Vertices
      5. A.8.5. Adding Displacement Color
      6. A.8.6. Changing Pixel Color
      7. A.8.7. Perlin Noise
      8. A.8.8. Key Listeners
      9. A.8.9. Key Action Animation Loop Listener
      10. A.8.10. JPEG/PNG Encoders
      11. A.8.11. Saving in Flash 10
    9. A.9. Chapter 9: Incorporating 3D Physics
      1. A.9.1. Helpful Links
      2. A.9.2. Acceleration from Velocity Equations
      3. A.9.3. Velocity from Position Equations
      4. A.9.4. Adding Physics to a Camera
      5. A.9.5. Changing Camera View
      6. A.9.6. Object Navigation
      7. A.9.7. Gravitational Acceleration Physics
      8. A.9.8. Pendulum Pinning
      9. A.9.9. Interactive Scene 3D Event (x, y, z Gizmo)
      10. A.9.10. Pairing WOW and PV3D Objects
      11. A.9.11. Jiglib BasicView Starter Code
      12. A.9.12. Jiglib Plane Shortcut
      13. A.9.13. Jiglib Cube Shortcut
      14. A.9.14. Jiglib Sphere Shortcut
      15. A.9.15. Module Code
      16. A.9.16. Stack Modifier
    10. A.10. Chapter 10: Building 3D Games for Wii
      1. A.10.1. Helpful Links
      2. A.10.2. Adding a Flex Background Image
      3. A.10.3. Flex ViewStates
      4. A.10.4. Center a Panel
      5. A.10.5. Set ViewState (currentState)
      6. A.10.6. Custom Skybox
      7. A.10.7. Jiglib Bounding Box
      8. A.10.8. Draw a Bullet Hole
      9. A.10.9. Rack Balls
      10. A.10.10. Stop Game Method
      11. A.10.11. Time Conversion (milliseconds to seconds and minutes)
      12. A.10.12. Adding a Sight
      13. A.10.13. Sound Method
      14. A.10.14. Wii Starter Code
      15. A.10.15. Get Sensor Bar IR Values
      16. A.10.16. Pong Bounding Box
      17. A.10.17. Constant Velocity Ball
      18. A.10.18. Paddle AI
      19. A.10.19. Adding Textboxes
    11. A.11. Chapter 11: Integrating the Flash Media Server
      1. A.11.1. Helpful Links
      2. A.11.2. Connecting to the Flash Media Server (FMS)
      3. A.11.3. FMS Starter Code
      4. A.11.4. XML Loaded RTMP Address
      5. A.11.5. Remote Shared Object and changeList
      6. A.11.6. Dashed Track Using Knot Theory
    12. A.12. Chapter 12: Developing 3D Websites
      1. A.12.1. Helpful Links
      2. A.12.2. Adding Reflection View
      3. A.12.3. Cylindrical Panorama Class
      4. A.12.4. Instantiating Clouds Using Mod
      5. A.12.5. Randomly Distributing Clouds
      6. A.12.6. Tree Class
      7. A.12.7. Scene and Panel Rotation
      8. A.12.8. Simple Navigation Panel
      9. A.12.9. Move Camera Backwards
    13. A.13. Chapter 13: Making 3D Movies
      1. A.13.1. Helpful Links
      2. A.13.2. Preloader Script
      3. A.13.3. 3D Effects Rotation
    14. A.14. Chapter 14: Taking Virtual Tours
      1. A.14.1. Helpful Links
      2. A.14.2. FLAR BasicView Starter Code
      3. A.14.3. Jiglib Key Code
      4. A.14.4. Adding Multiple Markers
      5. A.14.5. Adding a 3D Model (MD2) to FLAR
    15. A.15. Chapter 15: Adding Services
      1. A.15.1. Helpful Links
      2. A.15.2. HTTPService
      3. A.15.3. Dynamic Twitter URL Loading
      4. A.15.4. HTTPService with fault and send Methods
      5. A.15.5. List Selection Code Stub
      6. A.15.6. Calling a URL (using Try/Catch)
    16. A.16. Chapter 16: Exploring Flash 10 and Beyond
      1. A.16.1. Helpful Links
      2. A.16.2. FXG Fragment
      3. A.16.3. Flash Catalyst States
      4. A.16.4. State Toggle Code
      5. A.16.5. Split & Join Methods
      6. A.16.6. Forward-Backward Button Script
      7. A.16.7. CS4 Dot Product
      8. A.16.8. XML Parser
      9. A.16.9. Simple Culling
      10. A.16.10. Remove Special Characters
      11. A.16.11. forEach Array Method
      12. A.16.12. Molecular drawPath
      13. A.16.13. Parametric Mapping Equations
  11. B. Companion Website
    1. B.1. Book Chapter Videos
    2. B.2. Training Videos
    3. B.3. Current 3D Projects
    4. B.4. Bonus Examples