beastapi/beastinstance.h File Reference

#include "beastapitypes.h"

File Description

The api for specifying instances of meshes in Beast.

Typedefs

typedef uint32 ILBRenderStatsMask
 

Enumerations

enum  ILBRenderStatOperation { ILB_RSOP_DISABLE, ILB_RSOP_ENABLE }
 
enum  ILBRenderStats {
  ILB_RS_VISIBLE_FOR_EYE = 0x00000001, ILB_RS_VISIBLE_FOR_REFLECTIONS = 0x00000002, ILB_RS_VISIBLE_FOR_REFRACTIONS = 0x00000004, ILB_RS_VISIBLE_FOR_GI = 0x00000008,
  ILB_RS_CAST_SHADOWS = 0x00000010, ILB_RS_RECEIVE_SHADOWS = 0x00000020, ILB_RS_CAST_GI = 0x00000040, ILB_RS_RECEIVE_GI = 0x00000080,
  ILB_RS_CAST_OCCLUSION = 0x00000100, ILB_RS_RECEIVE_OCCLUSION = 0x00000200, ILB_RS_DOUBLE_SIDED = 0x00000400, ILB_RS_OPPOSITE = 0x00000800,
  ILB_RS_SELF_OCCLUSION = 0x00001000, ILB_RS_SHADOW_BIAS = 0x00002000, ILB_RS_PRIMARY_VISIBILITY = ILB_RS_VISIBLE_FOR_EYE, ILB_RS_VISIBLE_IN_REFLECTIONS = ILB_RS_VISIBLE_FOR_REFLECTIONS,
  ILB_RS_VISIBLE_IN_REFRACTIONS = ILB_RS_VISIBLE_FOR_REFRACTIONS, ILB_RS_VISIBLE_IN_FINAL_GATHER = ILB_RS_VISIBLE_FOR_GI
}
 

Functions

ILBStatus ILBAddInstanceLightLinks (ILBInstanceHandle instance, ILBLightLinkMode mode, const ILBLightHandle *lightSources, int32 count)
 
ILBStatus ILBAddLODInstance (ILBInstanceHandle lowRes, ILBInstanceHandle highRes)
 
ILBStatus ILBCreateInstance (ILBSceneHandle scene, ILBMeshHandle mesh, ILBConstString name, const ILBMatrix4x4 *transform, ILBInstanceHandle *instance)
 
ILBStatus ILBDeleteInstance (ILBInstanceHandle instance)
 
ILBStatus ILBSetInstanceDisplayName (ILBInstanceHandle instance, ILBConstString displayName)
 
ILBStatus ILBSetInstanceMesh (ILBInstanceHandle instance, ILBMeshHandle mesh)
 
ILBStatus ILBSetInstanceMotionTransforms (ILBInstanceHandle instance, const ILBMatrix4x4 *transforms, int32 count)
 
ILBStatus ILBSetInstanceTransform (ILBInstanceHandle instance, const ILBMatrix4x4 *transform)
 
ILBStatus ILBSetMaterialOverrides (ILBInstanceHandle instance, ILBMaterialHandle *materials, int32 materialCount)
 
ILBStatus ILBSetRenderStats (ILBInstanceHandle instance, ILBRenderStatsMask stats, ILBRenderStatOperation operation)
 

Typedef Documentation

typedef uint32 ILBRenderStatsMask

Type representing multiple render stats.

Combine render stats using the or operator (|).
Example:
ILBRenderStatsMask rsMask = ILB_RS_SELF_OCCLUSION | ILB_RS_PRIMARY_VISIBILITY;

Enumeration Type Documentation

Selects if the render stats should be enabled or disabled.

Enumerator
ILB_RSOP_DISABLE 

Sets the render stats supplied to false.

ILB_RSOP_ENABLE 

Sets the render stats supplied to true.

Beast render stats.

Enumerator
ILB_RS_VISIBLE_FOR_EYE 

Controls whether the object should be visible for camera rays.

All other effects such as shadow casting and occlusion casting is unaffected.
Default: Enabled

ILB_RS_VISIBLE_FOR_REFLECTIONS 

Controls whether the object should be visible for reflection rays.


Default: Enabled

ILB_RS_VISIBLE_FOR_REFRACTIONS 

Controls whether the object should be visible for refraction rays.


Default: Enabled

ILB_RS_VISIBLE_FOR_GI 

Controls whether the object should be visible for global illumination rays.


Default: Enabled

ILB_RS_CAST_SHADOWS 

Controls whether the object should cast shadows.


Default: Enabled

ILB_RS_RECEIVE_SHADOWS 

Controls whether the object should receive shadows.


Default: Enabled

ILB_RS_CAST_GI 

If this is set to false, the object is black for GI purposes.

It's still in the scene and casts occlusion, but no light bounces off it and it casts no color bleeding on neighbor objects.
Default: Enabled

ILB_RS_RECEIVE_GI 

Controls whether the object is receiving any GI.

If disabled it only gets direct light.
Default: Enabled

ILB_RS_CAST_OCCLUSION 

Controls whether the object is an occluder when rendering ambient occlusion.


Default: Enabled

ILB_RS_RECEIVE_OCCLUSION 

Controls whether the object is receiving any occlusion when rendering ambient occlusion.


Default: Enabled

ILB_RS_DOUBLE_SIDED 

Controls whether the object should be single sided or double sided.

If single sided, only polygons that are defined CCW from the ray are visible.
Default: Enabled

ILB_RS_OPPOSITE 

Only applies when single sided.

It flips the test for rejecting single sided polygons.
Default: Disabled

ILB_RS_SELF_OCCLUSION 

Controls whether the object cast shadows on itself.


Default: Enabled

ILB_RS_SHADOW_BIAS 

If enabled shadow rays will be biased in order to get smooth shadows on smoothed meshes.


Default: Disabled

ILB_RS_PRIMARY_VISIBILITY 

DEPRECATED This enum will be removed in future versions of the API.


Use the enum ILB_RS_VISIBLE_FOR_EYE instead.

ILB_RS_VISIBLE_IN_REFLECTIONS 

DEPRECATED This enum will be removed in future versions of the API.


Use the enum ILB_RS_VISIBLE_FOR_REFLECTIONS instead.

ILB_RS_VISIBLE_IN_REFRACTIONS 

DEPRECATED This enum will be removed in future versions of the API.


Use the enum ILB_RS_VISIBLE_FOR_REFRACTIONS instead.

ILB_RS_VISIBLE_IN_FINAL_GATHER 

DEPRECATED This enum will be removed in future versions of the API.


Use the enum ILB_RS_VISIBLE_FOR_GI instead.

Function Documentation

ILBStatus ILBAddInstanceLightLinks ( ILBInstanceHandle  instance,
ILBLightLinkMode  mode,
const ILBLightHandle lightSources,
int32  count 
)

Adds an object centric light link list.

Parameters
instancethe instance to add light links to
modesets whether the light links are inclusive or exclusive
lightSourcesan array of light sources that should be linked
countthe number of light sources present in the lightSources array
Returns
The result of the operation.
ILBStatus ILBAddLODInstance ( ILBInstanceHandle  lowRes,
ILBInstanceHandle  highRes 
)

Connects two meshes so one acts as a high resolution instances and one as a lod.

This is used for normal map generation etc. When connected, the low resolution mesh will automatically be set as invisible using renderstats. There can be many high resolution instances for every low resolution instance. An instance can act as high resolution mesh for many low resolution meshes

Parameters
lowResthe instance to act as low resolution mesh in this lod relationship. Will be hidden by this call.
highResthe high resolution mesh in this lod relationship
Returns
The result of the operation.
ILBStatus ILBCreateInstance ( ILBSceneHandle  scene,
ILBMeshHandle  mesh,
ILBConstString  name,
const ILBMatrix4x4 transform,
ILBInstanceHandle instance 
)

Add an instance to the scene.

Parameters
scenethe scene the instance should be a part of
meshthe mesh the instance should reference
namethe name of the instance, must be unique within the scene.
transformthe object space to world space transform for this mesh
instancethe handle to store the generated instance in
Returns
The result of the operation.
+ Examples:
ILBStatus ILBDeleteInstance ( ILBInstanceHandle  instance)

Deletes an instance from a scene.

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

Parameters
instanceinstance to delete
Returns
The result of the operation.
ILBStatus ILBSetInstanceDisplayName ( ILBInstanceHandle  instance,
ILBConstString  displayName 
)

Sets the display name for the instance.

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
instancethe instance to set the name for
displayNamethe display name to set
ILBStatus ILBSetInstanceMesh ( ILBInstanceHandle  instance,
ILBMeshHandle  mesh 
)

Change the mesh of an instance.

Parameters
instancethe instance to change the mesh
meshthe new mesh
Returns
The result of the operation
ILBStatus ILBSetInstanceMotionTransforms ( ILBInstanceHandle  instance,
const ILBMatrix4x4 transforms,
int32  count 
)

Sets the motion transforms of a motion blurred instance.

Parameters
instancethe instance to change
transformsan array of transforms describing the camera motion
countthe number of transforms in the array
Returns
The result of the operation.
ILBStatus ILBSetInstanceTransform ( ILBInstanceHandle  instance,
const ILBMatrix4x4 transform 
)

Sets the transform for an instance.

Parameters
instancethe instance to change
transformthe new transform
Returns
The result of the operation.
ILBStatus ILBSetMaterialOverrides ( ILBInstanceHandle  instance,
ILBMaterialHandle materials,
int32  materialCount 
)

Overrides materials for this instance.

Parameters
instancethe instance to override materials for
materialsan array of materials to override the one specified in the mesh with. It should be in the same order as the material groups in the mesh. A 0 pointer will keep the default material. If the material lists size doesn't match, unassigned materials will stay default and overflowing materials will be ignored.
materialCountthe number of override materials available in the materials array.
Returns
The result of the operation.
+ Examples:
ILBStatus ILBSetRenderStats ( ILBInstanceHandle  instance,
ILBRenderStatsMask  stats,
ILBRenderStatOperation  operation 
)

Sets render stats on an instance.

Parameters
instancethe instance to set the render stats on
statsthe stats to modify. Can be multiple render stats or:ed together
operationselects whether to enable or disable the selected render stats.
Returns
The result of the operation.
+ Examples:

Go to the source code of this file.