In chapter 16,I covered all the basics of modeling 3D solids : how to create the points , lines , and polygons that make up a form , even how to give each polygon a color : but if you recall , you just left that color with a 50% transparency , so you could see right through it . so while it was cool to be able to model complex 3D solid, you’re still lacking a lot in terms of realism.
In this chapter , I’m going to remedy that by introducing you to backface culling (not drawing the polygons facing away from you),depth sorting(I covered this a bit in chapter 15,but we’ll take a new look at it in terms of polygons),and 3D lighting.
I think you will be amazed at the results on your 3D models once these three techniques are applied . after the first two, you will be able to cerate 3D solids that actually look solid. With 3D lighting, they will really come alive.
Before we begin , I want to give credit where it is due. Almost all of the code in this chapter was derived from techniques introduced by Todd Yard in chapter 10 of Macromedia Flash MX Studio(friends of ED,2002),(Todd is also the technical reviewer on this book, so it’s not like I was going to sneak anything past him! ) that particular ofMacromedia Flash MX Studio is probably the best single resource I’ve found anywhere on these subjects, and I’ve referred to it every time I’ve needed to apply any of there advanced 3D techniques. As that book is now more than four years old(ancient in terms of technical books)and three versions of Flash behind, I’m really happy to be able to pull the information forward and keep it available and current.
For the examples in this chapter, I am going to build on the rotating, extruded, 3D letter A that was created near the end of the last chapter. This server as a sufficiently complex model that it will be pretty obvious if you do something wrong, and look pretty darn cool when you do everything right!
|