Clipping Planes

if you try out the background object technique, you'll find that the object may not display correctly or at all, and may have big black holes in it. This is because of the clipping planes. Clipping planes are a way of making the 3D world draw faster, by telling the computer to ignore anything beyond a certain distance. The idea is that if you have a very large world, with lots and lots of objects, many of them will be way off in the distance so that you can barely see them and they'd only be a few pixels tall. These far-off objects would still take just as long to draw as if they were close to you, which is a real waste of time. A Clipping Plane tells the computer "don't drawanything that's more than, say, 1000 feet away, because I wouldn't be able to see it that well anyhow and it's a waste of effort." This type of clipping plane is a "Far" clipping plane; you can also create a "Near" clipping plane to ignore objects that are too close. Why would you want to do this? One thing you can do with it is create cross-section views; the near clip plane will slice right through objects when they get close to you. The near clip plane can also help the disorienting feeling of objects trying to appear too close to your eyes in 3D, or surfaces hitting you in the face as you walk through them.

Using clip planes can speed up your scene dramatically. However, if you have a sky background object, it's probably several thousand feet away, so you would need to extend the clip plane to include it. Or, if you have objects which are far away but very large, like skyscrapers or the moon, you'd need to extend the clip plane for those too.

Both clip planes are defined together in the clip message:

clip ( near, far )

example:

environment ( volume (infinite), clip (0.1, 10000))



(c) Ben Chang