beastapi/beastjob.h File Reference

#include "beastapitypes.h"

File Description

The beast job function definitions.

Enumerations

enum  ILBCausticsModeType { ILB_CM_NONE, ILB_CM_SOME, ILB_CM_ALL }
 
enum  ILBDistributionType { ILB_RD_FORCE_LOCAL = 0, ILB_RD_AUTODETECT, ILB_RD_FORCE_DISTRIBUTED }
 
enum  ILBErnstBakingModeType { ILB_BM_CAMERA_FRUSTUM, ILB_BM_ENTIRE_LEVEL }
 
enum  ILBErnstRunningState { ILB_ERS_RUN = 0, ILB_ERS_PAUSE }
 
enum  ILBJobStatus {
  ILB_JS_SUCCESS = 0, ILB_JS_CANCELLED, ILB_JS_INVALID_LICENSE, ILB_JS_CMDLINE_ERROR,
  ILB_JS_CONFIG_ERROR, ILB_JS_CRASH, ILB_JS_OTHER_ERROR = 0x10000001
}
 
enum  ILBShowResults { ILB_SR_NO_DISPLAY = 0, ILB_SR_CLOSE_WHEN_DONE, ILB_SR_KEEP_OPEN }
 
enum  ILBUpdateType {
  ILB_UT_NEW_LIGHTSOURCE = 0, ILB_UT_UPDATE_LIGHTSOURCE, ILB_UT_DELETE_LIGHTSOURCE, ILB_UT_SCENE_INFO,
  ILB_UT_UPDATE_CAMERA, ILB_UT_UPDATE_TARGET, ILB_UT_UPDATE_TEXTURE, ILB_UT_UPDATE_VERTEX,
  ILB_UT_UPDATE_CAMERA_FRAME_BUFFER, ILB_UT_INVALIDATE_FRAMEBUFFER
}
 

Functions

ILBStatus ILBCancelJob (ILBJobHandle job)
 
ILBStatus ILBCreateErnstJob (ILBManagerHandle beastManager, ILBConstString uniqueName, ILBSceneHandle scene, ILBConstString jobXML, ILBJobHandle *job)
 
ILBStatus ILBCreateJob (ILBManagerHandle beastManager, ILBConstString uniqueName, ILBSceneHandle scene, ILBConstString jobXML, ILBJobHandle *job)
 
ILBStatus ILBCreateLiveErnstJob (ILBManagerHandle beastManager, ILBConstString uniqueName, ILBSceneHandle scene, ILBJobHandle *job)
 
ILBStatus ILBCreateUVJob (ILBManagerHandle beastManager, ILBConstString uniqueName, ILBJobHandle *job)
 
ILBStatus ILBDestroyJob (ILBJobHandle job)
 
ILBStatus ILBDestroyUpdate (ILBJobUpdateHandle update)
 
ILBStatus ILBExecuteBeast (ILBManagerHandle bm, ILBJobHandle job, ILBShowResults showResults, ILBDistributionType distribution, ILBJobStatus *status)
 
ILBStatus ILBGetJobProgress (ILBJobHandle job, ILBStringHandle *jobName, int32 *progress)
 
ILBStatus ILBGetJobResult (ILBJobHandle job, ILBJobStatus *status)
 
ILBStatus ILBGetJobUpdate (ILBJobHandle job, ILBBool *hasUpdate, ILBJobUpdateHandle *updateHandle)
 
ILBStatus ILBGetJobUpdateType (ILBJobUpdateHandle update, ILBUpdateType *updateType)
 
ILBStatus ILBGetUpdateCamera (ILBJobUpdateHandle update, ILBCameraHandle *camera)
 
ILBStatus ILBGetUpdateFramebuffer (ILBJobUpdateHandle update, ILBFramebufferHandle *fb)
 
ILBStatus ILBGetUpdateInvalidateFramebuffer (ILBJobUpdateHandle update, ILBTargetEntityHandle *te)
 
ILBStatus ILBGetUpdateLightSource (ILBJobUpdateHandle update, ILBLightHandle *light)
 
ILBStatus ILBGetUpdateSceneInfo (ILBJobUpdateHandle update, ILBSceneInfoHandle *sceneInfo)
 
ILBStatus ILBGetUpdateTargetEntity (ILBJobUpdateHandle update, ILBTargetEntityHandle *targetEntity)
 
ILBStatus ILBIsJobCompleted (ILBJobHandle job, ILBBool *result)
 
ILBStatus ILBIsJobRunning (ILBJobHandle job, ILBBool *result)
 
ILBStatus ILBJobHasNewProgress (ILBJobHandle job, ILBBool *newActivity, ILBBool *newProgress)
 
ILBStatus ILBSetCausticsMode (ILBJobHandle job, ILBCausticsModeType mode)
 
ILBStatus ILBSetErnstDirectIllumination (ILBJobHandle job, float illumination)
 
ILBStatus ILBSetErnstDisplayGamma (ILBJobHandle job, float displayGamma)
 
ILBStatus ILBSetErnstGIBakingMode (ILBJobHandle job, ILBErnstBakingModeType mode)
 
ILBStatus ILBSetErnstGIDepth (ILBJobHandle job, int minDepth, int maxDepth)
 
ILBStatus ILBSetErnstGIDiffuseBoost (ILBJobHandle job, float boost)
 
ILBStatus ILBSetErnstGIEmissiveScale (ILBJobHandle job, float scale)
 
ILBStatus ILBSetErnstGIVarianceLimit (ILBJobHandle job, float vl)
 
ILBStatus ILBSetErnstIndirectIllumination (ILBJobHandle job, float illumination)
 
ILBStatus ILBSetErnstRunningState (ILBJobHandle job, ILBErnstRunningState state)
 
ILBStatus ILBSetErnstVarianceThreshold (ILBJobHandle job, float threshold)
 
ILBStatus ILBSetJobLocalProcessingThreads (ILBJobHandle job, int numLocalProcessingThreads)
 
ILBStatus ILBSetJobOutputPath (ILBJobHandle job, ILBConstString path)
 
ILBStatus ILBSetJobRenderDepth (ILBJobHandle job, int minDepth, int maxDepth)
 
ILBStatus ILBSetJobRenderQuality (ILBJobHandle job, float quality)
 
ILBStatus ILBSetJobRenderSamples (ILBJobHandle job, int minSamples, int maxSamples, float varianceThreshold)
 
ILBStatus ILBStartJob (ILBJobHandle job, ILBShowResults showResults, ILBDistributionType distribution)
 
ILBStatus ILBWaitJobDone (ILBJobHandle job, int32 timeout)
 

Enumeration Type Documentation

Controls the type of caustics to include in physical rendering (both Ernst and Beast)

Enumerator
ILB_CM_NONE 

No caustics at all.

ILB_CM_SOME 

Caustics with one diffuse interaction before all specular interactions are allowed.

(CD{0,1}[SGs]*D*<Ts>*[LO]) 
ILB_CM_ALL 

All caustic light paths allowed.

Sets how beast should render distributed.

Enumerator
ILB_RD_FORCE_LOCAL 

Force a local render.

ILB_RD_AUTODETECT 

Render distributed if possible, otherwise fallback on local rendering.

ILB_RD_FORCE_DISTRIBUTED 

Force a distributed render, fails if distribution is not available.

Different baking modes for a Live Ernst session.

Enumerator
ILB_BM_CAMERA_FRUSTUM 

Only bake what the camera sees.

ILB_BM_ENTIRE_LEVEL 

Bake all targets in the scene, prioritized by the areas with the most variance.

The different states for live job.

Enumerator
ILB_ERS_RUN 

Enable rendering.

ILB_ERS_PAUSE 

Pause a render without.

The renderworker will still be assigned to the job, but idle.

Status codes for Beast API calls.

Enumerator
ILB_JS_SUCCESS 

This was a triumph! I'm making a note here; Huge Success!

ILB_JS_CANCELLED 

Job was aborted by external means.

ILB_JS_INVALID_LICENSE 

Beast does not have a valid license.

ILB_JS_CMDLINE_ERROR 

Error parsing the command line.

ILB_JS_CONFIG_ERROR 

Error parsing the config files.

ILB_JS_CRASH 

Beast crashed, sorry.

ILB_JS_OTHER_ERROR 

Other Error.

Sets how to handle the Beast window when rendering.

Enumerator
ILB_SR_NO_DISPLAY 

Don't display the render window / progress view.

ILB_SR_CLOSE_WHEN_DONE 

Show the render window / progress view and close it when the rendering is done.

ILB_SR_KEEP_OPEN 

Show the render window and keep it open until the user closes it or the job is destroyed.

NOTE: Interpreted as ILB_SR_CLOSE_WHEN_DONE when distribution is used.

Different types of updates which can come from Ernst.

Enumerator
ILB_UT_NEW_LIGHTSOURCE 

Specifies a new light source created in Ernst.

ILB_UT_UPDATE_LIGHTSOURCE 

Specifies an update to a previously existing light source.

ILB_UT_DELETE_LIGHTSOURCE 

Specifies that a light sources has been deleted in Ernst.

ILB_UT_SCENE_INFO 

Global information about the scene.

ILB_UT_UPDATE_CAMERA 

Specifies an update to a previously existing camera.

ILB_UT_UPDATE_TARGET 

Specifies an update to a previously existing target entity.

ILB_UT_UPDATE_TEXTURE 

Specifies a generated light map from a Live Ernst job.

ILB_UT_UPDATE_VERTEX 

Specifies vertex lighting from a Live Ernst job.

ILB_UT_UPDATE_CAMERA_FRAME_BUFFER 

Specifies an update camera frame buffer from a Live Ernst job.

ILB_UT_INVALIDATE_FRAMEBUFFER 

Message that the lighting setup of a scene has changed and that the specified target does no longer contain up-to-date data.

Used in Live Ernst jobs.

Function Documentation

ILBStatus ILBCancelJob ( ILBJobHandle  job)

Cancels a running job.

Parameters
jobthe job to cancel
ILBStatus ILBCreateErnstJob ( ILBManagerHandle  beastManager,
ILBConstString  uniqueName,
ILBSceneHandle  scene,
ILBConstString  jobXML,
ILBJobHandle job 
)

Creates an Ernst job.

Ernst jobs works like bake jobs but does not use render passes. All texture and vertex targets added to an Ernst job will be lit in the Ernst session.

Parameters
beastManagerthe beast manager to create the job for
uniqueNamea unique name for the job
scenethe scene to render
jobXMLthe config XML file to use, or an empty string to use defaults for all settings
jobpointer to where the job handle should be stored
+ Examples:
ILBStatus ILBCreateLiveErnstJob ( ILBManagerHandle  beastManager,
ILBConstString  uniqueName,
ILBSceneHandle  scene,
ILBJobHandle job 
)

Creates a Live Ernst job.

The scene will be locked and cannot be used for other jobs until the Live Ernst job is done.

Parameters
beastManagerthe beast manager to create the job for
uniqueNamea unique name for the job
scenethe scene to render
jobpointer to where the job handle should be stored
+ Examples:
ILBStatus ILBCreateUVJob ( ILBManagerHandle  beastManager,
ILBConstString  uniqueName,
ILBJobHandle job 
)

Creates an UV job.

Parameters
beastManagerthe beast manager to create the job for
uniqueNamea unique name for the job
jobpointer to where the job handle should be stored
+ Examples:
ILBStatus ILBDestroyUpdate ( ILBJobUpdateHandle  update)

Destroys a job update.

Parameters
updatethe job update to destroy
+ Examples:
ILBStatus ILBExecuteBeast ( ILBManagerHandle  bm,
ILBJobHandle  job,
ILBShowResults  showResults,
ILBDistributionType  distribution,
ILBJobStatus status 
)

Convenience function to execute a Beast job.

Blocks until the job is done or fails

Deprecated:
This function will go away in the future
Parameters
bmthe beast manager to use
jobthe job to execute
showResultssets how the beast window should be handled
distributionSets how to distribute the rendering
statusthe result of the rendering
ILBStatus ILBGetJobProgress ( ILBJobHandle  job,
ILBStringHandle jobName,
int32 *  progress 
)

Gets the current status of a job.

Parameters
jobthe job to get progress for
jobNamepointer to a string object that receives the name of job being executed Set to 0 to ignore this parameter.
progressto the completion percentage of the current activity
+ Examples:
ILBStatus ILBGetJobResult ( ILBJobHandle  job,
ILBJobStatus status 
)

Returns the result of the job as a JobStatus.

Parameters
jobthe job to get the result for
statuspointer to the JobStatus
+ Examples:
ILBStatus ILBGetJobUpdate ( ILBJobHandle  job,
ILBBool hasUpdate,
ILBJobUpdateHandle updateHandle 
)

Checks if a job has a new update and retrieves it.

Parameters
jobthe job to get updates from
hasUpdateset to true if new update is available
updateHandleif hasUpdate is true this will contain a handle to the update
+ Examples:
ILBStatus ILBGetJobUpdateType ( ILBJobUpdateHandle  update,
ILBUpdateType updateType 
)

Gets the type of update.

Parameters
updatehandle to the update
updateTypereturns the update type
+ Examples:
ILBStatus ILBGetUpdateCamera ( ILBJobUpdateHandle  update,
ILBCameraHandle camera 
)

Get an updated camera.

Parameters
updatethe job update
camerathe updated camera
+ Examples:
ILBStatus ILBGetUpdateFramebuffer ( ILBJobUpdateHandle  update,
ILBFramebufferHandle fb 
)

Get an updated frame buffer.

Parameters
updatethe job update
fbthe updated frame buffer
+ Examples:
ILBStatus ILBGetUpdateInvalidateFramebuffer ( ILBJobUpdateHandle  update,
ILBTargetEntityHandle te 
)

Get the target entity of an invalidated frame buffer update.

Parameters
updatethe job update
tethe target entity of the invalidated frame buffer
ILBStatus ILBGetUpdateLightSource ( ILBJobUpdateHandle  update,
ILBLightHandle light 
)

Get an updated light source.

Parameters
updatethe job update
lightthe updated light source
+ Examples:
ILBStatus ILBGetUpdateSceneInfo ( ILBJobUpdateHandle  update,
ILBSceneInfoHandle sceneInfo 
)

Get an updated scene info node.

Parameters
updatethe job update
sceneInfothe updated scene info node
+ Examples:
ILBStatus ILBGetUpdateTargetEntity ( ILBJobUpdateHandle  update,
ILBTargetEntityHandle targetEntity 
)

Get an updated target entity.

Parameters
updatethe job update
targetEntitythe updated target entity
+ Examples:
ILBStatus ILBIsJobCompleted ( ILBJobHandle  job,
ILBBool result 
)

Checks if the job is completed.

Note that a running job can be completed if the user has selected to keep the render window open. A job that is not running might not have finished if it was aborted or had errors.

Parameters
jobthe job to check
resultset to true if the job is completed, false otherwise
+ Examples:
ILBStatus ILBIsJobRunning ( ILBJobHandle  job,
ILBBool result 
)

Checks if the job is running.

Parameters
jobThe job to check
resultIs set to true if job is running, false otherwise
+ Examples:
ILBStatus ILBJobHasNewProgress ( ILBJobHandle  job,
ILBBool newActivity,
ILBBool newProgress 
)

Checks if the progress of a Job has been updated since the last time ILBGetJobProgress was called.

Parameters
jobThe job to check if it has progress
newActivityset to true if a new activity has started
newProgressset to true if the progress has been updated
+ Examples:
ILBStatus ILBSetCausticsMode ( ILBJobHandle  job,
ILBCausticsModeType  mode 
)

Enables or disables caustics in physical rendering.

Parameters
jobthe job
modethe caustics mode, explained in the enum definition.
ILBStatus ILBSetErnstDirectIllumination ( ILBJobHandle  job,
float  illumination 
)

Sets the amount of direct illumination to use in a Live Ernst job.

Parameters
jobthe Live Ernst job
illuminationthe desired amount of direct illumination
ILBStatus ILBSetErnstDisplayGamma ( ILBJobHandle  job,
float  displayGamma 
)

Sets the display gamma for the Ernst editor.

Parameters
jobthe Live Ernst job
displayGammathe display gamma
ILBStatus ILBSetErnstGIBakingMode ( ILBJobHandle  job,
ILBErnstBakingModeType  mode 
)

Sets the GI baking mode in a Live Ernst job.

Parameters
jobthe Live Ernst job
modecontrols whether to bake what the camera sees or the entire scene
+ Examples:
ILBStatus ILBSetErnstGIDepth ( ILBJobHandle  job,
int  minDepth,
int  maxDepth 
)

Sets the GI depth in a Live Ernst job.

Parameters
jobthe Live Ernst job
minDepththe minimum depth of a traced path
maxDepththe maximum depth of a traced path
ILBStatus ILBSetErnstGIDiffuseBoost ( ILBJobHandle  job,
float  boost 
)

Sets the GI diffuse boost in a Live Ernst job.

Please refer the Ernst documentation for more information.

Parameters
jobthe Live Ernst job
boostthe diffuse boost
ILBStatus ILBSetErnstGIEmissiveScale ( ILBJobHandle  job,
float  scale 
)

Sets the GI emissive scale in a Live Ernst job.

Please refer the Ernst documentation for more information.

Parameters
jobthe Live Ernst job
scalethe emissive scale
ILBStatus ILBSetErnstGIVarianceLimit ( ILBJobHandle  job,
float  vl 
)

Sets the variance limit in a Live Ernst job.

Please refer the Ernst documentation for more information.

Parameters
jobthe Live Ernst job
vlthe variance limit
ILBStatus ILBSetErnstIndirectIllumination ( ILBJobHandle  job,
float  illumination 
)

Sets the amount of indirect illumination to use in a Live Ernst job.

Parameters
jobthe Live Ernst job
illuminationthe desired amount of indirect illumination
ILBStatus ILBSetErnstRunningState ( ILBJobHandle  job,
ILBErnstRunningState  state 
)

Sets the running state of a Live Ernst job.

Allows pausing and restarting a job without terminating it.

Parameters
jobthe Live Ernst job
statewhether the job should be paused or running
ILBStatus ILBSetErnstVarianceThreshold ( ILBJobHandle  job,
float  threshold 
)

Sets the variance threshold in a Live Ernst job.

Please refer the Ernst documentation for more information.

Parameters
jobthe Live Ernst job
thresholdthe variance threshold
ILBStatus ILBSetJobLocalProcessingThreads ( ILBJobHandle  job,
int  numLocalProcessingThreads 
)

Sets the number of processing threads on the local submitting machine.

Only available for Ernst jobs. If this function is not called, Ernst will use one thread for every available core.

Parameters
jobthe job to set directory for
numLocalProcessingThreadsthe number of local threads used
ILBStatus ILBSetJobOutputPath ( ILBJobHandle  job,
ILBConstString  path 
)

Sets the output directory for the job.

If this function is not called output files will end up in the cache hierarchy.

Parameters
jobthe job to set directory for
paththe path to the output directory
ILBStatus ILBSetJobRenderDepth ( ILBJobHandle  job,
int  minDepth,
int  maxDepth 
)

Sets the minimum and maximum number of light bounces to use for rendering.

Parameters
jobthe job
minDepththe minimum depth of a traced path
maxDepththe maximum depth of a traced path
+ Examples:
ILBStatus ILBSetJobRenderQuality ( ILBJobHandle  job,
float  quality 
)

Sets the render quality to use for a job.

The quality value range from 0.0 to 1.0. Default value is 0.5. A low value will give fast but noisy results, a high value will give less noise but longer render times. This quality value will be used to derive appropriate render sampling settings. If you need full control of the sampling settings, you can use the function ILBSetJobRenderSamples instead, to set the sampling settings explicitly.

Parameters
jobthe job
qualitythe quality value
+ Examples:
ILBStatus ILBSetJobRenderSamples ( ILBJobHandle  job,
int  minSamples,
int  maxSamples,
float  varianceThreshold 
)

Explicitly sets the sampling settings to use for a job.

These are automatically derived when using ILBSetJobRenderQuality, so consider using that function instead for a simplified render setup.

Parameters
jobthe job
minSamplesthe minimum number of samples to use for each pixel
maxSamplesthe maximum number of samples to use for each pixel
varianceThresholdthe threshold for variance where a pixel is considered to be sampled well enough
ILBStatus ILBWaitJobDone ( ILBJobHandle  job,
int32  timeout 
)

Waits until a job is done or until there is progress updates.

Parameters
jobThe job to wait for
timeoutThe maximum time to wait in milliseconds
+ Examples:

Go to the source code of this file.