FOG_COLOR

FOG_COLOR R,G,B

SET THE FOG COLOR IN THE 3D TARGET OBJECT (SCENE3D)

  • Type: Command
  • Parameters: 3
  • Group: 3D Objects

ACTION

The command FOG_COLOR R,G,B set the fog color in the 3D target object (SCENE3D), with the color resulting of the addition of the 3 specified primary components: red (R), green (G) and blue (B).

The intensity of each primary component can vary from 0 to 255. (0 = no color, 255 = full intensity)

Remark: when all the 3 primary components are 0, the result color is black (no color), when all the 3 primary components are 255, the result color is white (addition of the 3 primary colors at maximum intensity).

Recall:

- yellow color (red + green) when B = 0

- gray color when R=G=B

- violet color (red + blue) when G = 0

- black color when R=0, G=0, B=0

- white color when R=255, G=255, B=255

SYNTAX: 3D_COLOR R,G,B

  • R = red component value (integer or real) of the result color.
  • G = green component value (integer or real) of the result color.
  • B = blue component value (integer or real) of the result color.

USE

  • The command FOG_COLOR is used to color the fog.

ERROR

  • If no SCENE3D is created.
  • If R or G or B is not a correct expression.
  • If R or G or B is less than 0 or greater than 255.

EXAMPLE

scene3d 1:full_space 1

3d_sphere 1,10

3d_z_position 1,-500

wait 1000

fog_on:caption 0,"FOG_ON"

wait 1000

fog_off:caption 0,"FOG_OFF"

wait 1000

fog_on

fog_color 220,220,220

caption 0,"FOG_ON"

SEE ALSO

FOG_DISTANCE_MAX

FOG_DISTANCE_MIN

FOG_ON

FOG_OFF