MAXScript Tools and Interaction with 3ds Max > Interacting with the 3ds Max User Interface > Environment And Effects Dialog >

# Environment And Effects Dialog

The following 3ds Max system global variables and methods give you access to the global rendering environment:

### Background Group Of Controls

System Global Variables:

    backgroundColor

Lets you get and set a Color value that defines the global rendering environment (Rendering\Environment) background color.

    backgroundColorController

Lets you get and set a Controller value that defines the global rendering environment (Rendering\Environment) background color controller.

    environmentMap

Lets you get and set a TextureMap value that defines the global rendering environment (Rendering\Environment) environment map.

    useEnvironmentMap

Lets you get and set the global rendering environment (Rendering\Environment) Use Map value. A Boolean value - true if Use Map is on, false if off.

Methods:

    setBackGround [<time>] ( <point3> | <color> )

Lets you set a Point3 or Color value that defines the global rendering environment (Rendering > Environment) background color at the specified time. Each component of the Point3 value is in the range of 0 to 255. If the time value is not specified, the current MAXScript time is used.

    getBackGround [<time>]

Get method that parallels setBackGround method. If the time value is not specified, the current MAXScript time is used.

    setBackGroundController ( <color_controller> | <point3_controller> )

Assigns the specified controller as the global rendering environment background color controller.

    getBackGroundController()

Returns the global rendering environment background color controller.

    getUseEnvironmentMap()

Lets you get the global rendering environment map.

    setUseEnvironmentMap <boolean>

Lets you set the Use global rendering environment map option.

If <boolean> is true the Use Map option will be turned on.

If <boolean> is false the Use Map option will be turned off.

EXAMPLES
    ambientColor = color 10 10 25
    environmentMap = bitmapTexture filename:"foo.bmp"

### Global Lighting Group Of Controls

System Global Variables:

    lightTintColor

Lets you get and set a Color value that defines the global rendering environment (Rendering\Environment) Global Lighting Tint color.

    lightTintColorController

Lets you get and set a Controller value that defines the global rendering environment (Rendering\Environment) Global Lighting Tint color controller.

    lightLevel

Lets you get and set a Float value that defines the global rendering environment (Rendering\Environment) Global Lighting Tint Level.

    lightLevelController

Lets you get and set a Controller value that defines the global rendering environment (Rendering\Environment) Global Lighting Tint Level controller.

    ambientColor

Lets you get and set a Color value that defines the global rendering environment (Rendering\Environment) ambient lighting color.

    ambientColorController

Lets you get and set a Controller value that defines the global rendering environment (Rendering\Environment) ambient lighting color controller.

### Atmosphere Rollout

System Global Variables:

    numAtmospherics

This 3ds Max System Global Variable contains the number of Atmospheric Effects added to the Effects list in the Environment Dialog. This variable is read-only.

Methods:

You can use the following functions for maintaining the list of atmospherics in the global rendering environment:

    addAtmospheric <atmos>

Appends the atmospheric to the Atmospheric Effects list

    getAtmospheric <index_integer>

Retrieves the atmospheric at the indexed position in the Atmospheric Effects list. Index is 1-based.

    setAtmospheric <index_integer> <atmos>

Sets the atmospheric at the indexed position in the Atmospheric Effects list to the specified atmospheric. If the Atmospheric Effects dialog is displayed when this method is called, the displayed Atmospheric Effects list is not updated.

    deleteAtmospheric <index_integer>

Deletes the atmospheric at the indexed position in the Atmospheric Effects list. Index is 1-based.

    editAtmosphere <atmos> <node>

Opens the Environment dialog, and opens the rollout for the specified atmospheric if it has been added to the Atmospheric Effects list. If the specified node is a gizmo for the atmospheric, that gizmo is selected in the atmospheric’s gizmo list.

    editAtmospheric <atmos> [ gizmo: <node> ]

Opens the Environment dialog, and opens the rollout for the specified atmospheric if it has been added to the Atmospheric Effects list. If the optional gizmo: argument is specified, and the specified node is a gizmo for the atmospheric, that gizmo is selected in the atmospheric’s gizmo list.

In 3ds Max 6 and higher, Calling editAtmosphere() or editAtmospheric() without an argument will open the Environment dialog.

#### See Also

- envEffectsDialog - Open and Close the Environment and Effects dialog

- renderSceneDialog Struct

- Render Scene Dialog

- TabbedDialogs - Controlling Tabbed Dialogs