E-book details

Papervision3D Essentials. Create interactive Papervision 3D applications with stunning effects and powerful animations

Papervision3D Essentials. Create interactive Papervision 3D applications with stunning effects and powerful animations

Jeff Winder, Carlos Ulloa, Joseph Winder, Paul Tondeur

Ebook
Papervision3D is a powerful real-time 3D engine for Flash. Papervision3D can take externally created 3D models and render them as Flash content, without requiring end-users to download or install an additional plug-in. It has an outstanding reputation within the Flash community and its ease of use has even impressed experienced 3D game developers. However, getting started with Papervision3D can be daunting and mastering it can be challenging. This book guides you through the easiest way to tackle challenges that you may normally face with Papervision3D and master them effectively.
The book will show you how to build Papervision3D applications from scratch in the easiest way, providing plenty of examples that make sense even if you're not a Flash expert. Papervision3D Essentials serves as a comprehensive guide to getting you started, as well as being an invaluable reference for every Papervision3D user and developer. By the end of this book you will be able to create your own projects with real-time 3D rendering.
Since the first release of Papervision3D in 2007, the authors have been involved in various commercial projects with Papervision3D, building up a deep understanding of the engine. In Papervision3D Essentials, the authors share their knowledge to help you create stunning 3D content in Flash and teach you how to work with one of the most exciting open-source Flash projects around. Papervision3D Essentials shows you how to download Papervsion3D and make it work in Flash, Flash Builder and Flex Builder. It provides a short introduction to Object Oriented Programming and classes for those who are new to non-timeline programming. Then, it takes a closer look at the engine, discussing a broad range of topics from how to work with built-in 3D objects to using and animating cameras, 3D objects, and light. Applying materials and textures, using filters and effects, particles and performance optimizations are also covered. Ultimately, this book will provide you with the information you need to build your first Papervision3D application. Covering the basics, but by no means limited to beginners, Papervision3D Essentials provides a thorough explanation of the engine and numerous tips and tricks, making it a valuable resource for every Papervision3D user.
  • Papervision3D Essentials
    • Table of Contents
    • Papervision3D Essentials
    • Credits
    • About the Authors
    • About the Reviewers
    • Preface
      • What this book covers
      • What you need for this book
      • Who this book is for
      • Conventions
      • Reader feedback
      • Customer support
        • Downloading the example code for the book
        • Errata
        • Piracy
        • Questions
    • 1. Setting Up
      • Downloading Papervision3D
        • Difference between compiled and non-compiled source code
        • What is Subversion?
        • Whats inside the ZIP?
        • And what's inside the SWC?
        • Choosing between the SWC, the ZIP, and the SVN
      • Downloading the non-compiled source using SVN
        • On Windows
        • On Mac OS X
      • Downloading the non-compiled source in the ZIP file
      • Downloading the compiled source
      • Configuring your authoring tool for Papervision3D
        • Configuring Flash
          • Set the path to the non-compiled source code in Flash (CS3 and CS4)
          • Set the path to the compiled source code in Flash (Only CS4)
          • Running an example in Flash
        • Configuring Flex Builder and Flash Builder
          • Importing an example project
          • Setting the path to the non-compiled source code in Flex and Flash Builder
          • Setting the path to the SWC in Flex and Flash Builder
          • Running the example in Flex Builder and Flash Builder
      • Where to find the Papervision3D documentation
      • Summary
    • 2. Building Your First Application
      • Introduction to classes and object-oriented programming
        • Creating a custom class
        • Inheritance
      • Working with the Document Class/Main Application File
        • Setting up the document class for Flash
        • Setting up the document class for Flex Builder and Flash Builder
      • Basics of a 3D scene in Papervision3D
        • Scene
        • Camera
        • Viewport
        • 3D Objects
        • Material
        • Render engine
        • Left-handed Cartesian coordinate system
      • Creating a basic class for Papervision3D
        • The basic document class
        • Finalizing your first application
      • Smart programmers use less code
      • Preparing for the book examples
        • Working with the BookExampleTemplate class
      • Summary
    • 3. Primitives
      • The basic elements of 3D objects
        • Vertices
        • Triangles
      • The rendering pipeline
      • Creating and adding primitives
        • Plane
        • Sphere
        • Cylinder
        • Cone
        • Cube
        • PaperPlane
        • Arrow
      • Nesting
        • World space versus local space
        • Creating a pivot point with DisplayObject3D
      • Accessing vertices
        • Examplebuilding a sphere of spheres
      • Summary
    • 4. Materials
      • Introduction to materials
        • Basic properties
      • Basic materials
        • Wireframe material
        • Color material
      • Three ways of using bitmaps as a material
        • BitmapMaterial
          • Using a bitmap shape as material that is generated by code
          • Manually loading and assigning an external bitmap as material
        • BitmapFileMaterial
        • BitmapAssetMaterial
      • Two ways of using a movie clip as material
        • MovieMaterial
        • MovieAssetMaterial
      • VideoStreamMaterial
      • Combining materials
      • Interactivity
        • Material interactivity
          • Using ButtonMode
          • Defining the event listeners
        • Object interactivity
      • Tips and tricks
        • Tiling
        • Flipping your material
        • Power of two textures
      • Examplecreating a carousel
      • Summary
    • 5. Cameras
      • Cameras inherit from DisplayObject3D
      • Basic camera settings
        • Focus and field of view
        • Zoom
        • Zoom, focus, and field of view relate to each other
        • Near and far
      • Camera types
        • The target camera
        • The free camera
          • Demonstrating the difference between the free camera and the target camera
          • Switching between the free camera and the target camera
        • The debug camera
        • The spring camera
          • Adding basic navigation
          • Putting the spring camera to work
      • Setting a target with the lookAt() method
      • Culling
        • Types of culling in 3D computer graphics
        • Two levels of culling in Papervision3D
        • Applying frustum culling
        • Applying culling on viewport level
        • Seeing culling at work
      • Clipping
        • Clipping in Papervision3D with FrustumClipping
        • Seeing frustum clipping at work
        • Culling and clipping in the rendering pipeline
      • Summary
    • 6. Moving Things Around
      • What can we move around?
      • How can we move things around?
      • Rotating objects
        • Alternatives for local rotationpitch(), yaw(), and roll()
        • Another type of rotationrotationX, rotationY, and rotationZ
        • Demonstrating the difference between rotation and local rotation
      • Mouse interaction
        • Getting the distance from the mouse to the center of the stage
        • Basic mouse interaction
        • Mouse interaction with easing
        • Using mouse interaction to rotate an object
        • Orbiting the camera around an object
          • Orbiting the camera by moving the mouse
          • Orbiting the camera by dragging the mouse
          • Clamping the camera rotation
      • Animating with Tweener
        • Downloading Tweener
        • Tweening 3D objects
        • Tweening the camera over a curved path
      • Examplethe galaxy extended
        • Creating a class for user input
        • Creating a class for the galaxy
        • Creating a class for the paper plane
        • Initializing the application in our document class
        • Controlling the camera
          • Adding dynamic zoom
          • Adding a third-person camera
          • Adding a first-person camera
          • Adding random camera perspectives
          • Switching back to the default view
      • Summary
    • 7. Shading
      • Introduction to shading
      • Flat shading
        • FlatShadeMaterial for color-based shading
        • FlatShader for bitmap-based shading
      • Gouraud shading
      • Cell shading
      • Phong shading
      • Bumping your materials
      • Reflection mapping
      • Exampleshading the Earth in our galaxy
        • Adding a shader and a bump map
      • Summary
    • 8. External Models
      • Modeling for Papervision3D
        • Keep your polygon count low
        • Add polygons to resolve artifacts
        • Keep your textures small
        • Use textures that Flash can read
        • Use UV maps
        • Baking textures
        • Use recognizable names for objects and materials
        • Size and positioning
        • Finding the balance between quality and performance
      • Creating a template class to load models
      • Creating models in Autodesk 3ds Max and loading them into Papervision3D
        • Installing COLLADA Max
        • Creating the Utah teapot and export it for Papervision3D
        • Importing the Utah teapot into Papervision3D
        • Exporting and importing the Utah teapot in 3ds format
        • Importing animated models
          • Animation clips
      • Creating and loading models using SketchUp
        • Exporting a model from Google's 3D Warehouse for Papervision3D
        • Importing a Google Earth model into Papervision3D
      • Creating and loading models using Blender
        • Exporting a textured cube from Blender into Papervision3D
      • Keeping control over your materials
      • Summary
    • 9. Z-Sorting
      • What is z-sorting
        • The painter's algorithm
        • Sorting triangles
      • Layering your renders
        • Creating a viewport layer
          • Creating a viewport layer using useOwnContainer
          • Creating and sorting a viewport layer using getChildLayer
          • Creating a viewport layer by instantiating a new ViewportLayer
        • Sorting layers
          • Sorting layers with ViewportLayerSortMode.Z_SORT
          • Sorting layers with ViewportLayerSortMode.ORIGIN_SORT
          • Sorting layers with ViewportLayerSortMode.INDEX_SORT
        • Creating and sorting sublayers
      • Quadtree rendering
      • Summary
    • 10. Particles
      • What particles are and why to use them
        • Billboarding
        • Particle systems
      • Creating particles
      • A template class for all the examples
      • ParticleMaterial
      • BitmapParticleMaterial
        • Using a dynamically drawn bitmap as BitmapParticleMaterial
          • Passing a ParticleBitmap instance to the BitmapParticleMaterial constructor
        • Using a loaded bitmap as BitmapParticleMaterial
      • MovieAssetParticleMaterial
        • Creating an animated movie clip for Flash, Flex Builder, and Flash Builder
        • Exporting the animated clip as an SWC for Flex Builder and Flash Builder to use
        • Creating the document class for Flash, Flex Builder, and Flash Builder
        • Adding interactivity to MovieAssetParticleMaterial
        • Embedding a bitmap in Flex Builder and Flash Builder as the source of MovieAssetParticleMaterial
      • Creating particle fields with the ParticleField class
      • Particles don't have to be tinya billboard example
      • The Flint particle system
        • Downloading the Flint particle system
        • Creating a fountain of shiny balls with Flint
          • The emitter
          • The counter
          • Initializers
          • Actions
          • The renderer
      • Summary
    • 11. Filters and Effects
      • What are filters and effects?
      • Using Flash filters to create effects
        • Applying BlurFilter, DropShadowFilter, and GlowFilter to a 3D object
      • Setting the transparency and blend mode of a viewport layer
        • Changing filters, alpha, and blend mode dynamically
      • Applying filters on viewport level
        • Directly apply filters to the entire viewport
        • Apply filters on viewport level with BitmapViewport3D
      • Built-in Papervision3D effects
        • Creating an effect layer
        • Methods to affect the way the effect is displayed
          • Adding a color effect with BitmapColorEffect
          • Adding a fire effect with BitmapFireEffect
          • Adding a pixelating effect with BitmapPixelateEffect
          • Adding a motion effect with BitmapMotionEffect
      • Adding a Flash filter as an effect with BitmapLayerEffect
        • Combining effects
        • Adjusting the effect with BitmapDrawCommand
      • Adding fog with FogFilter
      • Adding reflection with ReflectionView
        • Adding objects with no reflection
      • Examplecreating depth of field
      • Summary
    • 12. 3D Vector Drawing and Text
      • VectorVision: 3D vector text and drawing
      • Creating a template class for the 3D text examples
      • How to create and add 3D text
      • Font creation
      • Adding interactivity to 3D vector text and shapes
        • Adding interactivity to 3D text
      • Drawing vector shapeslines, circles, and rectangles
      • Drawing lines with Lines3D
        • How drawing with Lines3D works
        • Straight lines
        • Curved lines
        • Adding lines with addNewLine()
        • Creating segmented lines
        • Adding interactivity to Lines3D lines
        • Growing lines example
      • Summary
    • 13. Optimizing Performance
      • Measuring performance
      • Basic optimization strategies
        • Stage quality
        • Other general Flash optimizations
        • Destroy unwanted objects
        • Viewport size
        • Camera frustum and field of view
        • Culling
        • Creative thinking
      • Optimizing materials
        • Transparency
        • Tiled
        • Power of two textures
        • Material size
        • Animated materials
      • Optimizing objects
        • Remove objects that are behind other objects
        • Level of detail
      • Optimizing shading
      • Optimizing rendering
        • Only render when you need to
        • Selective rendering
        • Viewport scaling
      • Summary
    • Index
  • Title: Papervision3D Essentials. Create interactive Papervision 3D applications with stunning effects and powerful animations
  • Author: Jeff Winder, Carlos Ulloa, Joseph Winder, Paul Tondeur
  • Original title: Papervision3D Essentials. Create interactive Papervision 3D applications with stunning effects and powerful animations
  • ISBN: 9781847195739, 9781847195739
  • Date of issue: 2009-09-03
  • Format: Ebook
  • Item ID: e_3bas
  • Publisher: Packt Publishing