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 ...
Get Professional Papervision3D now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.