Article Preview
Buy Now
| Print: | |
| PDF: |
The Topographic Apprentice
The Fog
Adding Mood and Atmosphere to 3D Scenes
Issue: 1.6 (June/July 2003)
Author: Joe Nastasi
Author Bio: Joe Nastasi has been a programmer since 1977 and a full-time REALbasic consultant since version 1.0. He is also the developer of a spacecraft simulator, A-OK! The Wings of Mercury, which was recently awarded a Cubie for Educational software.
Article Description: No description available.
Article Length (in bytes): 3,175
Starting Page Number: 38
RBD Number: 1620
Resource File(s):
1620.sit Updated: Friday, October 17, 2003 at 12:21 PM
Related Link(s): None
Known Limitations: None
Excerpt of article text...
Last month we went over techniques that allowed you to select and move 3DObjects. This month will be a short overview on how best to use the Fog feature of RB3DSpace.
Fog adds atmosphere and drama to a 3D scene. In particular, first person shooters and adventure games benefit greatly from the use of fog.
Fog 101
In general, RB3D blends the geometry that is being drawn with the SkyColor. The ratio of SkyColor to 3D geometry (transparency) depends on each object's distance from the camera and the rate of transparency change. RB3D's implementation of the rate at which the transparency changes is linear, which is to say that the fog becomes thicker at a constant rate.
RB3DSpace has two foggy properties:
FogVisible -- A Boolean value that, when true, causes fog to be drawn in RB3DSpace.
FogStart -- An integer value that defines where the fog will start.
That's it! However, there are two other RB3DSurface properties that affect fog as well:
SkyColor -- A REALbasic Color value that becomes the color of the fog if FogVisible is true.
...End of Excerpt. Please purchase the magazine to read the full article.
Article copyrighted by REALbasic Developer magazine. All rights reserved.
|







