The following are the primary classes used for working with lights in the 3ds Max SDK.
LightObject
- This is a base class for plug-in lights. It has a method used to retrieve the light's properties at a certain time, a method to create an ObjLightDesc
object. It also has methods that allow the many properties of the light to be read and altered.GenLight
- This is also a possible candidate for plug-in lights to sub-class from. This class, sub-classed from LightObject
, provides a set of additional methods (for example access to the controllers handling the animation of the light's properties).LightscapeLight
- This class derives from GenLight
, and is the base class for all Photometric lights. This class provides methods for getting and setting photometric settings, such as distribution and intensity.Light
- This class describes the properties of the lights used in the interactive renderer. See Light methods in Class GraphicsWindow
for a list of methods that use this class.DefaultLight
- An array of these objects is passed in the Render::Open()
method of a renderer plug-in. This class contains the transformation matrix of the light and a LightState
object (described below) that describes the characteristics of the light.LightState
- This structure describes the properties of a light. When the method LightObject::EvalLightState()
is called, the LightState
structure is updated. This is used, for example, by many of the file format export plug-ins to grab data about the lights they are exporting.LightDesc
- This class has a single method LightDesc::Illuminate()
used to determine the color and direction of the light striking a point. It has two public data members that indicate if the diffuse and/or specular color of objects should be affected by the light.ObjLightDesc
- This class derives from LightDesc
(described above). There is an instance of this class for every instance of a light in the scene. The renderer asks each light in the scene to create one of these objects by calling LightObject::CreateLightDesc()
and passing it the light node. This class has data members that provide information such as a pointer to the node for the light, a LightState
object, various transformation matrices that provide conversions between the light's space and world and camera space. It has a method to retrieve the lights exclusion list, and a method to update the light's data members in this class once per render. It also has a method used in computing volume lighting effects, TraverseVolume(). Skylight ise not exposed as a class in the SDK. However, you can create instances of this class in a scene by passing its class ID to CreateInstance()
.