beastapi/beastinstance.h File Reference
The api for specifying instances of meshes in Beast.
|
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
} |
|
|
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) |
|
Type representing multiple render stats.
Combine render stats using the or operator (|).
Example:
ILBRenderStatsMask rsMask = ILB_RS_SELF_OCCLUSION | ILB_RS_PRIMARY_VISIBILITY;
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.
|
Adds an object centric light link list.
- Parameters
-
instance | the instance to add light links to |
mode | sets whether the light links are inclusive or exclusive |
lightSources | an array of light sources that should be linked |
count | the number of light sources present in the lightSources array |
- Returns
- The result of the operation.
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
-
lowRes | the instance to act as low resolution mesh in this lod relationship. Will be hidden by this call. |
highRes | the high resolution mesh in this lod relationship |
- Returns
- The result of the operation.
Add an instance to the scene.
- Parameters
-
scene | the scene the instance should be a part of |
mesh | the mesh the instance should reference |
name | the name of the instance, must be unique within the scene. |
transform | the object space to world space transform for this mesh |
instance | the handle to store the generated instance in |
- Returns
- The result of the operation.
- examples-physical/code/common/samplescommon.h, examples/code/atlas/atlas.cpp, examples/code/baking/baking.cpp, examples/code/cache/cache.cpp, examples/code/ernst/ernst.cpp, examples/code/lightsources/lightsources.cpp, examples/code/liveernst/liveernst.cpp, examples/code/lua/lua.cpp, examples/code/materials/materials.cpp, examples/code/occlusion/occlusion.cpp, examples/code/pointcloud/pointcloud.cpp, examples/code/readback/readback.cpp, examples/code/renderstats/renderstats.cpp, examples/code/rnm/rnm.cpp, examples/code/shbaking/shbaking.cpp, examples/code/simple/simple.cpp, and examples/code/uvset/uvset.cpp.
Deletes an instance from a scene.
Only possible for dynamic scenes, ie. scenes associated with a live ernst job.
- Parameters
-
instance | instance to delete |
- Returns
- The result of the operation.
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
-
instance | the instance to set the name for |
displayName | the display name to set |
Change the mesh of an instance.
- Parameters
-
instance | the instance to change the mesh |
mesh | the new mesh |
- Returns
- The result of the operation
Sets the motion transforms of a motion blurred instance.
- Parameters
-
instance | the instance to change |
transforms | an array of transforms describing the camera motion |
count | the number of transforms in the array |
- Returns
- The result of the operation.
Sets the transform for an instance.
- Parameters
-
instance | the instance to change |
transform | the new transform |
- Returns
- The result of the operation.
Overrides materials for this instance.
- Parameters
-
instance | the instance to override materials for |
materials | an 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. |
materialCount | the number of override materials available in the materials array. |
- Returns
- The result of the operation.
Sets render stats on an instance.
- Parameters
-
instance | the instance to set the render stats on |
stats | the stats to modify. Can be multiple render stats or:ed together |
operation | selects whether to enable or disable the selected render stats. |
- Returns
- The result of the operation.
- examples/code/atlas/atlas.cpp, examples/code/baking/baking.cpp, examples/code/ernst/ernst.cpp, examples/code/lightsources/lightsources.cpp, examples/code/liveernst/liveernst.cpp, examples/code/lua/lua.cpp, examples/code/occlusion/occlusion.cpp, examples/code/pointcloud/pointcloud.cpp, examples/code/readback/readback.cpp, examples/code/renderstats/renderstats.cpp, and examples/code/rnm/rnm.cpp.
Go to the source code of this file.