the Environment node

The environment node controls display options for the whole world: the background color, the clipping planes, and fog effects. You can have more than one environment node, to have different settings for different parts of the world. For instance, you might use an environment node to create fog, but only in a specific area.

To do this, the environment node has a volume that it applies to - an area inside a sphere, cube, or cylinder. When the user is inside this volume, the environment node takes effect; when you're outside of the affected area, the environment node does nothing.

environment (volume(sphere 0 0 0 30))

this example is a sphere with a 30-foot radius, centered at the origin. The first 3 numbers are the location of the sphere, and the 4th is the radius.

Creating different shaped volumes:

environment (volume(sphere x y z radius ))

environment (volume(cube x1 y1 z1 x2 y2 z2 ))

environment (volume(cylinder x y z radius height ))

environment (volume(infinite))

 

Sky Color

so far this environment node doesn't do anything. To make it change the background color, you can use the skyColor message:

environment (volume(infinite),skyColor (1 0 0))

This makes the background color bright red. The skyColor messages takes 3 numbers for the red, green, and blue values of the color. Each is on the range from 0 to 1, so skyColor (0 0 0) would make black; skyColor (1 1 1) would make white; skyColor (.3 .7 .8) would make a greenish-blue.


(c) Ben Chang