O'Reilly logo

Professional Papervision3D by Michael Lively

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8. Gliding on AIR

You're about to take another step deeper into the world of modeling: terrain mapping. But you're probably wondering, "Isn't AIR a desktop application? Aren't you trying to put things on the web instead?" And the answer to both questions is, "yes". Using AIR you'll create a modeling program that allows you to save your work into an XML file. The file can then be uploaded into Papervision3D and run on the web.

It's a simple equation: an AIR Modeling application outputs a data file that's sucked up by PV3D and then used on the web.

None of this is currently in PV3D, and in this chapter you learn everything you need to know to build your own modeling program. You start by examining how vertices are placed, height maps made, and terrains are built. You use AIR to save your XML outputted terrain maps, and import those maps into PV3D for use. You then extend this application and make saveable terrain maps from your webcam. Finally, you build a simple lathe.

Building a Simple Modeling Program

One of the coolest things you can do in PV3D is to build a simple modeling program. As there's so much difficulty in bringing models in from other programs (such as 3DMax, SketchUp, Blender), why not build your models in PV3D natively? Models built natively in PV3D function more efficiently.

The geometry.vertices property is one of the keys that aid you in creating modeling programs in PV3D. This property let's you rearrange vertices programmatically, and place particles in various ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required