beastapi/beastlightsource.h File Reference

#include "beastapitypes.h"

File Description

The api for specifying light sources in beast.

Typedefs

typedef uint32 ILBLightStatsMask
 

Enumerations

enum  ILBFalloffType { ILB_FO_EXPONENT = 0, ILB_FO_MAX_RANGE, ILB_FO_POLYNOMIAL }
 
enum  ILBLightStatOperation { ILB_LSOP_DISABLE, ILB_LSOP_ENABLE, ILB_LSOP_SET }
 
enum  ILBLightStats { ILB_LS_VISIBLE_FOR_EYE = 0x00000001, ILB_LS_VISIBLE_FOR_REFLECTIONS = 0x00000002, ILB_LS_VISIBLE_FOR_REFRACTIONS = 0x00000004, ILB_LS_VISIBLE_FOR_GI = 0x00000008 }
 
enum  ILBLightType {
  ILB_LST_DIRECTIONAL = 0, ILB_LST_POINT, ILB_LST_AREA, ILB_LST_SPOT,
  ILB_LST_WINDOW, ILB_LST_SKY, ILB_LST_AMBIENT
}
 
enum  ILBLightVolumeType { ILB_LVT_INFINITY = 0, ILB_LVT_SPHERE, ILB_LVT_CUBE }
 

Functions

ILBStatus ILBAddLightLightLinks (ILBLightHandle light, ILBLightLinkMode mode, const ILBInstanceHandle *instances, int32 count)
 
ILBStatus ILBChangeLightType (ILBLightHandle light, ILBLightType newType, ILBLightHandle *newHandle)
 
ILBStatus ILBCreateAmbientLight (ILBSceneHandle scene, ILBConstString name, const ILBMatrix4x4 *transform, const ILBLinearRGB *intensity, ILBLightHandle *light)
 
ILBStatus ILBCreateAreaLight (ILBSceneHandle scene, ILBConstString name, const ILBMatrix4x4 *transform, const ILBLinearRGB *intensity, ILBLightHandle *light)
 
ILBStatus ILBCreateDirectionalLight (ILBSceneHandle scene, ILBConstString name, const ILBMatrix4x4 *transform, const ILBLinearRGB *intensity, ILBLightHandle *light)
 
ILBStatus ILBCreatePointLight (ILBSceneHandle scene, ILBConstString name, const ILBMatrix4x4 *transform, const ILBLinearRGB *intensity, ILBLightHandle *light)
 
ILBStatus ILBCreateSkyLight (ILBSceneHandle scene, ILBConstString name, const ILBMatrix4x4 *transform, const ILBLinearRGB *intensity, ILBLightHandle *light)
 
ILBStatus ILBCreateSpotLight (ILBSceneHandle scene, ILBConstString name, const ILBMatrix4x4 *transform, const ILBLinearRGB *intensity, ILBLightHandle *light)
 
ILBStatus ILBCreateWindowLight (ILBSceneHandle scene, ILBConstString name, const ILBMatrix4x4 *transform, const ILBLinearRGB *intensity, ILBLightHandle *light)
 
ILBStatus ILBDeleteLightSource (ILBLightHandle light)
 
ILBStatus ILBGetClippingPlanes (ILBLightHandle light, float *nearDistance, float *farDistance)
 
ILBStatus ILBGetLightCastShadows (ILBLightHandle light, ILBBool *castShadows)
 
ILBStatus ILBGetLightColor (ILBLightHandle light, ILBLinearRGB *color)
 
ILBStatus ILBGetLightDisplayName (ILBLightHandle light, ILBStringHandle *displayName)
 
ILBStatus ILBGetLightExponentFalloff (ILBLightHandle light, float *cutoff, float *exponent, ILBBool *clamp)
 
ILBStatus ILBGetLightFalloffType (ILBLightHandle light, ILBFalloffType *type)
 
ILBStatus ILBGetLightIntensity (ILBLightHandle light, float *intensity)
 
ILBStatus ILBGetLightIntensityScale (ILBLightHandle light, float *directScale, float *indirectScale)
 
ILBStatus ILBGetLightMaxRangeFalloff (ILBLightHandle light, float *cutoff, float *exponent)
 
ILBStatus ILBGetLightName (ILBLightHandle light, ILBStringHandle *name)
 
ILBStatus ILBGetLightPolynomialFalloff (ILBLightHandle light, float *cutoff, float *constant, float *linear, float *quadratic, ILBBool *clamp)
 
ILBStatus ILBGetLightShadowSamples (ILBLightHandle light, int32 *shadowSamples)
 
ILBStatus ILBGetLightStats (ILBLightHandle light, ILBLightStatsMask stats, ILBLightStatsMask *result)
 
ILBStatus ILBGetLightTransform (ILBLightHandle light, ILBMatrix4x4 *transform)
 
ILBStatus ILBGetLightType (ILBLightHandle light, ILBLightType *type)
 
ILBStatus ILBGetLightVolumeType (ILBLightHandle light, ILBLightVolumeType *type)
 
ILBStatus ILBGetShadowAngle (ILBLightHandle light, float *angleRadians)
 
ILBStatus ILBGetShadowRadius (ILBLightHandle light, float *radius)
 
ILBStatus ILBGetSkyLightTexture (ILBLightHandle light, ILBTextureHandle *texture)
 
ILBStatus ILBGetSkyLightTextureFilter (ILBLightHandle light, float *filter)
 
ILBStatus ILBGetSkyLightVolumeType (ILBLightHandle light, ILBLightVolumeType *type)
 
ILBStatus ILBGetSpotlightCone (ILBLightHandle light, float *angleRadians, float *penumbraAngleRadians, float *penumbraExponent)
 
ILBStatus ILBSetCastShadows (ILBLightHandle light, ILBBool castShadows)
 
ILBStatus ILBSetClippingPlanes (ILBLightHandle light, float nearDistance, float farDistance)
 
ILBStatus ILBSetFalloff (ILBLightHandle light, ILBFalloffType type, float exponent, float cutoff, ILBBool clampToOne)
 
ILBStatus ILBSetIntensityScale (ILBLightHandle light, float directScale, float indirectScale)
 
ILBStatus ILBSetLightColor (ILBLightHandle light, const ILBLinearRGB *color)
 
ILBStatus ILBSetLightDisplayName (ILBLightHandle light, ILBConstString displayName)
 
ILBStatus ILBSetLightExponentFalloff (ILBLightHandle light, float cutoff, float exponent, ILBBool clampToOne)
 
ILBStatus ILBSetLightIntensity (ILBLightHandle light, float intensity)
 
ILBStatus ILBSetLightMaxRangeFalloff (ILBLightHandle light, float cutoff, float exponent)
 
ILBStatus ILBSetLightPolynomialFalloff (ILBLightHandle light, float cutoff, float constant, float linear, float quadratic, ILBBool clampToOne)
 
ILBStatus ILBSetLightProjectedTexture (ILBLightHandle light, ILBTextureHandle texture)
 
ILBStatus ILBSetLightRampEntry (ILBLightHandle light, float position, const ILBLinearRGB *value)
 
ILBStatus ILBSetLightStats (ILBLightHandle light, ILBLightStatsMask stats, ILBLightStatOperation operation)
 
ILBStatus ILBSetLightTransform (ILBLightHandle light, const ILBMatrix4x4 *transform)
 
ILBStatus ILBSetLightVolumeType (ILBLightHandle light, ILBLightVolumeType type)
 
ILBStatus ILBSetShadowAngle (ILBLightHandle light, float angleRadians)
 
ILBStatus ILBSetShadowRadius (ILBLightHandle light, float radius)
 
ILBStatus ILBSetShadowSamples (ILBLightHandle light, int32 samples)
 
ILBStatus ILBSetSkyLightTexture (ILBLightHandle light, ILBTextureHandle texture)
 
ILBStatus ILBSetSkyLightTextureFilter (ILBLightHandle light, float filter)
 
ILBStatus ILBSetSkyLightVolumeType (ILBLightHandle light, ILBLightVolumeType type)
 
ILBStatus ILBSetSpotlightCone (ILBLightHandle light, float angleRadians, float penumbraAngleRadians, float penumbraExponent)
 

Typedef Documentation

typedef uint32 ILBLightStatsMask

Type representing multiple light stats.

Combine light stats using the or operator (|).
Example:
ILBLightStatsMask lsMask = ILB_LS_VISIBLE_FOR_EYE | ILB_LS_VISIBLE_FOR_GI;

Enumeration Type Documentation

Describes different falloff for light sources.

Enumerator
ILB_FO_EXPONENT 

Computes falloff as (1.0f / distance) ^ exponent
Note that an exponent of 0 gives no falloff.

ILB_FO_MAX_RANGE 

Computes falloff as (max((maxRange - distance), 0) / maxRange) ^ exponent
.

ILB_FO_POLYNOMIAL 

OpenGL-type fall off.

Not supported yet.

Selects if the light stats should be enabled or disabled.

Enumerator
ILB_LSOP_DISABLE 

Sets the light stats supplied to false.

ILB_LSOP_ENABLE 

Sets the light stats supplied to true.

ILB_LSOP_SET 

Sets the light stats to the value of the light mask.

Status bit masks for light sources.

Enumerator
ILB_LS_VISIBLE_FOR_EYE 

Controls if the light source should be visible for camera rays.

ILB_LS_VISIBLE_FOR_REFLECTIONS 

Controls if the light source should be visible for reflection rays.

ILB_LS_VISIBLE_FOR_REFRACTIONS 

Controls if the light source should be visible for refraction rays.

ILB_LS_VISIBLE_FOR_GI 

Controls if the light source should be visible for global illumination rays.

Describes light types.

Enumerator
ILB_LST_DIRECTIONAL 

Directional light.

ILB_LST_POINT 

Point light.

ILB_LST_AREA 

Area light.

ILB_LST_SPOT 

Spot light.

ILB_LST_WINDOW 

Window light.

ILB_LST_SKY 

Sky light.

ILB_LST_AMBIENT 

Ambient light.

Describes different light volumes for light sources.

Enumerator
ILB_LVT_INFINITY 

Specified the whole 3D space.

ILB_LVT_SPHERE 

A sphere volume.

ILB_LVT_CUBE 

A cube volume.

Function Documentation

ILBStatus ILBAddLightLightLinks ( ILBLightHandle  light,
ILBLightLinkMode  mode,
const ILBInstanceHandle instances,
int32  count 
)

Adds a light centric light link list.

Parameters
lightthe light source to add light links to
modesets whether to link or unlink the light to the instances
instancesan array of instances to link to the light
countthe number of instances present in the instances array
Returns
The result of the operation.
ILBStatus ILBChangeLightType ( ILBLightHandle  light,
ILBLightType  newType,
ILBLightHandle newHandle 
)

Changes the type of a light source.

Retains basic parameters like transform and color but all light type specific parameters are reset to default.

Parameters
lightthe light to change type
newType
newHandle
Returns
The result of the operation.
ILBStatus ILBCreateAmbientLight ( ILBSceneHandle  scene,
ILBConstString  name,
const ILBMatrix4x4 transform,
const ILBLinearRGB intensity,
ILBLightHandle light 
)

Add an ambient light to the scene.

It illuminates the whole scene by default, but this can be altered by setting a light volume type to the light. Use the light transform matrix to change the position and size of the light volume.

Parameters
scenethe scene the ambient light should be a part of
namethe name of the ambient light, must be unique within the scene.
transformthe object space to world space transform for the light
intensitythe colored intensity of the light source
lightthe handle to store the generated light source in
Returns
The result of the operation.
+ Examples:
ILBStatus ILBCreateAreaLight ( ILBSceneHandle  scene,
ILBConstString  name,
const ILBMatrix4x4 transform,
const ILBLinearRGB intensity,
ILBLightHandle light 
)

Add an area light to the scene It points in negative Y direction by default, use the matrix to change its direction.

The area light extends -1.0 to 1.0 in the X/Z dimensions, use scaling to control its area

Parameters
scenethe scene the light should be a part of
namethe name of the light, must be unique within the scene.
transformthe object space to world space transform for the light. It controls the area of the light as well.
intensitythe colored intensity of the light source
lightthe handle to store the generated light source in
Returns
The result of the operation.
+ Examples:
ILBStatus ILBCreateDirectionalLight ( ILBSceneHandle  scene,
ILBConstString  name,
const ILBMatrix4x4 transform,
const ILBLinearRGB intensity,
ILBLightHandle light 
)

Add a directional light to the scene It points in negative Y direction by default, use the matrix to change its direction.

Parameters
scenethe scene the directional light should be a part of
namethe name of the directional light, must be unique within the scene.
transformthe object space to world space transform for the light.
intensitythe colored intensity of the light source
lightthe handle to store the generated light source in
Returns
The result of the operation.
+ Examples:
ILBStatus ILBCreatePointLight ( ILBSceneHandle  scene,
ILBConstString  name,
const ILBMatrix4x4 transform,
const ILBLinearRGB intensity,
ILBLightHandle light 
)

Add a point light to the scene.

Parameters
scenethe scene the point light should be a part of
namethe name of the point light, must be unique within the scene.
transformthe object space to world space transform for the light
intensitythe colored intensity of the light source
lightthe handle to store the generated light source in
Returns
The result of the operation.
+ Examples:
ILBStatus ILBCreateSkyLight ( ILBSceneHandle  scene,
ILBConstString  name,
const ILBMatrix4x4 transform,
const ILBLinearRGB intensity,
ILBLightHandle light 
)

Add a sky light to the scene It illuminates the whole scene by default, but this can be altered by setting a light volume type to the sky light.

Use the light transform matrix to change the position and size of the light volume.

Parameters
scenethe scene the light should be a part of
namethe name of the light, must be unique within the scene.
transformthe object space to world space transform for the light. It controls the light volume of the light as well
intensitythe colored intensity of the light source
lightthe handle to store the generated light source in
Returns
The result of the operation.
+ Examples:
ILBStatus ILBCreateSpotLight ( ILBSceneHandle  scene,
ILBConstString  name,
const ILBMatrix4x4 transform,
const ILBLinearRGB intensity,
ILBLightHandle light 
)

Add a spot light to the scene.

It points in the negative Y-direction by default, use the matrix to point it in a different direction. The default cone angle is 90 degrees.

Parameters
scenethe scene the light should be a part of
namethe name of the light, must be unique within the scene.
transformthe object space to world space transform for the light.
intensitythe colored intensity of the light source
lightthe handle to store the generated light source in
Returns
The result of the operation.
+ Examples:
ILBStatus ILBCreateWindowLight ( ILBSceneHandle  scene,
ILBConstString  name,
const ILBMatrix4x4 transform,
const ILBLinearRGB intensity,
ILBLightHandle light 
)

Add a window light to the scene It points in negative Y direction by default, use the matrix to change its direction.

The window light extends -1.0 to 1.0 in the X/Z dimensions, use scaling to control its area

Parameters
scenethe scene the light should be a part of
namethe name of the light, must be unique within the scene.
transformthe object space to world space transform for the light. It controls the area of the light as well
intensitythe colored intensity of the light source
lightthe handle to store the generated light source in
Returns
The result of the operation.
+ Examples:
ILBStatus ILBDeleteLightSource ( ILBLightHandle  light)

Deletes a light source from a scene.

Only possible for dynamic scenes, ie. scenes associated with a live ernst job.

Parameters
lightlight to delete
Returns
The result of the operation.
ILBStatus ILBGetClippingPlanes ( ILBLightHandle  light,
float *  nearDistance,
float *  farDistance 
)

Gets distance to spotlight clipping planes.

Both light shading and shadow casting is clipped by these planes but attenuation is still calculated from light source position.
Only works for spot lights.

Parameters
lightthe light source to get clipping distances for
nearDistancethe distance to near clipping plane
farDistancethe distance to far clipping plane
Returns
The result of the operation.
ILBStatus ILBGetLightCastShadows ( ILBLightHandle  light,
ILBBool castShadows 
)

Returns whether a light source cast shadows.

This is used for lights returned from an Ernst session.

Parameters
lightthe light to check shadow status
castShadowsis set to true if light source cast shadows, false otherwise
Returns
The result of the operation.
+ Examples:
ILBStatus ILBGetLightColor ( ILBLightHandle  light,
ILBLinearRGB color 
)

Gets the color of a light source.

This is used for lights returned from an Ernst session.

Parameters
lightthe light to get the color for
colorthe returned light color
Returns
The result of the operation.
+ Examples:
ILBStatus ILBGetLightDisplayName ( ILBLightHandle  light,
ILBStringHandle displayName 
)

Gets the display name of a light source.

Display names are not unique within the scene and should only be used by tools to give human understandable names to objects This is used for lights returned from an Ernst session.

Parameters
lightthe light to get the name for
displayNamethe returned light display name
Returns
The result of the operation.
+ Examples:
ILBStatus ILBGetLightExponentFalloff ( ILBLightHandle  light,
float *  cutoff,
float *  exponent,
ILBBool clamp 
)

Returns the falloff parameters from a light source with Exponent falloff.

This is used for lights returned from an Ernst session.

Parameters
lightthe light to get shadow samples
cutoffthe falloff cutoff
exponentthe falloff exponent
clampsets whether to clamp the falloff to be lower or equal to one. If set to false, the falloff is allowed to scale the intensity of the light up as well as down.
Returns
The result of the operation.
+ Examples:
ILBStatus ILBGetLightFalloffType ( ILBLightHandle  light,
ILBFalloffType type 
)

Returns the falloff type from a light source.

This is used for lights returned from an Ernst session.

Parameters
lightthe light to get shadow samples
typethe returned falloff type
Returns
The result of the operation.
+ Examples:
ILBStatus ILBGetLightIntensity ( ILBLightHandle  light,
float *  intensity 
)

Gets light intensity for a light source.

This is used for lights returned from an Ernst session.

Parameters
lightthe light source to get intensity from
intensitythe light intensity
Returns
The result of the operation.
+ Examples:
ILBStatus ILBGetLightIntensityScale ( ILBLightHandle  light,
float *  directScale,
float *  indirectScale 
)

Gets scale for direct and indirect light intensity for a light source.

This is used for lights returned from an Ernst session.

Parameters
lightthe light source to get intensities
directScaledirect light intensity scale
indirectScaleindirect light intensity scale
Returns
The result of the operation.
+ Examples:
ILBStatus ILBGetLightMaxRangeFalloff ( ILBLightHandle  light,
float *  cutoff,
float *  exponent 
)

Returns the falloff parameters from a light source with MaxRange falloff.

This is used for lights returned from an Ernst session.

Parameters
lightthe light to get shadow samples
cutoffthe falloff cutoff
exponentthe falloff exponent
Returns
The result of the operation.
+ Examples:
ILBStatus ILBGetLightName ( ILBLightHandle  light,
ILBStringHandle name 
)

Gets the name of a light source.

This is used for lights returned from an Ernst session.

Parameters
lightthe light to get the name for
namethe returned light name
Returns
The result of the operation.
+ Examples:
ILBStatus ILBGetLightPolynomialFalloff ( ILBLightHandle  light,
float *  cutoff,
float *  constant,
float *  linear,
float *  quadratic,
ILBBool clamp 
)

Returns the falloff parameters from a light source with Polynomial falloff.

This is used for lights returned from an Ernst session.

Parameters
lightthe light to get shadow samples
cutoffthe falloff cutoff
constantthe falloff constant factor
linearthe falloff linear factor
quadraticthe falloff quadratic factor
clampsets whether to clamp the falloff to be lower or equal to one. If set to false, the falloff is allowed to scale the intensity of the light up as well as down.
Returns
The result of the operation.
+ Examples:
ILBStatus ILBGetLightShadowSamples ( ILBLightHandle  light,
int32 *  shadowSamples 
)

Returns the number of shadow samples a light source will use.

This is used for lights returned from an Ernst session.

Parameters
lightthe light to get shadow samples
shadowSamplesthe number of shadow samples
Returns
The result of the operation.
+ Examples:
ILBStatus ILBGetLightStats ( ILBLightHandle  light,
ILBLightStatsMask  stats,
ILBLightStatsMask result 
)

Query light stats for a light source.

Parameters
lightthe light source to get light stats from.
statsthe stats to query. Can be multiple light stats or:ed together.
resultthe result of the query. A bitwise AND operation is done on the individual stats. given stats are true the result is true, and false otherwise.
Returns
The result of the operation.
+ Examples:
ILBStatus ILBGetLightTransform ( ILBLightHandle  light,
ILBMatrix4x4 transform 
)

Gets the transform of a light source.

This is used for lights returned from an Ernst session.

Parameters
lightthe light to get the transform for
transformthe returned light transform
Returns
The result of the operation.
+ Examples:
ILBStatus ILBGetLightType ( ILBLightHandle  light,
ILBLightType type 
)

Gets the type of a light source.

This is used for lights returned from an Ernst session.

Parameters
lightthe light to get the type for
typethe returned light type
Returns
The result of the operation.
+ Examples:
ILBStatus ILBGetLightVolumeType ( ILBLightHandle  light,
ILBLightVolumeType type 
)

Gets light volume type for a light source.


Only valid for ambient lights and sky lights. This is used for lights returned from an Ernst session.

Parameters
lightlight to set light volume type on
typethe volume type to use
Returns
The result of the operation.
+ Examples:
ILBStatus ILBGetShadowAngle ( ILBLightHandle  light,
float *  angleRadians 
)

Gets the angle covered of the sky for a directional light or window light for shadow casting purposes.

This is used for lights returned from an Ernst session.

Parameters
lightthe light source to get the radius on.
angleRadiansthe angle in radians.
Returns
The result of the operation.
+ Examples:
ILBStatus ILBGetShadowRadius ( ILBLightHandle  light,
float *  radius 
)

Gets a radius for the light source as a shadow caster.

Only valid for point and spot lights. This is used for lights returned from an Ernst session.

Parameters
lightthe light source to get the radius on.
radiusthe radius.
Returns
The result of the operation.
+ Examples:
ILBStatus ILBGetSkyLightTexture ( ILBLightHandle  light,
ILBTextureHandle texture 
)

Gets a texture from a sky light.


Only valid for sky lights This is used for lights returned from an Ernst session.

Parameters
lightlight to get texture from
texturethe texture handle
Returns
The result of the operation.
ILBStatus ILBGetSkyLightTextureFilter ( ILBLightHandle  light,
float *  filter 
)

Gets texture filter size from a sky light.


Only valid for sky lights This is used for lights returned from an Ernst session.

Parameters
lightlight to get filter size from
filterthe filter size
Returns
The result of the operation.
ILBStatus ILBGetSkyLightVolumeType ( ILBLightHandle  light,
ILBLightVolumeType type 
)

Gets light volume type for a sky light.


Only valid for sky lights This is used for lights returned from an Ernst session.

Deprecated:
Use ILBGetLightVolumeType() instead
Parameters
lightlight to set light volume type on
typethe volume type to use
Returns
The result of the operation.
ILBStatus ILBGetSpotlightCone ( ILBLightHandle  light,
float *  angleRadians,
float *  penumbraAngleRadians,
float *  penumbraExponent 
)

Gets the cone angle for a spotlight.

The cone is given in radians for the entire cone (as opposed to the angle towards the forward direction). The penumbra angle is the angle from the edge of the cone over which the intensity falls off to zero. The effective spread of the cone is max( angleRadians, angleRadians + 2*penumbraAngleRadians ) since the penumbra angle can be both positive and negative. This is used for lights returned from an Ernst session.

Parameters
lightthe light source to get cone angle for
angleRadiansthe angle in radians for the cone
penumbraAngleRadiansthe angle of the penumbra of the spot light. It's given as the difference from the cone angle and can be both negative and positive.
penumbraExponentthe exponent for the gradient in the penumbra
Returns
The result of the operation.
+ Examples:
ILBStatus ILBSetClippingPlanes ( ILBLightHandle  light,
float  nearDistance,
float  farDistance 
)

Sets distance to spotlight clipping planes.

Both light shading and shadow casting is clipped by these planes but attenuation is still calculated from light source position.
Only works for spot lights.

Parameters
lightthe light source to set clipping distances for
nearDistancethe distance to near clipping plane
farDistancethe distance to far clipping plane
Returns
The result of the operation.
ILBStatus ILBSetFalloff ( ILBLightHandle  light,
ILBFalloffType  type,
float  exponent,
float  cutoff,
ILBBool  clampToOne 
)

Sets the falloff for a light source.

Not valid for directional lights, sky lights and ambient lights. By default falloff is disabled. By default clamping is enabled.

Parameters
lightthe light source to set falloff for
typethe falloff type to use
exponentsets the exponent for the falloff
cutoffsets the influence range for the light source. It affects both falloff types, for exponent it's a hard cutoff where the light stops affecting at all. For max range it sets where the light intensity fades to zero
clampToOnesets whether to clamp the falloff to be lower or equal to one. If set to false, the falloff is allowed to scale the intensity of the light up as well as down.
Returns
The result of the operation.
+ Examples:
ILBStatus ILBSetIntensityScale ( ILBLightHandle  light,
float  directScale,
float  indirectScale 
)

Sets scale for direct and indirect light intensity for a light source.

Parameters
lightthe light source to set intensities
directScaledirect light intensity scale
indirectScaleindirect light intensity scale
Returns
The result of the operation.
+ Examples:
ILBStatus ILBSetLightColor ( ILBLightHandle  light,
const ILBLinearRGB color 
)

Sets the color for a light source.

Parameters
lightthe light source to change
colorthe new color
Returns
The result of the operation.
ILBStatus ILBSetLightDisplayName ( ILBLightHandle  light,
ILBConstString  displayName 
)

Sets the display name for the light source.

This name does not have to be unique within the scene and can be used by tools to give human understandable names to objects that has names that are generated and for some reason isn't suitable to read

Parameters
lightthe light to set the name for
displayNamethe display name to set
+ Examples:
ILBStatus ILBSetLightExponentFalloff ( ILBLightHandle  light,
float  cutoff,
float  exponent,
ILBBool  clampToOne 
)

Sets the falloff to type "Exponent" for a light source.

Not valid for directional lights, sky lights and ambient lights. By default falloff is disabled. By default clamping is enabled.

Parameters
lightthe light source to set falloff for
cutoffhard cutoff range where the light stops affecting at all.
exponentsets the exponent for the falloff
clampToOnesets whether to clamp the falloff to be lower or equal to one. If set to false, the falloff is allowed to scale the intensity of the light up as well as down.
Returns
The result of the operation.
+ Examples:
ILBStatus ILBSetLightIntensity ( ILBLightHandle  light,
float  intensity 
)

Sets light intensity for a light source.

Parameters
lightthe light source to set intensity
intensitythe light intensity
Returns
The result of the operation.
+ Examples:
ILBStatus ILBSetLightMaxRangeFalloff ( ILBLightHandle  light,
float  cutoff,
float  exponent 
)

Sets the falloff to type "Max Range" for a light source.

Not valid for directional lights, sky lights and ambient lights. By default falloff is disabled. By default clamping is enabled.

Parameters
lightthe light source to set falloff for
cutoffsets where the light intensity reaches zero.
exponentsets the exponent for the falloff
Returns
The result of the operation.
+ Examples:
ILBStatus ILBSetLightPolynomialFalloff ( ILBLightHandle  light,
float  cutoff,
float  constant,
float  linear,
float  quadratic,
ILBBool  clampToOne 
)

Sets the falloff to type "Polynomial" for a light source.

Not valid for directional lights, sky lights and ambient lights. By default falloff is disabled. By default clamping is enabled.

Parameters
lightthe light source to set falloff for
cutoffsets the influence range for the light source.
constant
linear
quadratic
clampToOnesets whether to clamp the falloff to be lower or equal to one. If set to false, the falloff is allowed to scale the intensity of the light up as well as down.
Returns
The result of the operation.
+ Examples:
ILBStatus ILBSetLightProjectedTexture ( ILBLightHandle  light,
ILBTextureHandle  texture 
)

Sets a projected texture for a light source (gobo).


Only works for spot lights.

Parameters
lightlight to add gobo on
texturetexture to use as gobo
Returns
The result of the operation.
+ Examples:
ILBStatus ILBSetLightRampEntry ( ILBLightHandle  light,
float  position,
const ILBLinearRGB value 
)

Adds a light ramp entry for falloff calculation.

The ramp extends from 0 to 1 in light space, use the transformation matrix to control the scale.
Works on point and spot lights.

Parameters
lightlight source to manipulate
positionposition in the ramp. Must be greater than 0 and greater than the last position.
valuecolor of the given position in the ramp.
Returns
The result of the operation.
+ Examples:
ILBStatus ILBSetLightStats ( ILBLightHandle  light,
ILBLightStatsMask  stats,
ILBLightStatOperation  operation 
)

Sets light status bits for a light source.

Parameters
lightthe light source to set light stats for
statsthe stats to modify. Can be multiple light stats or:ed together
operationselects whether to enable or disable the selected light stats.
Returns
The result of the operation.
+ Examples:
ILBStatus ILBSetLightTransform ( ILBLightHandle  light,
const ILBMatrix4x4 transform 
)

Sets the transform for a light source.

Parameters
lightthe light source to change
transformthe new transform
Returns
The result of the operation.
+ Examples:
ILBStatus ILBSetLightVolumeType ( ILBLightHandle  light,
ILBLightVolumeType  type 
)

Sets light volume type for a light source.


Only works for ambient lights and sky lights.

Parameters
lightlight to set light volume type on
typethe volume type to use
Returns
The result of the operation.
+ Examples:
ILBStatus ILBSetShadowAngle ( ILBLightHandle  light,
float  angleRadians 
)

Sets the angle covered of the sky for a directional light or window light for shadow casting purposes.

The angle is 0 by default

Parameters
lightthe light source to set the radius on.
angleRadiansthe angle in radians.
Returns
The result of the operation.
+ Examples:
ILBStatus ILBSetShadowRadius ( ILBLightHandle  light,
float  radius 
)

Sets a radius for the light source as a shadow caster.

Only valid for point and spot lights. The radius is 0 by default.

Parameters
lightthe light source to set the radius on.
radiusthe radius.
Returns
The result of the operation.
+ Examples:
ILBStatus ILBSetSkyLightTexture ( ILBLightHandle  light,
ILBTextureHandle  texture 
)

Sets a texture for a sky light.

The texture should be in Lat/Long format.
Only works for sky lights

Parameters
lightlight to set texture on
texturetexture to use
Returns
The result of the operation.
+ Examples:
ILBStatus ILBSetSkyLightTextureFilter ( ILBLightHandle  light,
float  filter 
)

Sets texture filter size for a sky light.


Only works for sky lights

Parameters
lightlight to set filter size on
filterthe filter size to use
Returns
The result of the operation.
ILBStatus ILBSetSkyLightVolumeType ( ILBLightHandle  light,
ILBLightVolumeType  type 
)

Sets light volume type for a sky light.


Only works for sky lights

Deprecated:
Use ILBSetLightVolumeType() instead
Parameters
lightlight to set light volume type on
typethe volume type to use
Returns
The result of the operation.
+ Examples:
ILBStatus ILBSetSpotlightCone ( ILBLightHandle  light,
float  angleRadians,
float  penumbraAngleRadians,
float  penumbraExponent 
)

Sets the cone angle for a spotlight.

The cone is given in radians for the entire cone (as opposed to the angle towards the forward direction). The penumbra angle is the angle from the edge of the cone over which the intensity falls off to zero. The effective spread of the cone is max( angleRadians, angleRadians + 2*penumbraAngleRadians ) since the penumbra angle can be both positive and negative. The default cone angle is PI / 2 (90 degrees), The default is penumbra angle 0 The default penumbra exponent is 1

Parameters
lightthe light source to set cone angle for
angleRadiansthe angle in radians for the cone
penumbraAngleRadiansthe angle of the penumbra of the spot light. It's given as the difference from the cone angle and can be both negative and positive.
penumbraExponentthe exponent for the gradient in the penumbra
Returns
The result of the operation.
+ Examples:

Go to the source code of this file.