Light Info

class lwsdk.LWLightInfo(self)

Bases: object

Proxy of C++ PCore::LWLightInfo class

 ambient(LWTime time) → color[3]

Returns the color of the global ambient light for the scene at the given time. The RGB levels include the effect of the user's intensity setting for the ambient light.

 ambientIntensity(LWTime time) → double

Returns the ambient intensity at time.

 ambientRaw(LWTime time) → color[3]

Returns the raw ambient value at time.

 color(LWItemID light, LWTime time) → color[3]

Returns the color of the light (with intensity factored in) at the given time. Use the LWLightInfo::rawColor() and LWLightInfo::intensity() methods for separate access to these settings.

 coneAngles(LWItemID light, LWTime time) → (radius, edge)

Returns the cone angles for spotlights. radius is an angle that is half the total light cone angle, and edge is the angular width of the soft edge. Both angles are in radians.

 falloff(LWItemID light) → int

Returns the falloff type. Falloff scales the intensity of a light as a function of d (distance from the light) and r (the value returned by the range function).

lwsdk.LWLFALL_OFF 1 (no falloff)
lwsdk.LWLFALL_LINEAR 1 - d / r (or 0 when d > r)
lwsdk.LWFALL_INV_DIST r / d
lwsdk.LWFALL_INV_DIST_2 (r / d)2

 flags(LWItemID light) → unsigned int

Returns flag bits for settings related to light.

lwsdk.LWLFL_LIMITED_RANGE
lwsdk.LWLFL_NO_DIFFUSE
lwsdk.LWLFL_NO_SPECULAR
lwsdk.LWLFL_NO_CAUSTICS
lwsdk.LWLFL_LENS_FLARE
lwsdk.LWLFL_VOLUMETRIC
lwsdk.LWLFL_NO_OPENGL
lwsdk.LWLFL_FIT_CONE
lwsdk.LWLFL_CACHE_SHAD_MAP

The lwsdk.LWLFL_FIT_CONE flag indicates that the shadow map angle is set to the light's spotlight cone angle.

 intensity(LWItemID light, LWTime time) → double

Returns the light's intensity at the specified time.

 projImage(LWItemID light) → LWImageID

Returns the image ID of the projection image. Use the Image List global to get information about the image.

 quality(LWItemID light, LWTime time) → int

The quality level of an extended (linear or area) light source, proportional to the number of sample points on light.

Beginning with LightWave v11.0, the quality is an absolute sample count.

 range(LWItemID light, LWTime time) → double

Returns the range or nominal distance for light. The interpretation of this value depends on the falloff type. If falloff is linear, the value is the distance at which the intensity of the light falls to 0. For inverse distance falloff types, the value is the distance at which the intensity equals the user's intensity setting for the light. When there's no falloff (the falloff function returns lwsdk.LWLFALL_OFF, or the lwsdk.LWLFL_LIMITED_RANGE flag bit is clear), the return value is undefined.

 rawColor(LWItemID light, LWTime time) → color[3]

Returns the separate components of the light color returned by the LWLightInfo::color() method (sans intensity).

 shadMapAngle(LWItemID light, LWTime time) → double

The angle subtended by the shadow map, in radians.

 shadMapFuzz(LWItemID light, LWTime time) → double

The amount of fuzziness at the edges of shadows in the shadow map.

 shadMapSize(LWItemID light) → int

The size of the shadow map. Shadow maps are square arrays of pixels, so the amount of memory used by a shadow map is proportional to the square of the size.

 shadowColor(LWItemID light, LWTime time) → color[3]

Returns the shadow color for light at the specified time.

 shadowType(LWItemID light) → int

Returns the shadow type for light as one of the following values:

lwsdk.LWLSHAD_OFF
lwsdk.LWLSHAD_RAYTRACE
lwsdk.LWLSHAD_MAP

 type(LWItemID light) → int

Returns the type of light as one of the following values:

lwsdk.LWLIGHT_DISTANT
lwsdk.LWLIGHT_POINT
lwsdk.LWLIGHT_SPOT
lwsdk.LWLIGHT_LINEAR
lwsdk.LWLIGHT_AREA
lwsdk.LWLIGHT_CUSTOM

Previous topic

Bone Info

Next topic

Camera Info

This Page