MAXScript Language Reference > 3ds Max Objects > Node : MAXWrapper > Node Subclasses > Light : Node > Photometric Lights >

# mr_Sun : Light

    mr_Sun - superclass: light; super-superclass:node - 27:10 - classID: #(1901083579, 635572516)

Value > MAXWrapper > Node > Light > mr_Sun

| Lights and Cameras - Quick Navigation

The mr_Sun Photometric light provides physically-based sunlight, esp. in conjunction with the mr_Sun : Light and the mr_Physical_Sky : textureMap environment shader.

Available in 3ds Max 9 and higher.

Constructor

    mr_Sun...
    mentalraySun...

Properties

## mr Sub - Basic Parameters

    <mr_Sun>.on BooleanClass default: true -- boolean
    <mr_Sun>.enabled BooleanClass default: true -- boolean

Get/set the state of the "On" checkbox.

    <mr_Sun>.skymult Float default: 1.0 -- animatable; float; Multiplier

Get/set the "Multiplier" value.

    <mr_Sun>.hasTarget BooleanClass default: true -- boolean; Has_Target

Get/set the state of the "Targeted" checkbox.

    <mr_Sun>.castShadows BooleanClass default: true -- boolean; Cast_Shadows

Get/set the state of the Shadows "On" checkbox.

    <mr_Sun>.shadowSoftness Float default: 1.0 -- animatable; float; Shadow_Softness

Get/set the Shadow "Softness" value.

    <mr_Sun>.shadowSamples Integer default: 8 -- integer; Shadow_Samples

Get/set the "Softness Samples" value.

    <mr_Sun>.inherit BooleanClass default: true -- boolean; Inherit_from_mr_Sky

Get/set the state of the "Inherit from mr Sky" checkbox.

    <mr_Sun>.redblueshift Float default: 0.0 -- animatable; float; Redness

Get/set the "Red/Blue Tint" value.

    <mr_Sun>.Saturation Float default: 1.0 -- animatable; float

Get/set the "Saturation" value.

## mr Sun - Photons

    <mr_Sun>.usephotontarget BooleanClass default: false -- boolean; Use_Photon_Target

Get/set the state of the "Use Photon Target" checkbox.

    <mr_Sun>.photontarget Float default: 0.0 -- animatable; float; Photon_Target

Get/set the Photon Target Radius value.

## mr Sun - Properties not exposed to the UI

    <mr_Sun>.color Color default: (color 255 242.25 229.5) -- color by value
    <mr_Sun>.rgb Color default: (color 255 242.25 229.5) -- animatable; RGB color

Get/set the Sun Color.

    <mr_Sun>.multiplier Float default: 1.0 -- animatable; float; intensity

Get/set the multiplier value.

    <mr_Sun>.targetDistance Float default: 240.0 -- animatable; float; Target_Distance

Get/set the target distance.

    <mr_Sun>.includeList UndefinedClass default: undefined -- value;

Get/set the Include List.

    <mr_Sun>.excludeList Array default: #() -- value

Get/set the Exclude List.

    <mr_Sun>.Haze Float default: 1.0 -- animatable; float

Get/set the Haze value.

    <mr_Sun>.HorizonHeight Float default: 0.0 -- animatable; float; Horizon_Height

Get/set the Horizontal Height value.

    <mr_Sun>.shadowGenerator raytraceShadow default: raytraceShadow:raytraceShadow -- value; SubAnim

Get/set the shadow generator class instance.

    <mr_Sun>.shadowGeneratorByName String default: "Ray Traced Shadows" -- value

Get/set the shadow generator by name.

    <mr_Sun>.raytracedShadows BooleanClass default: true -- value

Get/set whether to use Raytraced Shadows. This property is obsolete and exposed for backwards compatibility only.

    <mr_Sun>.maxDepth Integer default: 7 -- animatable; integer; Max_Quadtree_Depth

Get/set the max. Depth of Raytraced shadows QuadTree.

    <mr_Sun>.raytraceBias Float default: 0.2 -- animatable; float; Bias

Get/set the Bias of the raytraced shadows.

    <mr_Sun>.twoSidedShadows BooleanClass default: false -- boolean

Get/set whether to calculate two-sided shadows.

    <mr_Sun>.useGlobalShadowSettings BooleanClass default: false -- boolean; Use_Global_Shadow_Settings

Get/set whether to use the Global shadow settings.

## mr_Sun interfaces:

    Interface:NaturalLightClass

Methods:

    <boolean>isSun()

    <boolean>isSky()

    Interface:LightProperties

Properties:

    .excludeList: value : Read|Write

    .includeList: value : Read|Write

    .shadowGenerator: value : Read|Write

    .shadowGeneratorByName: value : Read|Write

    .raytracedShadows: value : Read|Write

    .color: color by value : Read|Write

    .enabled: bool : Read|Write