beastapi/beasttarget.h File Reference

#include "beastapitypes.h"
#include "beasttargetentity.h"
#include "beastjob.h"

File Description

The target definitions.

Enumerations

enum  ILBAtlasPacking { ILB_AP_TEXEL = 0, ILB_AP_BLOCK }
 
enum  ILBCameraRenderModeType { ILB_LEC_CAMERA_LIGHT_MAP_LIGHTING, ILB_LEC_CAMERA_PER_PIXEL_LIGHTING }
 
enum  ILBWorldSpaceFilterComponent { ILB_WSFC_DEFAULT = 0, ILB_WSFC_DIRECT, ILB_WSFC_INDIRECT }
 

Functions

ILBStatus ILBAddBakeInstance (ILBTargetHandle target, ILBInstanceHandle bakeInstance, ILBTargetEntityHandle *targetEntity)
 
ILBStatus ILBAddBakePointCloud (ILBTargetHandle target, ILBPointCloudHandle pointCloud, ILBTargetEntityHandle *targetEntity)
 
ILBStatus ILBAddMeshToTarget (ILBTargetHandle target, ILBMeshHandle mesh, ILBTargetEntityHandle *targetEntity)
 
ILBStatus ILBAddPassToTarget (ILBTargetHandle target, ILBRenderPassHandle pass)
 
ILBStatus ILBCameraTargetSetRenderMode (ILBTargetHandle target, ILBCameraRenderModeType renderMode)
 
ILBStatus ILBCreateAtlasedTextureTarget (ILBJobHandle job, ILBConstString name, int32 maxWidth, int32 maxHeight, int32 maxTextures, ILBTargetHandle *target)
 
ILBStatus ILBCreateCameraTarget (ILBJobHandle job, ILBConstString name, ILBCameraHandle camera, int32 width, int32 height, ILBTargetHandle *target)
 
ILBStatus ILBCreatePointCloudTarget (ILBJobHandle job, ILBConstString name, ILBTargetHandle *target)
 
ILBStatus ILBCreateTextureTarget (ILBJobHandle job, ILBConstString name, int32 width, int32 height, ILBTargetHandle *target)
 
ILBStatus ILBCreateUVUnwrapTarget (ILBJobHandle job, ILBConstString name, float texelsPerUnit, ILBTargetHandle *target)
 
ILBStatus ILBCreateVertexTarget (ILBJobHandle job, ILBConstString name, ILBTargetHandle *target)
 
ILBStatus ILBEnableAtlasRescale (ILBTargetHandle target)
 
ILBStatus ILBEnableAtlasSpatial (ILBTargetHandle target)
 
ILBStatus ILBEnableWorldSpaceFilter (ILBTargetHandle target, ILBWorldSpaceFilterComponent component)
 
ILBStatus ILBGetFramebuffer (ILBTargetHandle target, ILBRenderPassHandle pass, int32 index, ILBFramebufferHandle *framebuffer)
 
ILBStatus ILBGetFramebufferCount (ILBTargetHandle target, int32 *count)
 
ILBStatus ILBGetUVLayerFromTarget (ILBTargetHandle target, ILBTargetEntityHandle targetEntity, ILBUVLayerHandle *uvLayer)
 
ILBStatus ILBGetUVLayerResolutionFromTarget (ILBTargetHandle target, ILBTargetEntityHandle targetEntity, int32 *width, int32 *height)
 
ILBStatus ILBGetVertexbuffer (ILBTargetHandle target, ILBRenderPassHandle pass, ILBTargetEntityHandle targetEntity, ILBFramebufferHandle *framebuffer)
 
ILBStatus ILBSetAtlasAlignment (ILBTargetHandle target, int32 alignment)
 
ILBStatus ILBSetAtlasPacking (ILBTargetHandle target, ILBAtlasPacking packing)
 
ILBStatus ILBSetAtlasPadding (ILBTargetHandle target, int32 padding)
 
ILBStatus ILBSetAtlasRescaleFrequencyThreshold (ILBTargetHandle target, float threshold)
 
ILBStatus ILBSetTargetResolution (ILBTargetHandle target, int32 width, int32 height)
 
ILBStatus ILBSetUVUnwrapCompactness (ILBTargetHandle target, float weight)
 
ILBStatus ILBSetUVUnwrapFlatness (ILBTargetHandle target, float weight)
 
ILBStatus ILBSetUVUnwrapSegmentationThreshold (ILBTargetHandle target, float threshold)
 
ILBStatus ILBSetUVUnwrapStraightness (ILBTargetHandle target, float weight)
 
ILBStatus ILBSetWorldSpaceFilterNormalDeviation (ILBTargetHandle target, ILBWorldSpaceFilterComponent component, float normalDeviation)
 
ILBStatus ILBSetWorldSpaceFilterSize (ILBTargetHandle target, ILBWorldSpaceFilterComponent component, float size)
 

Enumeration Type Documentation

Different types of Atlas packing strategies.

Enumerator
ILB_AP_TEXEL 

Texel.

ILB_AP_BLOCK 

Block.

Camera modes in Live Ernst Session.

Enumerator
ILB_LEC_CAMERA_LIGHT_MAP_LIGHTING 

Return frame buffers containing a full shaded light mapped version of the camera view I.e.

Lighting will be applied according to the target texture/vertex light map settings

ILB_LEC_CAMERA_PER_PIXEL_LIGHTING 

Return frame buffers containing a full shaded per pixel version of the camera view I.e Lighting will be calculated per pixel, disregarding the texture/vertex light map settings.

World space filter components.

Enumerator
ILB_WSFC_DEFAULT 

Filter everything.

ILB_WSFC_DIRECT 

Filter only direct component.

ILB_WSFC_INDIRECT 

Filter only indirect component.

Function Documentation

ILBStatus ILBAddBakeInstance ( ILBTargetHandle  target,
ILBInstanceHandle  bakeInstance,
ILBTargetEntityHandle targetEntity 
)

Adds an instance to bake to a texture or vertex bake target.

Parameters
targetthe target to add the instance to
bakeInstancethe instance to bake
targetEntitythe targetEntity for this instance. Can be 0 if you don't care
Returns
The result of the operation.
+ Examples:
ILBStatus ILBAddBakePointCloud ( ILBTargetHandle  target,
ILBPointCloudHandle  pointCloud,
ILBTargetEntityHandle targetEntity 
)

Adds a point cloud to bake.

Parameters
targetthe target to add the point cloud to (only works for point cloud targets)
pointCloudthe point cloud to bake
targetEntitythe targetEntity for this instance. Can be 0 if you don't care
Returns
The result of the operation.
+ Examples:
ILBStatus ILBAddMeshToTarget ( ILBTargetHandle  target,
ILBMeshHandle  mesh,
ILBTargetEntityHandle targetEntity 
)

Adds a mesh to be unwrapped to a UV unwrap target.

Parameters
targetthe target to add the mesh to (only works UV unwrap targets)
meshthe mesh to be unwrapped
targetEntitythe target entity for this mesh. Needed to get the resulting uv layer back.
Returns
The result of the operation.
+ Examples:
ILBStatus ILBCameraTargetSetRenderMode ( ILBTargetHandle  target,
ILBCameraRenderModeType  renderMode 
)

Dictates which camera render mode used.

For classic final jobs type should always be ILB_LEC_CAMERA_PER_PIXEL_LIGHTING. For live ernst jobs ILB_LEC_CAMERA_PER_PIXEL_LIGHTING means final frame rendering per pixel while ILB_LEC_CAMERA_LIGHT_MAPPING_LIGHTING means light mapped lighting. This requires that all objects to be baked have been setup as well.

Parameters
targetthe target whose camera render mode will be set.
renderModethe camera type used in live ernst (per pixel or light mapped).
ILBStatus ILBCreateAtlasedTextureTarget ( ILBJobHandle  job,
ILBConstString  name,
int32  maxWidth,
int32  maxHeight,
int32  maxTextures,
ILBTargetHandle target 
)

Adds an atlased texture baking target to a job.

Parameters
jobthe job to add the target to
namethe name of the target
maxWidththe maximum width in pixels of each generated texture
maxHeightthe maximum height in pixels of each generated texture
maxTexturesthe maximum number of generated textures. 0 means don't care.
targetthe handle to store the generated target in
Returns
The result of the operation.
+ Examples:
ILBStatus ILBCreateCameraTarget ( ILBJobHandle  job,
ILBConstString  name,
ILBCameraHandle  camera,
int32  width,
int32  height,
ILBTargetHandle target 
)

Adds a camera render target to a job.

Parameters
jobthe job to add the target to
namethe name of the target
camerahandle to the camera to render from
widththe width in pixels of the image
heightthe height in pixels of the image
targetthe handle to store the generated target in
Returns
The result of the operation.
+ Examples:
ILBStatus ILBCreatePointCloudTarget ( ILBJobHandle  job,
ILBConstString  name,
ILBTargetHandle target 
)

Adds a point cloud target to a job.

Parameters
jobthe job to add the target to
namethe name of the target
targetthe handle to store the generated target in
Returns
The result of the operation.
+ Examples:
ILBStatus ILBCreateTextureTarget ( ILBJobHandle  job,
ILBConstString  name,
int32  width,
int32  height,
ILBTargetHandle target 
)

Adds a texture baking target to a job.

Parameters
jobthe job to add the target to
namethe name of the target
widththe width in pixels of the texture target
heightthe height in pixels of the texture target
targetthe handle to store the generated target in
Returns
The result of the operation.
+ Examples:
ILBStatus ILBCreateUVUnwrapTarget ( ILBJobHandle  job,
ILBConstString  name,
float  texelsPerUnit,
ILBTargetHandle target 
)

Adds an UV unwrap target to a job.

Parameters
jobthe job to add the target to. Must be a UV job created with ILBCreateUVJob.
namethe name of the target
texelsPerUnitthe number of texels per unit to be used with the resulting UV layout. This affects spacing between UV charts.
targetthe handle to store the generated target in
Returns
The result of the operation.
+ Examples:
ILBStatus ILBCreateVertexTarget ( ILBJobHandle  job,
ILBConstString  name,
ILBTargetHandle target 
)

Adds a vertex baking target.

Parameters
jobthe job to add the target to
namethe name of the target
targetthe handle to store the generated target in
Returns
The result of the operation.
+ Examples:
ILBStatus ILBEnableAtlasRescale ( ILBTargetHandle  target)

Enables automatic rescaling of instances in the atlas based on frequency information from the baked lightmaps.

Parameters
targetthe atlas target
Returns
The result of the operation.
ILBStatus ILBEnableAtlasSpatial ( ILBTargetHandle  target)

Enables packing spatially close objects into the same texture.

Parameters
targetthe target
Returns
The result of the operation.
ILBStatus ILBEnableWorldSpaceFilter ( ILBTargetHandle  target,
ILBWorldSpaceFilterComponent  component 
)

Enable world space filter for a target.

Parameters
targetthe target to enable the filter on
componentthe component to apply the filter to
Returns
The result of the operation.
+ Examples:
ILBStatus ILBGetFramebuffer ( ILBTargetHandle  target,
ILBRenderPassHandle  pass,
int32  index,
ILBFramebufferHandle framebuffer 
)

Gets a framebuffer from a target Is only valid on targets rendering images and the target is done.

Parameters
targetthe target to get framebuffer from
passthe pass to get vertex data for
indexof the framebuffer to get
framebufferpointer to the handle that should receive the framebuffer
Returns
The result of the operation.
+ Examples:
ILBStatus ILBGetFramebufferCount ( ILBTargetHandle  target,
int32 *  count 
)

Gets the number of framebuffers associated with this target Is only valid on targets rendering images and if the target is done.

Parameters
targetthe target to get the count for
counta pointer to the variable to receive the framebuffer count
Returns
The result of the operation.
+ Examples:
ILBStatus ILBGetUVLayerFromTarget ( ILBTargetHandle  target,
ILBTargetEntityHandle  targetEntity,
ILBUVLayerHandle uvLayer 
)

Gets a uv layer from a target Only valid on UV unwrap targets and when the target is done.

Parameters
targetthe target to get a UV layer from
targetEntitythe target entity to get a UV layer for
uvLayerpointer to the handle that holds the new UV layer
Returns
The result of the operation.
+ Examples:
ILBStatus ILBGetUVLayerResolutionFromTarget ( ILBTargetHandle  target,
ILBTargetEntityHandle  targetEntity,
int32 *  width,
int32 *  height 
)

Gets the resulting resolution from packing the UV layout of the unwrapped mesh Only valid on UV unwrap targets and when the target is done.

Parameters
targetthe target to get resolution from
targetEntitythe target entity to get resolution from
widththe resolution width
heightthe resolution height
Returns
The result of the operation.
+ Examples:
ILBStatus ILBGetVertexbuffer ( ILBTargetHandle  target,
ILBRenderPassHandle  pass,
ILBTargetEntityHandle  targetEntity,
ILBFramebufferHandle framebuffer 
)

Gets a framebuffer with vertex data from a target Is only valid on targets rendering vertex data and the target is done.

Parameters
targetthe target to get vertex buffer from
passthe pass to get vertex data for
targetEntitythe target entity to get vertex data for
framebufferpointer to the handle that should receive the framebuffer
Returns
The result of the operation.
+ Examples:
ILBStatus ILBSetAtlasAlignment ( ILBTargetHandle  target,
int32  alignment 
)

Sets the alignment on an atlased texture target.

Parameters
targetthe target
alignmentthe alignment
Returns
The result of the operation.
ILBStatus ILBSetAtlasPacking ( ILBTargetHandle  target,
ILBAtlasPacking  packing 
)

Sets the packing strategy on an atlased texture target.

Parameters
targetthe target
packingthe packing strategy, default is Block packing
Returns
The result of the operation.
ILBStatus ILBSetAtlasPadding ( ILBTargetHandle  target,
int32  padding 
)

Sets the padding on an atlased texture target.

Parameters
targetthe target
paddingthe padding
Returns
The result of the operation.
ILBStatus ILBSetAtlasRescaleFrequencyThreshold ( ILBTargetHandle  target,
float  threshold 
)

Sets the frequency cutoff for the atlas rescale mode.

Lightmaps with frequency content lower than this value will be downscaled relative this value. Lightmaps with higher frequency content will not be scaled.

Parameters
targetthe atlas target
thresholdthe cutoff frequency (default is 1.0f)
Returns
The result of the operation.
ILBStatus ILBSetTargetResolution ( ILBTargetHandle  target,
int32  width,
int32  height 
)

Changes the resolution of a texture target when running an Live Ernst job.

Parameters
targetthe target to change resolution on
widththe new width
heightthe new height
ILBStatus ILBSetUVUnwrapCompactness ( ILBTargetHandle  target,
float  weight 
)

Sets a weight for the importance of having compact (round) charts.

It affects the importance of compactness relative to flatness and straightness. Compactness is expensive to compute and will increase the computation time if enabled. If set to 0.0, compactness is ignored.

Parameters
targetthe UV unwrap target.
weightthe weight for compactness, range 0.0 - 1.0, default is 0.0.
Returns
The result of the operation.
ILBStatus ILBSetUVUnwrapFlatness ( ILBTargetHandle  target,
float  weight 
)

Sets a weight for the importance of having flat charts.

It affects the importance of flatness relative to straightness and compactness. If set to 0.0, flatness is ignored (this will in most cases give a bad UV layout).

Parameters
targetthe UV unwrap target.
weightthe weight for flatness, range 0.0 - 1.0, default is 1.0.
Returns
The result of the operation.
ILBStatus ILBSetUVUnwrapSegmentationThreshold ( ILBTargetHandle  target,
float  threshold 
)

Sets the threshold used when segmenting the mesh into charts for unwrapping.

Controls the number of charts created by setting the angular threshold (allowed normal deviation) for triangles in a chart. A higher threshold results in larger normal deviations and creates larger, but more curved charts; a lower threshold creates smaller, flat charts.

Parameters
targetthe UV unwrap target.
thresholdthe segmentation threshold, range 0.0 - 1.0, default is 0.3.
Returns
The result of the operation.
ILBStatus ILBSetUVUnwrapStraightness ( ILBTargetHandle  target,
float  weight 
)

Sets a weight for the importance of having straight chart boundaries.

It affects the importance of straightness relative to flatness and compactness. If set to 0.0, straightness is ignored.

Parameters
targetthe UV unwrap target.
weightthe weight for straightness, range 0.0 - 1.0, default is 0.5.
Returns
The result of the operation.
ILBStatus ILBSetWorldSpaceFilterNormalDeviation ( ILBTargetHandle  target,
ILBWorldSpaceFilterComponent  component,
float  normalDeviation 
)

Set the maximum allowed normal deviation for world space filtering.

The filtered sample will exclude samples with a normal deviating more than the specified limit The normal deviation is specified in degrees The default limit is 25 degrees

Parameters
targetthe target to set the normal deviation for
componentthe component to set the normal deviation for
normalDeviationthe maximum allowed normal deviation
Returns
The result of the operation.
ILBStatus ILBSetWorldSpaceFilterSize ( ILBTargetHandle  target,
ILBWorldSpaceFilterComponent  component,
float  size 
)

Set the world space filter size for a target.

The filter size is relative to the mean sample distance of the target The default filter size is 1 Start with a default filter size and tweak it to get the desired smoothness

Parameters
targetthe target to set the size for
componentthe component to set the size for
sizethe filter size
Returns
The result of the operation.

Go to the source code of this file.