Papervision3D Book Overview
Here’s the Book’s Overview:
How This Book Is Structured
The chapters in this book can be divided into four major parts:
- Getting Started
- Working with Models and Data
- Building Games and Websites
- Extending PV3D and Beyond
Each part has four chapters and each chapter builds on the next with an emphasis on digging into PV3D’s classes, understanding important OOP principles, and creating your own supporting 3D classes.
Part I: Getting Started
In Part I, you learn all the basics to get you up to speed in using PV3D. You learn how to build 3D engines, how to download and get PV3D running, how to build classes, and how to work with primitives and materials. Finally, you extend these concepts to build CS4 primitives with materials.
Chapter 1, “Understanding Flash3D” Flash 3D is one of the fastest-moving areas in web technology. In this chapter, you’ll learn how to build a simple 3D engine in both CS3 and CS4. Using what you learn about 3D engines you’ll create a torus worm, carousel, and image ball. Finally, you examine Disney’s rules for creating realistic animation, and converte a timeline animation into ActionScript.
Chapter 2, “Getting Started With Papervision3D” In this chapter, you are introduced to the basics of Papervision3d, Painter’s Algorithm, and the view frustum. You learn about culling and clipping and examine the guts of Papervision3d. You instantiate your first primitive (a sphere) and add a wireframe material. You extend your application using BasicView, and examine the different ways to run an application.
Chapter 3, “Rezzing Primitives” In this pivotal chapter, you examine how prims are made in both Papervision3D and CS4. You create your own custom prim by examining the parametric equations of different prims. And in the case of creating a Second Life tree, you analyze the potential savings between using Papervision3D and CS4. You learn about the powerful new classes and methods in the CS4 library (such as Matrix3D, drawTriangles, and vectors). And learn to create your own CS4 super prim, using a switch case and timer.
Chapter 4, “Adding Materials” In this chapter you turn the corner from 3D techno-babble to application building. You learn the basics of how materials are used to create objects and about their lighting. You learn how to add brightness to a Papervision3D light source, create shades, and make bump maps. And you extend these concepts to CS4.
Part II: Working with Models and Data
In Part II, you learn how to create your own 3D models and import then into PV3D. You learn to create particle systems, bring Google Maps into PV3D and CS4, and build data-driven applications in Flash, Flex, and Air.
Chapter 5, “Creating 3D Models” In this chapter, you start with modeling and end up with Pixel Bender. Regardless of how PV3D changes over time the principles presented in this chapter will be around for a while. You’ll still need parsers to bring in vertex data regardless of your software environment. And Pixel Bender, the new kid on the block, will obviously become the cornerstone of any new 3D package hitting the scene.
Chapter 6, “Working with Particle Systems” This chapter gives a broad overview of particles in both PV3D and CS4. You start with the PV3D particle system and add some of your own particles to it and create a starry panorama. You build a 3D particle system from scratch and create a Flash CS4 glowworm. You learn how to slice and explode particle systems, and how to use them to interact with video. You take a look at the great work that Plug-in Media is doing and learn how to incorporate FLINT into PV3D.
Chapter 7, “Geocoding, XML, and Data Bases” In this chapter, you turn the corner from learning the inner workings of PV3D to using it to build data-driven web applications. You build a number of applications in Air, Flash CS4, and Flex which illustrat the use of XML, PHP, and MySQL. You learn how to use the Flex data wizard to automatically create PHP code, which is used to make server requests.
Chapter 8, “Gliding on Air” In this chapter, you build your first editor in Adobe Air. During the development process you master the use of a few basic Flex components that you’ll use again to create other editors. Accessing your local pc file system using Air and Flash10, you save your editor results to your local hardrive. You learn about creating grayscale height maps and using the geometry.vertices property to bring those maps into PV3D. Using this you create a PV3D terrain viewer to view your heightmaps. Extending your editor you capture your webcam, programmatically change it into grayscale, and bring it into your PV3D terrain viewer.
Part III: Building Games and Websites
In part III, you explore bringing physics into PV3D by creating custom physics classes, you modify the DisplayObject3D class, and you learn to use Jiglib. You build Wii controlled games, investigate creating multiplayer games using the Flash Media Server, and create a 3D website.
Chapter 9, “Incorporating 3D Physics” In this chapter, you examine a number of approaches to bring physics into PV3D. You start by creating a spring camera, and beefing up the DisplayObject3D class to add gravity effects, to create orbiting planets. You create custom classes for oscillation and learn how to make particles interactive using the interactive scene manager (or ISM). You learn how to build large-scale applications using states, modules, and porting. You examine both WOW and Jiglibflash physics engines. Finally, you build a Jiglib Hello World example and a Jiglib example viewer.
Chapter 10, “Building 3D Games and Wii” Building games is great fun and in this chapter you learn the basics of building game systems, which include game states and multi-levels. This chapter explores two different games: pool “shooting” and pong. In the pool game you learn to build an entire game system based on Flex View States. And in the pong game you learn to build a multi-level Wii controlled game. Both games are built in Flex, but the Pong game could easily be built in Flash since it’s an ActionScript package. You build bounding boxes for your games by hacking the Jiglib PV3D plugin class and creat a skybox.
Chapter 11, “Integrating the Flash Media Server” Creating Rich Internet Applications has long been the goal of Macromedia (now Adobe). An integral part of that has been using the Flash Media Server to create interactive web experiences. In this chapter, you learn how to get your users interacting with 3D objects using remote shared objects. You also create the starter code for a slot car racing game. Finally, you examine alternatives to the FMS such as Red 5, Wowza, and the Flash Collaboration Service.
Chapter 12, “Developing 3D Websites” In this chapter you convert the CSIS 2D site to a 3D site. You create custom tree, cloud, and collage classes and build a 3D navigation system from scratch using PV3D components. You examine a few important reality checks when it comes to building websites: using a design doc, learning Photoshop, and combining 2D with 3D to get an optimized 3D experience. Finally, you learn how to optimize your website for search engines by adding html text to your html-swf wrapper file and by using the SWFObject.
Part IV: Extending PV3D and Beyond
In Part IV, you learn to take PV3D to the next level of performance by using Flash CS4, Photoshop3D, Flash Catalyst, and Flash Builder. You add augmented reality, services and examine a number of CS4 rendering engines.
Chapter 13, “Making 3D Movies” This chapter highlights one of the greatest challenges developers face today-the rapid change in programming architecture and platforms. This is demonstrated by building the Seven Revolutions project from the previous chapter in Flash CS4. Next, Flash Catalyst and its integration into Flash Builder are examined. Finally, the new Animate Super Effects class is used to create a panel animation, Photoshop3D is examined, and a PV3D animation engine which saves its results to the DOM is developed.
Chapter 14, “Taking Virtual Tours” As technology advances, Virtual Reality is playing a key role. In this chapter you examine using VR in the military, using augmented reality, and building 3D worlds. The majority of the chapter treats augmented reality using the FLARToolkit which was created by Saqoosha. Saqoosha’s starter kit code is examined and extended to create PV3D BasicView starter code. Using this starter code a number of items are imported in FLAR including the Jiglib pong game created in the chapter on games.
Chapter 15, “Adding Services” In this chapter you learn to hook up Web Services using Flash Catalyst and Flash Builder. You build a Twitter viewer, Weather checker, Flickr picker, and CNN news reader. Flash Builder has a full range of data connectivity options…WSDL, PHP, Coldfusion, BlazeDS, and LCDS. This makes data connectivity easier and gives you more time for creative development.
Chapter 16, “Exploring Flash 10 and Beyond” Flash 3D coding has come a long way, and over the next few years will transcend even optimistic expectations. In this chapter you scratch the surface of such technologies by rebuilding your 3D pool “shooting” game in Flash Catalyst, and visiting a number of CS4 rendering examples.