FOG DISTANCE This command will set the visible distance of the fog based on the view from the camera.
Syntax
    FOG DISTANCE Distance
    FOG DISTANCE Start Distance, End Distance
Parameters
    Start Distance
Integer The light number
    End Distance
Integer A distance of zero sets the fog to obscure the camera entirely. A distance of 5000 places the fog to obscure 3D objects as they are Z clipped by the system
Returns
This command does not return a value.
Description
The distance value represents the Z depth at which the fog obscures 3D objects. A distance of zero sets the fog to obscure the camera entirely. A distance of 5000 places the fog to obscure 3D objects as they are Z clipped by the system. A distance greater than 5000 will not obscure distant 3D objects and will allow the objects to be visibly clipped. The parameters should be specified using integer values. The parameter should be specified using an integer value.
Example Code
    sync on

    autocam off

    color backdrop rgb(0,0,0)

    load image "ground.jpg",1

    make matrix 1,1000,1000,100,100

    prepare matrix texture 1,1,1,1

    position matrix 1,-500,0,-500

    position camera 0,100,0

    make object sphere 1,20

    position object 1,0,0,500

    set ambient light 20

    color ambient light rgb(64,64,128)

    fog on

    fog distance 1000

    fog color rgb(255,128,64)

    set point light 0,0,0,500

    position light 0,0,100,0

    color light 0,512,512,255

    set light range 0,1000

    while inkey$()<>"x"

    set cursor 0,0

    print "LIGHT COMMANDS (X to Exit)"

    sync

    endwhile

    delete object 1

    fog off

    end
See also
LIGHT Commands Menu Index