Daylight : System

Daylight system objects are not creatable by MAXScript.

A Daylight system is comprised of a Compass Helper object and an Assembly containing an IES_Sun and an IES_Sky object using a DaylightAssemblyHead. The Light objects can be accessed as properties of the Assembly Head.

The Assembly's transform is controlled by a set of controllers, which are sub-controllers of a Sunlight_Driven_Controller controller. To access the controller, create a Daylight system using the Create>Systems tab in the UI and use:

$Daylight001.controller
Controller:Sunlight_Driven_Controller
Note:

Prior to 3ds Max 2022 this class was called Sunlight_Slave_Controller.

<Sunlight_Driven_Controller>.solar_time Float -- subAnim[3]

The solar time expressed as an integer value of seconds since midnight. To calculate the hours, minutes and seconds, you can use the following function:

SCRIPT:

   fn TimeFromSolarTime dlSystem =
   (
   local solar_time = dlSystem.controller.solar_time.controller.value
   local hrs = int solar_time-- full hours in the solar_time value
   local min = int((solar_time-hrs)*60.0)-- full minutes in the difference between the full time and the full hours
   local sec = int((solar_time-hrs-min/60.0)*3600+ 0.5)-- full seconds in the rest of the value
   #(hrs,min,sec)-- return the result as a 3 elementsarray
   )

   TimeFromSolarTime $Daylight001
<Sunlight_Driven_Controller>.solar_date Float -- subAnim[4]

The solar date represents the days offset fromJune 21 st , the date of the Summer Solstice. You should access the .solar_date.controller.value to get the correct value as a Float.

<Sunlight_Driven_Controller>.latitude Float -- subAnim[5]

The viewer location's latitude.

<Sunlight_Driven_Controller>.longitude Float -- subAnim[6]

The viewer location's longitude.

<Sunlight_Driven_Controller>.orbital_scale Float -- subAnim[7]

The Orbital scale controls the distance of the Assembly from the Compass Helper.

<Sunlight_Driven_Controller>.sky_cover Float -- subAnim[8]

The Sky cover value, 0.0 means Clear, 1.0 means Cloudy.

<Sunlight_Driven_Controller>.manual_position Transform -- subAnim[9]

Contains a PRS Controller to hold the manual transforms.

<Sunlight_Driven_Controller>.manual_intensity Float -- subAnim[10]

Set the intensity when in manual mode.