Rndjob

  • LXe_RENDER_IDLE

  • LXe_RENDER_RENDERING

  • LXe_RENDER_USE_OUTPUT_ITEMS

  • LXe_RENDER_WITHOUT_SAVING

  • LXe_RENDER_NO_PROGRESS_IMAGE

  • LXe_RENDER_BAKE_TARGET

  • LXe_RENDER_NO_JOB

  • LXe_RENDER_IN_PROGRESS

  • LXe_RENDER_NOT_RENDERING

  • LXe_RENDER_NO_MFP_WITH_WB2D

  • LXe_RENDER_NO_VISIBLE_OUTPUTS

  • LXe_RENDER_INVALID_DENOISER

  • LXe_RENDER_OPTIX_CONTEXT

  • LXe_RENDER_OPTIX_SCENE

  • LXe_RENDER_OPTIX_LAUNCH

  • LXe_RENDER_EMBREE_CONTEXT

  • LXe_RENDER_EMBREE_SCENE

  • LXe_RENDER_EMBREE_LAUNCH

  • LXe_RENDER_ABORTING

ILxRenderService

class ILxRenderService

The render service provides a way for clients to spawn and submit render jobs, check the status of a render, obtain frame buffers for the currently rendering/ most recently rendered frame, and stopping render jobs. The render service is defined as a global. We define a number of LxResult codes as well.

Public Functions

LxResult ScriptQuery(LXtObjectID self, void **ppvObj)

As with all globals, the first method gets the ILxScriptQueryID interface for the system. Since there is currently no ScriptQuery interface, this method will always fail.

LxResult JobSetCurrent(LXtObjectID self, LXtObjectID job)

The client provides information about how to render a scene with a render job. This is a COM object with an ILxRenderJob interface, as described below. Frames, animations, turntables and baking can be rendered by providing a job to the render service. A specific render job can be set as the current job with this method, or the current job can be set to nothing by passing NULL. Attempting to set the render job will fail if another job is currently being rendered. The job provided will be AddRef()’ed by the service.

LxResult JobCurrent(LXtObjectID self, void **ppvObj)

This returns the current render job, failing if there is no current job. The returned object must be released by the caller if the method returns success.

LxResult JobStart(LXtObjectID self)

This method can be used to start rendering the current job, using the properties of the job to render the scene. This function does not block, and will return immediately. Status updates are sent to various methods on the job object itself.

LxResult JobAbort(LXtObjectID self)

This aborts a currently running render job. It will fail if no jobs are currently rendering. Note that although this function returns immediately, it may take some time before the render has finished aborting.

LxResult JobStatus(LXtObjectID self)

This returns the current status of a render job as an LxResult code.

  • LXe_RENDER_IDLE A job is loaded (JobCurrent() would succeed), but is not currently rendering a frame. The system is effectively idle and waiting for JobStart() to be called, or for a new job to be loaded.

  • LXe_RENDER_RENDERING Returns true if the currently loaded job is rendering a frame.

  • LXe_RENDER_NO_JOB There is no current current job (and thus JobCurrent() would fail). A new job must be set with JobSetCurrent() before calling JobStart().

  • LXe_RENDER_ABORTING JobAbort() was called and the job is in the process of aborting, but has not yet finished.

LXtObjectID JobStats(LXtObjectID self)

This returns an ILxRenderStats container object containing information about the current render See the ILxRenderStats description below for more information. The container and the individual stats objects are dynamically updated while rendering, so you can hold on to the container object for the life of the render. The object must be released when no longer needed.

int JobIsSlave(LXtObjectID self)

Return whether or not the current job is running in slave mode.

LxResult JobCleanup(LXtObjectID self, int clearJob)

This utility can be used to reclaim memory after a render has completed. If clearJob is true, this also clears out the current job by implicitly calling JobSetCurrent(NULL);

LxResult JobRenderOutputCount(LXtObjectID self, int *count)

These are used to get the number of outputs and their username strings while a render is in progress. This information can be used to populate a render outputs popup that the user can change while rendering via the job’s ProgressImageMetrics() method. These methods are only valid while rendering, and will return Lx_ when not.

LxResult JobRenderOutputName(LXtObjectID self, int index, const char **name)
LxResult JobRenderOutputType(LXtObjectID self, int index, int *type)

This related function returns the type of a render output as an LXiRENDEROUTPUT_ define.

LxResult UpdateProgressImage(LXtObjectID self)

This causes the render service to call the current job’s ProgressImage method with the progress image from the current.

LxResult RefreshProgressImageMetrics(LXtObjectID self)

This is used to indicate that the metrics of the progress image need to be refreshed by the client. The client should then call UpdateProgressImage() to get a new image with the new metrics.

LxResult FrameStore(LXtObjectID self, LXtObjectID frameBuffer, int writePixels)

Writes the framebuffer to disk in a proprietary format. The frame buffer can be recalled later on for display to the user. FrameStore and FrameRecall are commonly used in a system to enable reloading previous renders. FrameStore is called internally before a job’s ProgressFrameEnd() method, but can also be called after baking operations that modify the frame buffer pixel colors, to make those changes permanent. This function should still be called even if Write Buckets To Disk is used, in which case the frame buffer pixels are written to disk separately, and this call will simply write the meta-data that is required to re-load the frame buffer later on. Once a frame and its pixels has been written to disk, the header can be re-written without affecting the pixels by passing in zero for the writePixels parameter.

LxResult FrameRecall(LXtObjectID self, int slotIndex, int passIndex, LXtObjectID monitor, void **ppvObj)

Loads a previously saved frame buffer from disk at the “slot” and “render

pass” indices provided and returns an object with an ILxFrameBufferID interface.

LxResult FrameTestRecall(LXtObjectID self, int slotIndex, int passIndex)

Tests if a frame buffer is present on disk at the given slot and pass indices. FrameTestRecall can be called in a loop to get a count of the number of passes by incrementing passIndex until LXe_NOTFOUND is returned.

LxResult FrameRenderPassCount(LXtObjectID self, int slotIndex, int *numPasses)

This convenience method returns the number of render passes. (The implementation calls FrameTestRecall() with successively larger passIndex values, until FrameTestRecall returns LXe_NOTFOUND.)

LxResult FrameRenderPassInfo(LXtObjectID self, int slotIndex, int passIndex, char *name, unsigned *width, unsigned *height, unsigned *outputCount, int *isStereo, LXtStereoEye *eyeDisplay, LXtStereoComposite *stereoComposite)

Return the render pass name, size, and number of render outputs of the frame buffer at the given slot and pass indices. If the slot or pass is not found, FrameRenderPassInfo returns LXe_NOTFOUND.

LxResult FrameRenderPassOutputInfo(LXtObjectID self, int slotIndex, int passIndex, char *renderPassName, unsigned *width, unsigned *height, LXtRenderOutputProcessList *outputs)

Return the same information as the FrameRenderPassInfo function, along with the persistent values that are saved for the render outputs of the frame buffer at the given slot and pass indices, in a LXtRenderOutputProcessList structure. The actual pixels are not read in, so this function can be much faster than obtaining render output info through the full FrameRecall function.

LxResult FrameSaveImage(LXtObjectID self, LXtObjectID framebuffer, int bufferIndex, const char *filename, const char *format, LXtObjectID message, LXtObjectID monitor)

Save a frame buffer to disk as a simple image or a layered image.

LxResult FrameSaveLayered(LXtObjectID self, LXtObjectID framebuffer, const char *filename, const char *format, LXtObjectID message, LXtObjectID monitor)
LxResult FrameSavePassLayered(LXtObjectID self, LXtObjectID framebuffer, const char *filename, const char *format, LXtObjectID message, LXtObjectID monitor)

Save a frame buffer to disk as a layered image, only for its own pass.

LxResult FrameSavePassesAsImages(LXtObjectID self, int slotIndex, const char *filename, const char *format, LXtObjectID message, LXtObjectID monitor)

Save a frame buffer to disk as a simple image or a layered image, for each render pass at the given slot index.

LxResult FrameSavePassesAsLayeredImages(LXtObjectID self, int slotIndex, const char *filename, const char *format, LXtObjectID message, LXtObjectID monitor)
LxResult FrameStoreStats(LXtObjectID self, int slotIndex, LXtObjectID stats)

These methods are used to save and load the stats for a frame buffer. The stats are reprresented by an object with an ILxRenderStats interface. The object returned by FrameRecallStats() must be released by the caller when it is no longer needed. Stats are automatically stored by the renderer, so clients won’t usually need to call FrameStoreStats(). FrameRecallStats() is more useful, and will return an ILxRenderStats object with stats for the entire render on that frame buffer. FrameDelete() will delete the stats file as well. These methods are thread safe.

LxResult FrameRecallStats(LXtObjectID self, int slotIndex, void **ppvObj)
LxResult FrameStoreThumbnail(LXtObjectID self, int slotIndex, LXtObjectID image)

Clients can also save a thumbnail image for each slot. This image may be any size, but something like 256x256 is commonly used. The thumbnail is indented to be used to populate a browser without needing to load the entire frame buffer into memory. The thumbnail is saved as a sidecar file to the frame buffer. These methods are thread safe. Note that the renderer does not save a thumbnail itself; it is up to the client if they want to save a thumbnail. These methods just provide an easy way to assocaite a thumbnail with a frame buffer. FrameDelete() will delete the thumbnail as well. When loading a thumbanil with FrameRecallThumbnail(), the caller is responsible for freeing the image when it is no longer needed.

LxResult FrameRecallThumbnail(LXtObjectID self, int slotIndex, void **ppvObj)
LxResult FrameDelete(LXtObjectID self, int slotIndex)

Delete the frame buffer file at the given slot index. This also deletes associated data, such as stats files and thumbnails.

LxResult RenderEffectFromRenderType(LXtObjectID self, int type, const char **effectName)

This function returns the Effect name from a given render type value. e.g LXiRENDEROUTPUT_FINALCOLOR to “shader.color”

LxResult RenderEffectToType(LXtObjectID self, const char *effect, int *type, int *size)

This function returns type for a given effect name and the number of components. For instance, “alpha” will have one component, whereas “shade.color” will have 3.

bool JobGetCurrent(CLxLoc_RenderJob &job) const

User Class Only:

bool JobGetStats(CLxLoc_Attributes &stats)

User Class Only:

bool JobIsSlave() const

User Class Only:

ILxRenderJob

class ILxRenderJob

A render job represents a series of settings used to render a frame. The client defines a job object with this interface and submits it to the render service for rendering. The job’s methods both provide state for the render and are used to obtain feedback during the render. All methods may be called when doing a local render. The following methods will be called for both a local render and slave mode. Notably, the progress methods will not be called during slave mode:

Public Functions

LxResult RenderItem(LXtObjectID self, void **ppvObj)

This method returns the render item, which in turn contains the various settings for this scene. The item will be released by the caller, so be sure to AddRef() it before returning it.

LxResult ActionName(LXtObjectID self, const char **action)

This returns the name of the action used to evaluate the scene’s channels.

LxResult GroupName(LXtObjectID self, const char **group)

This returns the name of the group whose layers should be rendered. If not implemented (or if the group string is NULL or the method fails), everything is rendered.

LxResult RenderAs(LXtObjectID self, int *mode)
LxResult RenderAtTime(LXtObjectID self, double *time)

If the mode is FRAME or one of the TURNTABLEs, the RenderAtTime() method will be called to get the scene time in seconds at which to render. If not implemented, the renderer will use the current scene time, whatever that may be.

LxResult RenderTurntableNumFrames(LXtObjectID self, int *numFrames)

This determines how many frames are rendered when using one of the TURNTABLE modes. If not implemented, the default of 30 frames is used.

LxResult RenderTurntableFPS(LXtObjectID self, int *fps)

This determines the frame rate of the TURNTABLE-style animation when rendering to a movie format. If not implemented, it will default to the current system frame rate.

LxResult RenderBakeVMap(LXtObjectID self, const char **vmap)

This returns the name of the vertex map used when using one of the BAKE render types. This should be a UV map when using texture baking.

LxResult RenderBakeLookDistance(LXtObjectID self, double *distance)

This returns the look distance used when baking.

LxResult RenderBakeItem(LXtObjectID self, int *include, void **item)

When baking to a texture, this sets which texture item that is used. If the texture item needs to be included in the bake, ‘include’ should be set to true. The object should be AddRef()’ed when returned, as the caller will release it.

LxResult RenderBakeEffect(LXtObjectID self, const char **effect)

When baking to a texture, this determines the baking effect. These effects are the same as used by texture layers. LXs_FX_NORMAL, LXs_FX_DISPLACE and LXs_FX_VECDISPLACE are common effects.

LxResult RenderBakeImage(LXtObjectID self, void **ppvObj)

When baking to a texture, this is the ILxImageID that will contain the result of the bake. The caller will release the object when it is done with it. This object must have both ILxImage and ILxImageWrite interfaces.

LxResult TestItem(LXtObjectID self, LXtObjectID item, LXtObjectID eval)

The TestItem() method returns LXe_FASLE if the item should be ignored, LXe_TRUE if it should be rendered, or LXe_RENDER_BAKE_TARGET if it’s the target of a bake. If the method is not implemented, all visible items will return TRUE. An evaluation context is also provided as an object with an ILxChannelRead interface, which allows the job to evaluate the scene for states like the item visibility channel.

LxResult FrameBufferSlot(LXtObjectID self, int *index)

This determines what “slot” is used to store the frame buffer on disk. The slot index can be arbitrary (although it must be positive), and is used as part of the frame buffer’s filename. If this method fails or is not implemented, slot zero is used. The frame buffer represents the raw rendered frame, and should not be confused with the OutputFormat() and OutputFilename() methods, which save the frame buffer as a standard image file.

LxResult FrameBufferRegionBackgroundSlot(LXtObjectID self, int *slotIndex, int *passIndex)

This determines what “slot” is used as the background of a region render. Region renders are sub-sets of a frame, and are often composited over another render for display in a render window. If this method is not implemented or otherwise fails, no backgorund frame buffer is displayed under the region.

LxResult OutputFormat(LXtObjectID self, const char **format)

This method returns the file format to save the rendered image in as a string, and may be a layered format, or a movie format if rendering an animation. If it returns LXe_RENDER_USE_OUTPUT_ITEMS, the output items in the scene will be used for the format. If it returns LXe_RENDER_WITHOUT_SAVING, no images will be saved.

LxResult OutputFilename(LXtObjectID self, const char **filename)

This returns the filename to save the rendered image. to. Returning LXe_RENDER_USE_OUTPUT_ITEMS will cause the filenames set in the output items to be used. Returning LXe_RENDER_WITHOUT_SAVING will cause no images to be saved.

LxResult Options(LXtObjectID self, int *options)
LxResult ProgressAborted(LXtObjectID self)

These methods are called as the scene renders to provide status updates. These methods do not need to be implemented. This method is called if the render is aborted or fails for any reason.

LxResult ProgressBegin(LXtObjectID self, LXtObjectID renderStats)

These methods are called when a render begins or ends. All other progress messages will be sent between these two calls. ProgressBegin() is provided with the ILxRenderStats representing all of the stats for the render. It is initially empty, will be populated as frames and render passes start to render. This object may be AddRef()’ed if desired, so that it can be used throughout the render and afterward. This object is identical to the one returned by ILxRenderService::JobStats()

LxResult ProgressEnd(LXtObjectID self, LXtObjectID finalFrameBuffer, LXtObjectID finalStats)

ProgressEnd() is provided with an ILxAttributesID representing the final stats for the scene, as well as the IlxFrameBufferID for the last frame rendered. These objects may be AddRef()’ed if desired. Note that the ILxFrameBuffer may be NULL if the render was aborted or otherwise failed.

LxResult ProgressPercentDone(LXtObjectID self, double progressScene, double progressFrame, double progressRenderPass)

While rendering, this is called with the current progress of the render as a number between 0.0 and 1.0. The render can be canceled by returning LXe_ABORT.

LxResult ProgressImageMetrics(LXtObjectID self, int resX, int resH, int *w, int *h, double *zoom, int *panX, int *panY, int *output)

Before rendering a frame, the job is asked for the desired resolution of the progress image, as well as any zoom factor or panning offset within the image. These metrics can be changed at an time by calling ILxRenderService::RefreshProgressImageMetrics(), which in turn will call ProgressImageMetrics() and UpdateProgressImage(). resX and resH are the actual dimensions of the rendered image. Setting w and h to 0 will result in no progress image, as would returning LXe_RENDER_NO_PROGRESS_IMAGE or not implementing the method. w and h are the maximum size of the progress image itself. The image may be smaller than this depending on the zoom factor, but will never be larger. zoom determines the zoom factor within the image, with 1.0 is 100%. panX and panY are offsets into the image, and are used to pan around it when the render is larger than w/h. output is the index of the render output that is drawn into the progress image. A list of outputs in the current render can be obtained from ILxRenderService::JobRenderOutputCount() and JobRenderOutputName(). If the output is -1 or otherwise out of range, the current/default output is used instead.

LxResult ProgressFrameBegin(LXtObjectID self, int frame, int w, int h)

We have a series of begin/end pairs indicating which frame, render pass and sub-frame pass that is currently being rendered. The hierarchy is like so:

LxResult ProgressFrameEnd(LXtObjectID self, int frame, LXtObjectID stats)

When a frame finishes rendering, this method is called with the frame, eye, and an object with an ILxAttributes interface. The ILxAttributes object provides statistics representing the final state of the frame. This object can be AddRef()’ed by the job and held onto for future use, if so desired. The frame buffer is not provided as each pass in the frame has its own unique frame buffer.

LxResult ProgressRenderPassBegin(LXtObjectID self, int frameIndex, int renderPassIndex, const char *renderPassName, int eye)

Note that the renderPassName may be NULL if the pass is unnamed.

LxResult ProgressRenderPassEnd(LXtObjectID self, int frame, int renderPassIndex, const char *renderPassName, int eye, LXtObjectID frameBuffer, LXtObjectID stats)
LxResult ProgressFramePassBegin(LXtObjectID self, int frame, int renderPass, int eye, int pass)

The frame is further broken down into frame passes (not to be confused with render passes). These methods are called when a frame pass begins or ends.

LxResult ProgressFramePassEnd(LXtObjectID self, int frame, int renderPass, int eye, int pass)
LxResult ProgressBucketBegin(LXtObjectID self, int row, int col)

Individual buckets are rendered within each frame pass. These methods are called when a bucket starts or ends, and must be thread safe. Note that multiple buckets may be rendered at the same time, and thus multiple begin calls may occur before an end call is received. When a bucket begins, this method is called with the row and column of the bucket passed, (where 0,0 is the top-left corner).

LxResult ProgressBucketEnd(LXtObjectID self, int row, int col, LxResult code)

This is called when the bucket ends. The bucket index is provided along with an LxResult code specifying how the bucket finished. This can be an OK code for success, LXe_ABORT for a user abort or a failure code. Note that ProgressAbort() will still be called from the main thread when a LXe_ABORT is sent to ProgressBucketEnd().

LxResult ProgressString(LXtObjectID self, const char *infoString, const char *userString)

As the render progresses, this function is called with a status string, which the client can display in its UI. The first string provided is an internal string, while the second is a user-readable, translated string. Note that an empty info string/user string is valid, and usually just means that the any previous string can now be cleared as it is no longer relevant.

LxResult ProgressImage(LXtObjectID self, LXtObjectID img)

Every time a pixel is rendered, the progress image (an object with the ILxImageID interface) is updated. This image is created when a frame starts rendering, and is passed to the job through this method. The job can hold onto this image for redrawing by incrementing its reference count. This image should be considered read-only, The image dimensions may be smaller than the actual render resolution. If the image’s dimensions have changed (due to a call to RefreshProgressImageMetrics()), this may be called during a render. The client should AddRef() the image so they can draw it in the future.

LxResult ProgressImageUpdated(LXtObjectID self)

The progress image is updated frequently during the render, and the job is notified of this through the ProgressImageUpdated() method. Since this may be called very frequently, so you’ll likely want to use this method to set a “dirty” flag in your UI, and actually redraw your UI only a few times a second. This is sent only when the contents of the image previously sent via ProgressImage() have changed. If the dimmensions of the image have changed, ProgressImage() will be called again, rather than ProgressImageUpdate().

LxResult ProgressTickle(LXtObjectID self)

It is common from render jobs to present an interactive UI. To keep the render from locking out the UI when both are in the same thread, the job can implement the “tickle” method. This method is called frequently enough (about 8 times a second) to allow a UI to check for input without causing undue overhead. The job can abort the render by returning LXe_ABORT.

LxResult RenderBakeCageVMap(LXtObjectID self, const char **vmap)

This returns the name of the vertex map used when doing cage baking. This should be a morph vmap.

LxResult BakeItem(LXtObjectID self, void **item)

This returns the bake item: baking can be controlled by baking items which contains information about the render target, UV name and all that.

LxResult UDIM(LXtObjectID self, int *udim)

This returns the UDIM tile to bake to. This value causes the bake region to be overridden with this UDIM tile (but only if it’s a valid UDIM number).

LxResult RenderBakeToRGBA(LXtObjectID self, int *mode)

When baking to a texture, this returns the mode of baking to RGBA channels of the texture

LxResult RenderBakeFromRGBA(LXtObjectID self, int *mode)

When baking to a texture, this returns the mode of baking from RGBA channels of source frames

LxResult RenderTurntableFPS(int &fps)

User Class Only:

LxResult RenderTurntableNumFrames(int &numFrames)
LxResult RenderBakeVMap(std::string &vmap)
LxResult RenderBakeCageVMap(std::string &vmap)
LxResult RenderBakeLookDistance(double &distance)
LxResult RenderBakeEffect(std::string &effect)
LxResult FrameBufferSlot(int &index)
LxResult FrameBufferRegionBackgroundSlot(int &slotIndex, int &passIndex)
LxResult OutputFormat(std::string &format)
LxResult OutputFilename(std::string &filename)
LxResult Options(int &options)

LXiRENDERTYPE_FRAME

This method determines how to render the scene.

  • FRAME Render a single frame at the scene time returned by RenderAtTime().

  • ANIM Render a complete animation using the scene’s properties for first frame, last frame and frame step.

  • TURNTABLE_CAMERA Render a turntable animation by rotating the camera around the object. RenderAtTime() determines at what scene time the turntable animation is done. RenderTurntableNumFrames() determines how many frames are rendered, while RenderTurntableFPS() determines the frame rate when saving as a movie.

  • TURNTABLE_GEOMETRY Render a turntable animation by rotating the geometry in place. RenderAtTime(), RenderTurntableNumFrames() and RenderTurntableFPS() are used in the same manner as for TURNTABLE_CAMERA

  • BAKE_GEOMETRY Bake into the geometry.

  • BAKE_TEXTURE Bake into a texture.

  • LXiRENDERTYPE_ANIM

  • LXiRENDERTYPE_TURNTABLE_CAMERA

  • LXiRENDERTYPE_TURNTABLE_GEOMETRY

  • LXiRENDERTYPE_BAKE_SCENE

  • LXiRENDERTYPE_BAKE_TEXTURE


LXfRENDEROPT_NO_WAITING

This returns a series of options as a mask. The following flags are defined:

  • LXfRENDEROPT_NO_IMAGE

  • LXfRENDEROPT_NO_CLEANUP

  • LXfRENDEROPT_IC_ONLY


LXiRENDEREYE_MONO

One or more render passes may be rendered per frame. Each render pass (not to be confused with a frame pass) represents some variation of the frame. These methods are called when a render pass begins or ends. ProgressRenderPassEnd() is provided with an ILxAttributesID representing the state of the render at the time the pass finished, as well as an ILxFrameBuffer representing the rendered pass. These can be AddRef()’ed and held onto for future use, if so desired. Note that the frame buffer may be NULL if the render was aborted. If stereo is on, then the left, right or both eyes will be rendered. The eye argument will be one of the XiRENDEREYE_* values, with MONO being passed if stereo rendering is disabled.

  • LXiRENDEREYE_LEFT

  • LXiRENDEREYE_RIGHT

  • LXiRENDEREYE_BOTH

ILxRenderJob1

class ILxRenderJob1

Public Functions

LxResult RenderItem(LXtObjectID self, void **ppvObj)
LxResult ActionName(LXtObjectID self, const char **action)
LxResult GroupName(LXtObjectID self, const char **group)
LxResult RenderAs(LXtObjectID self, int *mode)
LxResult RenderAtTime(LXtObjectID self, double *time)
LxResult RenderTurntableNumFrames(LXtObjectID self, int *numFrames)
LxResult RenderTurntableFPS(LXtObjectID self, int *fps)
LxResult RenderBakeVMap(LXtObjectID self, const char **vmap)
LxResult RenderBakeLookDistance(LXtObjectID self, double *distance)
LxResult RenderBakeItem(LXtObjectID self, int *include, void **item)
LxResult RenderBakeEffect(LXtObjectID self, const char **effect)
LxResult RenderBakeImage(LXtObjectID self, void **ppvObj)
LxResult TestItem(LXtObjectID self, LXtObjectID item, LXtObjectID eval)
LxResult FrameBufferSlot(LXtObjectID self, int *index)
LxResult FrameBufferRegionBackgroundSlot(LXtObjectID self, int *slotIndex, int *passIndex)
LxResult OutputFormat(LXtObjectID self, const char **format)
LxResult OutputFilename(LXtObjectID self, const char **filename)
LxResult Options(LXtObjectID self, int *options)
LxResult ProgressAborted(LXtObjectID self)
LxResult ProgressBegin(LXtObjectID self, LXtObjectID renderStats)
LxResult ProgressEnd(LXtObjectID self, LXtObjectID finalFrameBuffer, LXtObjectID finalStats)
LxResult ProgressPercentDone(LXtObjectID self, double progressScene, double progressFrame, double progressRenderPass)
LxResult ProgressImageMetrics(LXtObjectID self, int resX, int resH, int *w, int *h, double *zoom, int *panX, int *panY, int *output)
LxResult ProgressFrameBegin(LXtObjectID self, int frame, int w, int h)
LxResult ProgressFrameEnd(LXtObjectID self, int frame, LXtObjectID stats)
LxResult ProgressRenderPassBegin(LXtObjectID self, int frameIndex, int renderPassIndex, const char *renderPassName, int eye)
LxResult ProgressRenderPassEnd(LXtObjectID self, int frame, int renderPassIndex, const char *renderPassName, int eye, LXtObjectID frameBuffer, LXtObjectID stats)
LxResult ProgressFramePassBegin(LXtObjectID self, int frame, int renderPass, int eye, int pass)
LxResult ProgressFramePassEnd(LXtObjectID self, int frame, int renderPass, int eye, int pass)
LxResult ProgressBucketBegin(LXtObjectID self, int row, int col)
LxResult ProgressBucketEnd(LXtObjectID self, int row, int col, LxResult code)
LxResult ProgressString(LXtObjectID self, const char *infoString, const char *userString)
LxResult ProgressImage(LXtObjectID self, LXtObjectID img)
LxResult ProgressImageUpdated(LXtObjectID self)
LxResult ProgressTickle(LXtObjectID self)
LxResult RenderBakeCageVMap(LXtObjectID self, const char **vmap)

ILxRenderProgressListener

class ILxRenderProgressListener

Clients can use ILxRenderProgressListener to listen for events indicating the start and end of a render. The end event includes an ILxRenderStatsID that can be used to obtain detailed information about the just-completed render. For real-time feedback on a render, clients can listen to the “render” system’s rolling log messages via ILxLogListener.

Public Functions

void Begin(LXtObjectID self)
void End(LXtObjectID self, LXtObjectID stats)

ILxRenderStats

class ILxRenderStats

Various statistics are available for the rendered frames. Each render pass of each frame has its own set of stats, and is represented by an ILxAttributes object. The stats for an entire rendered animation are available to clients. Each ILxAttributes contains not only the stats for the specific render pass, but also a snapshot of the stats for the frame that owns the pass and the scene itself. Thus, the stats for the last pass in a frame also contain the final stats for the frame, and the stats for the last frame represent the final stats for the entire scene. Stats are provided through a container object, ILxRenderStats. This object can be queried to obtain the ILxAttributes for a specific render pass in a specific frame. There are also utility methods to get the ILxAttributes representing the entire frame or the entire scene. Note that while a render is in progress, the ILxAttributes object representing the scene itself or a specific frame will change as each pass or frame finishes rendering. This is because each stats object is a snapshot of the render, with the last pass in a frame representing the frame and the last frame in the scene representing the scene. Thus, during rendering you will need to update which object you’re using as each frame/pass completes. For simplicity, you can just obtain the ILxAttributes object on demand, rather than holding onto it indefinitely, at least until the render completes.

Public Functions

LxResult NumFrames(LXtObjectID self, int *count)

This returns the number of frames in the render.

LxResult NumPasses(LXtObjectID self, int frameIndex, int *count)

This returns the number of passes per frame. Under normal circumstances all frames will have the same number of passes, but if the render is in progress or aborted the last frame (the one currently being rendered) may not yet have stats for all of its passes (ie: the ones not yet rendered).

LxResult GetPassStats(LXtObjectID self, int frameIndex, int passIndex, void **ppvObj)

This can be used to get the ILxAttributes object for a particular pass. Frames and passes are referenced by index. not by frame number or pass name or anything like that. As usual, the object must be released when no longer needed.

LxResult GetFrameStats(LXtObjectID self, int frameIndex, void **ppvObj)

This convenience function gets the stats representing an entire frame (ie: the last pass in the frame). As usual, the object must be released when no longer needed.

LxResult GetSceneStats(LXtObjectID self, void **ppvObj)

This similarly gets the stats representing the entire scene (ie: the last pass in the last frame). As usual, the object must be released when no longer needed.

typedef void *LXtTileTreeID

LXf_RBF_NO_AA

Buffers have flags, such as anti-aliasing and dithering. Buffers also track whether or not they are factory-named, to enable automatic naming rules for channels.

  • LXf_RBF_DITHER

  • LXf_RBF_IS_FACTORY_NAME

ILxBuffer

class ILxBuffer

Render buffers are defined using the ILxBuffer interface.

Public Functions

void SetFlags(LXtObjectID self, int flags)
int Flags(LXtObjectID self)
unsigned DataType(LXtObjectID self)
LXtObjectID VectorType(LXtObjectID self)

Render buffers have a vector type which tells the renderer which packets it expects from the sample vector.

void SetSize(LXtObjectID self, int width, int height, int writeBucketsToDisk, int isStereo)

This method allocates the buffer itself given its width and height. While you can theoretically have buffers with different sizes in the same frame buffer, in practice they are all the same size.

void GetSize(LXtObjectID self, int *width, int *height)

This returns the width and height of the buffer.

LxResult SetEyeSide(LXtObjectID self, int eyeSide)

Set the current eye side to left or right. This function only works with buffers contained within stereo frame buffers.

void Clear(LXtObjectID self, int x, int y)

This method clears the pixel at the given coordinates.

LxResult Convert(LXtObjectID self, LXtGenVectorID gv, int x, int y, float blend)

This method is called when the sample vector is complete and ready to be recorded to the render buffers. The job of this function is to get the packet(s) from the vector and to convert it into values that will be set into the buffer at the given pixel coordinates with the given blend value.

void *Pixel(LXtObjectID self, int x, int y)

This method returns a pointer to the pixel of coordinates (x, y).

void *Line(LXtObjectID self, int y)

This method returns a pointer to the array of pixels at line y.

LxResult Name(LXtObjectID self, const char **name)

This method returns the buffer name’s internal name, and can be used for lookup or other similar purposes.

LxResult SetUserName(LXtObjectID self, const char *name)

These methods set and retrieve the username for the buffer. This should be a string obtained from a message table so that it can be translated.

LxResult UserName(LXtObjectID self, const char **name)
LxResult CreateImageTileTree(LXtObjectID self)
LxResult DestroyImageTileTree(LXtObjectID self)
LXtTileTreeID GetImageTileTree(LXtObjectID self)
size_t GetImageTileTreeSize(LXtObjectID self)
LxResult ResetImageTileTree(LXtObjectID self)
LxResult IncrementTileTreeSize(LXtObjectID self)
LxResult DecrementTileTreeSize(LXtObjectID self)
void GetSize(int &width, int &height) const

User Class Only:

LxResult Name(std::string &name) const

User Class Only:

LxResult SetUserName(const std::string &name)

User Class Only:


LXiRBD_FLOAT

This returns the datatype of the buffer. Often this is a single float for simple greyscale buffers or a float triple representing RGB or similar sets of channels.

  • LXiRBD_FLOAT3

  • LXiRBD_OTHER

ILxFrameBuffer

class ILxFrameBuffer

Public Functions

ILxBufferID Allocate(LXtObjectID self, const char *name, LXtObjectID item, const char *identity, const char *userName, int isFactoryName, int writeBucketsToDisk)

Allocating a render buffer is done by name and an optional identity. An item may be optionally set to create a buffer specific to the given item. For instance, the ‘goo’ shader may have created its own buffer definition and the ‘goo’ shader on the ‘xxx’ material may want to have its own ‘goo.xxx’ buffer. If the buffer has already been created it is simply returned.

LxResult IsStereo(LXtObjectID self, int *isStereo)

Check if a given frame buffer is rendered with stereo outputs.

LxResult GetStereoEyeDisplay(LXtObjectID self, LXtStereoEye *eyeDisplay)

Get the stereo eye display mode (left, right, or both).

LxResult SetStereoEyeDisplay(LXtObjectID self, LXtStereoEye eyeDisplay)

Set the stereo eye display mode (left, right, or both).

LxResult GetStereoComposite(LXtObjectID self, LXtStereoComposite *composite)

Set the stereo compositing style (anaglyph, side-by-side, etc.)

LxResult SetStereoComposite(LXtObjectID self, LXtStereoComposite composite)

Set the stereo compositing style (anaglyph, side-by-side, etc.)

LxResult SetEyeSide(LXtObjectID self, int eyeSide)

Set the current eye side to left or right. This function only works with buffers contained within stereo frame buffers.

LxResult GetLineBuffer(LXtObjectID self, float **buf)
LxResult CreateFrameBufferTargetImage(LXtObjectID self, LXtPixelFormat type, int w, int h, void **ppvObj)

When creating images that will be targets for image processing, call CreateFrameBufferTargetImage to prepare the image, which takes care of stereo handling depending on the stero image processing settings.

LxResult GetRenderPassName(LXtObjectID self, char *name)

Return the name of the render pass associated with the frame buffer. If the pass name is not set, the returned name is empty.

LxResult SetRenderPassName(LXtObjectID self, const char *name)

Set the name of the render pass associated with the frame buffer.

unsigned int BucketsOnDisk(LXtObjectID self, int index)
LXtObjectID Lookup(LXtObjectID self, const char *name, LXtObjectID item)

This returns the render buffer of the given name and item in the frame buffer.

LXtObjectID LookupByIdentity(LXtObjectID self, const char *identity)

This returns the render buffer of the given identity in the frame buffer.

unsigned int Count(LXtObjectID self)

Returns the total number of buffers.

LXtObjectID ByIndex(LXtObjectID self, int index)

Returns the buffer given its index in the list.

LXtObjectID Alpha(LXtObjectID self, int index)

Return the buffer for the associated alpha channel (if any).

int AlphaIndex(LXtObjectID self, int index)

Return the index of the buffer for the alpha channel associated with the color buffer at the given index (if any).

LxResult Size(LXtObjectID self, int index, int *width, int *height)

Return the width and height of the buffer at the given index.

LxResult AreaProcessingActive(LXtObjectID self, int bufferIndex, int *active)
int GetSaveProcessed(LXtObjectID self, int bufferIndex)

Return if images should be saved with post-processing applied.

LxResult SetSaveProcessed(LXtObjectID self, int bufferIndex, int enabled)

Set if images should be saved with post-processing applied.

int GetBloomEnabled(LXtObjectID self, int bufferIndex)
LxResult SetBloomEnabled(LXtObjectID self, int bufferIndex, int enabled)
double GetBloomThreshold(LXtObjectID self, int bufferIndex)
LxResult SetBloomThreshold(LXtObjectID self, int bufferIndex, double threshold)
double GetBloomRadius(LXtObjectID self, int bufferIndex)
LxResult SetBloomRadius(LXtObjectID self, int bufferIndex, double radius)
double GetVignetteAmount(LXtObjectID self, int bufferIndex)
LxResult SetVignetteAmount(LXtObjectID self, int bufferIndex, double radius)
double GetInputBlackLevel(LXtObjectID self, int bufferIndex)
LxResult SetInputBlackLevel(LXtObjectID self, int bufferIndex, double blackLevel)
double GetInputGrayLevel(LXtObjectID self, int bufferIndex)
double GetInvInputGrayLevel(LXtObjectID self, int bufferIndex)
LxResult SetInputGrayLevel(LXtObjectID self, int bufferIndex, double gamma)
double GetInputWhiteLevel(LXtObjectID self, int bufferIndex)
LxResult SetInputWhiteLevel(LXtObjectID self, int bufferIndex, double whiteLevel)
double GetInputMinRedLevel(LXtObjectID self, int bufferIndex)
LxResult SetInputMinRedLevel(LXtObjectID self, int bufferIndex, double level)
double GetInputRedGrayLevel(LXtObjectID self, int bufferIndex)
double GetInvInputRedGrayLevel(LXtObjectID self, int bufferIndex)
LxResult SetInputRedGrayLevel(LXtObjectID self, int bufferIndex, double gamma)
double GetInputMaxRedLevel(LXtObjectID self, int bufferIndex)
LxResult SetInputMaxRedLevel(LXtObjectID self, int bufferIndex, double level)
double GetInputMinGreenLevel(LXtObjectID self, int bufferIndex)
LxResult SetInputMinGreenLevel(LXtObjectID self, int bufferIndex, double level)
double GetInputGreenGrayLevel(LXtObjectID self, int bufferIndex)
double GetInvInputGreenGrayLevel(LXtObjectID self, int bufferIndex)
LxResult SetInputGreenGrayLevel(LXtObjectID self, int bufferIndex, double gamma)
double GetInputMaxGreenLevel(LXtObjectID self, int bufferIndex)
LxResult SetInputMaxGreenLevel(LXtObjectID self, int bufferIndex, double level)
double GetInputMinBlueLevel(LXtObjectID self, int bufferIndex)
LxResult SetInputMinBlueLevel(LXtObjectID self, int bufferIndex, double level)
double GetInputBlueGrayLevel(LXtObjectID self, int bufferIndex)
double GetInvInputBlueGrayLevel(LXtObjectID self, int bufferIndex)
LxResult SetInputBlueGrayLevel(LXtObjectID self, int bufferIndex, double gamma)
double GetInputMaxBlueLevel(LXtObjectID self, int bufferIndex)
LxResult SetInputMaxBlueLevel(LXtObjectID self, int bufferIndex, double level)
int GetExpType(LXtObjectID self, int bufferIndex)
LxResult SetExpType(LXtObjectID self, int bufferIndex, int expType)
double GetISO(LXtObjectID self, int bufferIndex)
LxResult SetISO(LXtObjectID self, int bufferIndex, double iso)
int GetToneMap(LXtObjectID self, int bufferIndex)
LxResult SetToneMap(LXtObjectID self, int bufferIndex, int toneMap)
double GetToneAmt(LXtObjectID self, int bufferIndex)
LxResult SetToneAmt(LXtObjectID self, int bufferIndex, double toneAmt)
double GetHueOffset(LXtObjectID self, int bufferIndex)
LxResult SetHueOffset(LXtObjectID self, int bufferIndex, double hueOffset)
double GetSaturation(LXtObjectID self, int bufferIndex)
LxResult SetSaturation(LXtObjectID self, int bufferIndex, double saturation)
double GetColorization(LXtObjectID self, int bufferIndex)
LxResult SetColorization(LXtObjectID self, int bufferIndex, double colorization)
void GetTargetColor(LXtObjectID self, int bufferIndex, double *color)
LxResult SetTargetColor(LXtObjectID self, int bufferIndex, const double *color)
double GetOutputBlackLevel(LXtObjectID self, int bufferIndex)
LxResult SetOutputBlackLevel(LXtObjectID self, int bufferIndex, double blackLevel)
double GetOutputWhiteLevel(LXtObjectID self, int bufferIndex)
LxResult SetOutputWhiteLevel(LXtObjectID self, int bufferIndex, double whiteLevel)
double GetOutputMinRedLevel(LXtObjectID self, int bufferIndex)
LxResult SetOutputMinRedLevel(LXtObjectID self, int bufferIndex, double blackLevel)
double GetOutputMaxRedLevel(LXtObjectID self, int bufferIndex)
LxResult SetOutputMaxRedLevel(LXtObjectID self, int bufferIndex, double whiteLevel)
double GetOutputMinGreenLevel(LXtObjectID self, int bufferIndex)
LxResult SetOutputMinGreenLevel(LXtObjectID self, int bufferIndex, double blackLevel)
double GetOutputMaxGreenLevel(LXtObjectID self, int bufferIndex)
LxResult SetOutputMaxGreenLevel(LXtObjectID self, int bufferIndex, double whiteLevel)
double GetOutputMinBlueLevel(LXtObjectID self, int bufferIndex)
LxResult SetOutputMinBlueLevel(LXtObjectID self, int bufferIndex, double blackLevel)
double GetOutputMaxBlueLevel(LXtObjectID self, int bufferIndex)
LxResult SetOutputMaxBlueLevel(LXtObjectID self, int bufferIndex, double whiteLevel)
double GetOutputGamma(LXtObjectID self, int bufferIndex)
double GetOutputInvGamma(LXtObjectID self, int bufferIndex)
LxResult SetOutputGamma(LXtObjectID self, int bufferIndex, double gamma)
const char *GetOutputColorspace(LXtObjectID self)
LxResult SetOutputColorspace(LXtObjectID self, const char *colorspace)
ILxColorMappingID GetOutputColormapping(LXtObjectID self)
LxResult SetOutputColormapping(LXtObjectID self, LXtObjectID colormapping)
LxResult AddAttribute(LXtObjectID self, const char *name, const char *type, unsigned *index)

Arbitrary attributes may be added to frame buffer objects. These can be read and set using the image ILxAttributes interface. This function allows a client to add an attribute to an ILxFrameBuffer object by providing an attribute name and an exotype name. If the attribute has been added successfully, its index will be returned.

LxResult RenderProcessAllocate(LXtObjectID self, int bufferIndex, const LXtRenderOutputProcess **rndrProcess)

This function allocates a RenderOutputProcess for a given buffer index. Clients can use this to find out more information for a given render output. Because we need to allocate the render output process, don’t forget to deallocate as well with the RenderProcessDeallocate call

LxResult RenderProcessDeallocate(LXtObjectID self, const LXtRenderOutputProcess **rndrProcess)

This function frees the memory allocated for the render Process requested with RenderProcessAllocate. This is because we might make changes to the renderprocess struct in future versions

bool Allocate(CLxUser_Buffer &buffer, const std::string &name, const std::string &userName, bool isFactoryName, bool writeBucketsToDisk)

User Class Only:

bool NewFrameBufferTarget(CLxUser_Image &image, LXtPixelFormat type, int w, int h)
bool IsStereo(void) const
bool Lookup(CLxUser_Buffer &buffer, const std::string &name) const
bool ByIndex(CLxUser_Buffer &buffer, int index) const
bool Alpha(CLxUser_Buffer &buffer, int index) const
LxResult AddAttribute(const std::string &name, const std::string &type, unsigned &index)

ILxImageProcessing

class ILxImageProcessing

This interface allows a series of common image processing operations to be applied to an image or frame buffer. Clients set the various options and then call one of the Apply methods to apply these operations to a new image or frame buffer.

Public Functions

LxResult GetAsReadOnly(LXtObjectID self, void **ppvObj)

This method provides access to a read-only version of the ILxImageProcessing object through an ILxImageProcessingInfo object, which is useful when you want others to look but not touch. This is not a morph; this returns a new object that references the original.

LxResult SetIdentifier(LXtObjectID self, const char *string)

A processing object can include an identifier string. If set, any changes to the object’s image processing objects will be broadcast over the global image processing port. If the object is being used as a one-off, then this string need not be set.

LxResult GetIdentifier(LXtObjectID self, const char **string)
LxResult Reset(LXtObjectID self)

The Reset method restores all of the remaining states to default values (the identifier is not affect).

LxResult CopyToRenderProcess(LXtObjectID self, LXtRenderOutputProcess *rop)
LxResult CopyFromRenderProcess(LXtObjectID self, const LXtRenderOutputProcess *rop)
LxResult CopySettingsFromFrameBuffer(LXtObjectID self, LXtObjectID frameBuffer, int bufferIndex)

Copy image processing settings from a frame buffer.

LxResult CopySettingsToFrameBuffer(LXtObjectID self, LXtObjectID frameBuffer, int bufferIndex)

Copy image processing settings from a frame buffer.

LxResult ApplyToImageFromFrameBuffer(LXtObjectID self, LXtObjectID frameBuffer, int bufferIndex, LXtObjectID image, float xOffset, float yOffset, float zoom)

Apply image processing settings to an image from a frame buffer.

LxResult ApplyToImageFromFrameBufferOverride(LXtObjectID self, LXtObjectID frameBuffer, int bufferIndex, LXtObjectID image, float xOffset, float yOffset, float zoom, LXtImageProcessingOperators opOverride)
LxResult ApplyToFrameBuffer(LXtObjectID self, LXtObjectID frameBuffer, int bufferIndex)

Apply image processing settings directly to a frame buffer.

LxResult ApplyToFrameBufferOverride(LXtObjectID self, LXtObjectID frameBuffer, int bufferIndex, LXtImageProcessingOperators opOverride)
LxResult ApplyToImage(LXtObjectID self, LXtObjectID srcImage, LXtObjectID dstImage)

Apply image processing settings to an image.

LxResult ApplyToImageOverride(LXtObjectID self, LXtObjectID srcImage, LXtObjectID dstImage, LXtImageProcessingOperators opOverride)
LxResult GetImageProcessingOperators(LXtObjectID self, LXtImageProcessingOperators *ops)

Control which image processing operators are enabled.

LxResult SetImageProcessingOperators(LXtObjectID self, LXtImageProcessingOperators ops)
LxResult AreaProcessingActive(LXtObjectID self, int *active)

Determine if area image processing is active. When image processing is limited to functions that operate on pixels with no dependencies on neighboring pixels, it is safe to optimize by passing in a cropped portion of the overall image. For example, if the image is larger than the viewport, or is zoomed in, just that portion of the image can be passed to the Apply functions if the AreaProcessingActive function indicates that area functions are inactive.

LxResult GetSourceImageGamma(LXtObjectID self, double *gamma)

Source image gamma is the original gamma of an image loaded into an image slot in the render window. This gamma is used to convert the image into linear space before image processing begins. Gamma is re-applied using the output gamma before the image is saved.

LxResult SetSourceImageGamma(LXtObjectID self, double gamma)
LxResult GetSourceImageIsStereoSideBySide(LXtObjectID self, int *isStereo)

A stereo image can be stored in a side-by-side format, which can be displayed as stereo when this setting is enabled.

LxResult SetSourceImageIsStereoSideBySide(LXtObjectID self, int isStereo)
LxResult GetSaveProcessed(LXtObjectID self, int *enabled)

SaveProcessed controls whether or not an image is saved with post- processing effects applied. When SaveProcessed is turned off, the raw, original image is saved with no post processing.

LxResult SetSaveProcessed(LXtObjectID self, int enabled)
LxResult GetStereoEye(LXtObjectID self, LXtStereoEye *eye)

See the LXtStereoEye type for the stereo eye modes, and the LXtStereoComposite type for the stereo composite modes.

LxResult SetStereoEye(LXtObjectID self, LXtStereoEye eye)
LxResult GetStereoComposite(LXtObjectID self, LXtStereoComposite *mode)
LxResult SetStereoComposite(LXtObjectID self, LXtStereoComposite mode)
LxResult GetBloomEnabled(LXtObjectID self, int *enabled)

Bloom options control a post-processing effect that redistributes excess energy to neighboring pixels. Bloom threshold is the level above which the bloom effect is applied. Bloom radius controls the size of the bloom effect. The bloom effect can be switched on or off with the BloomEnabled setting.

LxResult SetBloomEnabled(LXtObjectID self, int enabled)
LxResult GetBloomThreshold(LXtObjectID self, double *threshold)
LxResult SetBloomThreshold(LXtObjectID self, double threshold)
LxResult GetBloomRadius(LXtObjectID self, double *radius)
LxResult SetBloomRadius(LXtObjectID self, double radius)
LxResult GetVignetteAmount(LXtObjectID self, double *amount)

Vignette amount is the amount of darkening to apply to pixels based on their distance from the center of the frame.

LxResult SetVignetteAmount(LXtObjectID self, double amount)
LxResult GetInputBlackLevel(LXtObjectID self, double *inputBlackLevel)

Input black and white levels set the true black and white exposure levels of the rendered or source image, after which additional post processing is applied. Gray level is a subjective gamma adjustment to the midtone levels of the image colors, which is applied as part of the input level adjustment. (The inverse functions provide a pre-computed inverse of the last set gray level.)

LxResult SetInputBlackLevel(LXtObjectID self, double blackLevel)
LxResult GetInputGrayLevel(LXtObjectID self, double *gamma)
LxResult GetInvInputGrayLevel(LXtObjectID self, double *invGamma)
LxResult SetInputGrayLevel(LXtObjectID self, double gamma)
LxResult GetInputWhiteLevel(LXtObjectID self, double *inputWhiteLevel)
LxResult SetInputWhiteLevel(LXtObjectID self, double whiteLevel)
LxResult GetInputMinRedLevel(LXtObjectID self, double *inputLevel)
LxResult SetInputMinRedLevel(LXtObjectID self, double level)
LxResult GetInputRedGrayLevel(LXtObjectID self, double *gamma)
LxResult GetInvInputRedGrayLevel(LXtObjectID self, double *invGamma)
LxResult SetInputRedGrayLevel(LXtObjectID self, double gamma)
LxResult GetInputMaxRedLevel(LXtObjectID self, double *inputLevel)
LxResult SetInputMaxRedLevel(LXtObjectID self, double level)
LxResult GetInputMinGreenLevel(LXtObjectID self, double *inputLevel)
LxResult SetInputMinGreenLevel(LXtObjectID self, double level)
LxResult GetInputGreenGrayLevel(LXtObjectID self, double *gamma)
LxResult GetInvInputGreenGrayLevel(LXtObjectID self, double *invGamma)
LxResult SetInputGreenGrayLevel(LXtObjectID self, double gamma)
LxResult GetInputMaxGreenLevel(LXtObjectID self, double *inputLevel)
LxResult SetInputMaxGreenLevel(LXtObjectID self, double level)
LxResult GetInputMinBlueLevel(LXtObjectID self, double *inputLevel)
LxResult SetInputMinBlueLevel(LXtObjectID self, double level)
LxResult GetInputBlueGrayLevel(LXtObjectID self, double *gamma)
LxResult GetInvInputBlueGrayLevel(LXtObjectID self, double *invGamma)
LxResult SetInputBlueGrayLevel(LXtObjectID self, double gamma)
LxResult GetInputMaxBlueLevel(LXtObjectID self, double *inputLevel)
LxResult SetInputMaxBlueLevel(LXtObjectID self, double level)
LxResult GetExpType(LXtObjectID self, int *expType)

Exposure control determines how frame buffer pixel values (expressed in physical units of radiance) should be mapped to output pixel values. The simple way is to specify a white level (the input value that corresponds to an output of 1.0), but another method is to emulate a camera’s film or sensor, in which the mapping depends on film speed (ISO), exposure time, and f-stop.

LxResult SetExpType(LXtObjectID self, int expType)
LxResult GetISO(LXtObjectID self, double *iso)
LxResult SetISO(LXtObjectID self, double iso)
LxResult GetToneMap(LXtObjectID self, int *toneMap)

Tone mapping remaps the dynamic range of the image colors, enabling high- dynamic-range (HDR) colors to be brought into the visible range, and also to be mapped for saving to low-dynamic-range (LDR) integer file formats.

LxResult SetToneMap(LXtObjectID self, int toneMap)
LxResult GetToneAmt(LXtObjectID self, double *toneAmt)
LxResult SetToneAmt(LXtObjectID self, double toneAmt)
LxResult GetHueOffset(LXtObjectID self, double *hueOffset)

Hue offset is an angle of rotation for the hue of the image colors, given in radians. For example, rotating by PI radians changes red colors to cyan.

LxResult SetHueOffset(LXtObjectID self, double hueOffset)
LxResult GetSaturation(LXtObjectID self, double *saturation)

Saturation is a multiplier on the existing saturation of the image colors, such that values greater than 1.0 increase saturation, and values smaller than 1.0 decrease saturation. The default value of 1.0 has no effect.

LxResult SetSaturation(LXtObjectID self, double saturation)
LxResult GetColorization(LXtObjectID self, double *colorization)

Colorization and target color pull the colors of an image. Colorization is the amount of pull, where 0 is no pull and 1.0 is maximum pull. The target color is the color towards which the colors of the image are pulled.

LxResult SetColorization(LXtObjectID self, double colorization)
LxResult GetTargetColor(LXtObjectID self, double *color)
LxResult SetTargetColor(LXtObjectID self, const double *color)
LxResult GetOutputBlackLevel(LXtObjectID self, double *outputBlackLevel)

Output black and white levels set the final mapping to white and black, which is applied just before output gamma as the image is output to its final destination.

LxResult SetOutputBlackLevel(LXtObjectID self, double blackLevel)
LxResult GetOutputWhiteLevel(LXtObjectID self, double *outputWhiteLevel)
LxResult SetOutputWhiteLevel(LXtObjectID self, double whiteLevel)
LxResult GetOutputMinRedLevel(LXtObjectID self, double *outputLevel)
LxResult SetOutputMinRedLevel(LXtObjectID self, double outputLevel)
LxResult GetOutputMaxRedLevel(LXtObjectID self, double *outputLevel)
LxResult SetOutputMaxRedLevel(LXtObjectID self, double outputLevel)
LxResult GetOutputMinGreenLevel(LXtObjectID self, double *outputLevel)
LxResult SetOutputMinGreenLevel(LXtObjectID self, double outputLevel)
LxResult GetOutputMaxGreenLevel(LXtObjectID self, double *outputLevel)
LxResult SetOutputMaxGreenLevel(LXtObjectID self, double outputLevel)
LxResult GetOutputMinBlueLevel(LXtObjectID self, double *outputLevel)
LxResult SetOutputMinBlueLevel(LXtObjectID self, double outputLevel)
LxResult GetOutputMaxBlueLevel(LXtObjectID self, double *outputLevel)
LxResult SetOutputMaxBlueLevel(LXtObjectID self, double outputLevel)
LxResult GetOutputGamma(LXtObjectID self, double *outputGamma)

Output gamma is the final level adjustment intended to conform the final image levels to a standard gamma level, such as 2.2 for sRGB. The inverse functions provide a pre-computed inverse of the last set value.

LxResult GetOutputInvGamma(LXtObjectID self, double *outputInvGamma)
LxResult SetOutputGamma(LXtObjectID self, double gamma)
const char *GetOutputColorspace(LXtObjectID self)

Output colorspace holds information about the name and mapping of the colorspace intended for the final image color display. Additionaly colorspace embedding toggle has been exposed to enable or disable embedding ICC profile and EXIF data in the exported images.

LxResult SetOutputColorspace(LXtObjectID self, const char *colorspace)
ILxColorMappingID GetOutputColormapping(LXtObjectID self)
LxResult SetOutputColormapping(LXtObjectID self, LXtObjectID colormapping)
LxResult GetColorSpaceEmbedding(LXtObjectID self, int *colorSpaceEmbedding)
LxResult SetColorSpaceEmbedding(LXtObjectID self, const int colorSpaceEmbedding)

LXfIMAGEPROC_EVENT_CHANGED

An LXiIMAGEPROC_EVENT_CHANGED event is sent whenever any Set..() method is called (except SetIdentifier()). The event data is the object’s identifier string. The defines are in an SDK block as they are passed to the Change() method of the listener. An LXiIMAGEPROC_EVENT_RESET event is set when the Reset() method is called, rather than sending a bunch of individual CHANGED events. The low bits are reserved for when the events are used as part of a text hint array, and tend to encode UI update notification flags.

  • LXfIMAGEPROC_EVENT_MAINTENANCE

  • LXmIMAGEPROC_EVENT_RESERVED

  • LXiIMAGEPROC_EVENT_CHANGED_OPERATORS

  • LXiIMAGEPROC_EVENT_CHANGED_SOURCE_IMAGE_GAMMA

  • LXiIMAGEPROC_EVENT_CHANGED_SAVE_PROCESSED

  • LXiIMAGEPROC_EVENT_CHANGED_BLOOM_ENABLED

  • LXiIMAGEPROC_EVENT_CHANGED_BLOOM_THRESHOLD

  • LXiIMAGEPROC_EVENT_CHANGED_BLOOM_RADIUS

  • LXiIMAGEPROC_EVENT_CHANGED_VIGNETTE_AMOUNT

  • LXiIMAGEPROC_EVENT_CHANGED_INPUT_BLACK_LEVEL

  • LXiIMAGEPROC_EVENT_CHANGED_INPUT_GRAY_LEVEL

  • LXiIMAGEPROC_EVENT_CHANGED_INPUT_WHITE_LEVEL

  • LXiIMAGEPROC_EVENT_CHANGED_INPUT_MIN_RGB_LEVEL

  • LXiIMAGEPROC_EVENT_CHANGED_INPUT_GRAY_RGB_LEVEL

  • LXiIMAGEPROC_EVENT_CHANGED_INPUT_MAX_RGB_LEVEL

  • LXiIMAGEPROC_EVENT_CHANGED_TONE_MAPPING

  • LXiIMAGEPROC_EVENT_CHANGED_HUE_OFFSET

  • LXiIMAGEPROC_EVENT_CHANGED_SATURATION

  • LXiIMAGEPROC_EVENT_CHANGED_COLORIZATION

  • LXiIMAGEPROC_EVENT_CHANGED_TARGET_COLOR

  • LXiIMAGEPROC_EVENT_CHANGED_OUTPUT_BLACK_LEVEL

  • LXiIMAGEPROC_EVENT_CHANGED_OUTPUT_WHITE_LEVEL

  • LXiIMAGEPROC_EVENT_CHANGED_OUTPUT_MIN_RGB_LEVEL

  • LXiIMAGEPROC_EVENT_CHANGED_OUTPUT_MAX_RGB_LEVEL

  • LXiIMAGEPROC_EVENT_CHANGED_OUTPUT_GAMMA

  • LXiIMAGEPROC_EVENT_CHANGED_RESPECT_RENDER_VIEW_GAMMA_PREF

  • LXiIMAGEPROC_EVENT_CHANGED_OUTPUT_COLORSPACE

  • LXiIMAGEPROC_EVENT_CHANGED_OUTPUT_COLOR_SPACE_EMBEDDING

  • LXiIMAGEPROC_EVENT_RESET

ILxImageProcessingListener

class ILxImageProcessingListener

Plug-ins can listen for when an ILxImageProcessing’s Set…() methods have been called by implementing this listener object. This contains a single method, Changed(), which is called with the setting that has changed. Note that events are only sent for image processing objects that have their identifier set to a non-NULL string. The identifier string is included as an argument to the change event.

Public Functions

LxResult Changed(LXtObjectID self, const char *identifier, int eventCode)
LxResult Reset(LXtObjectID self, const char *identifier)

We call the Reset() method when an ILxImageProcessing object with an identifier set has its Reset() method called. At this point all of the ILxImageProcessing object’s properties have been reset to defaults, save for the identifier itself.

ILxImageProcessingRead

class ILxImageProcessingRead

This interface provides read-only access to an ILxImageProcessing interface.

Public Functions

LxResult GetIdentifier(LXtObjectID self, const char **string)

These methods are identical to the Get…() methods in ILxImageProcessing; see that interface for more information.

LxResult CopyToRenderProcess(LXtObjectID self, LXtRenderOutputProcess *rop)
LxResult CopySettingsToFrameBuffer(LXtObjectID self, LXtObjectID frameBuffer, int bufferIndex)
LxResult ApplyToImageFromFrameBuffer(LXtObjectID self, LXtObjectID frameBuffer, int bufferIndex, LXtObjectID image, float xOffset, float yOffset, float zoom)
LxResult ApplyToImageFromFrameBufferOverride(LXtObjectID self, LXtObjectID frameBuffer, int bufferIndex, LXtObjectID image, float xOffset, float yOffset, float zoom, LXtImageProcessingOperators opOverride)
LxResult ApplyToFrameBuffer(LXtObjectID self, LXtObjectID frameBuffer, int bufferIndex)
LxResult ApplyToFrameBufferOverride(LXtObjectID self, LXtObjectID frameBuffer, int bufferIndex, LXtImageProcessingOperators opOverride)
LxResult ApplyToImage(LXtObjectID self, LXtObjectID srcImage, LXtObjectID dstImage)
LxResult ApplyToImageOverride(LXtObjectID self, LXtObjectID srcImage, LXtObjectID dstImage, LXtImageProcessingOperators opOverride)
LxResult GetImageProcessingOperators(LXtObjectID self, LXtImageProcessingOperators *ops)
LxResult AreaProcessingActive(LXtObjectID self, int *active)
LxResult GetSourceImageGamma(LXtObjectID self, double *gamma)
LxResult GetSourceImageIsStereoSideBySide(LXtObjectID self, int *isStereo)
LxResult GetSaveProcessed(LXtObjectID self, int *enabled)
LxResult GetStereoEye(LXtObjectID self, int *eye)
LxResult GetStereoComposite(LXtObjectID self, int *mode)
LxResult GetBloomEnabled(LXtObjectID self, int *enabled)
LxResult GetBloomThreshold(LXtObjectID self, double *threshold)
LxResult GetBloomRadius(LXtObjectID self, double *radius)
LxResult GetInputBlackLevel(LXtObjectID self, double *inputLevel)
LxResult GetInputGrayLevel(LXtObjectID self, double *gamma)
LxResult GetInvInputGrayLevel(LXtObjectID self, double *invGamma)
LxResult GetInputWhiteLevel(LXtObjectID self, double *inputLevel)
LxResult GetInputMinRedLevel(LXtObjectID self, double *inputLevel)
LxResult GetInputRedGrayLevel(LXtObjectID self, double *gamma)
LxResult GetInvInputRedGrayLevel(LXtObjectID self, double *invGamma)
LxResult GetInputMaxRedLevel(LXtObjectID self, double *inputLevel)
LxResult GetInputMinGreenLevel(LXtObjectID self, double *inputLevel)
LxResult GetInputGreenGrayLevel(LXtObjectID self, double *gamma)
LxResult GetInvInputGreenGrayLevel(LXtObjectID self, double *invGamma)
LxResult GetInputMaxGreenLevel(LXtObjectID self, double *inputLevel)
LxResult GetInputMinBlueLevel(LXtObjectID self, double *inputLevel)
LxResult GetInputBlueGrayLevel(LXtObjectID self, double *gamma)
LxResult GetInvInputBlueGrayLevel(LXtObjectID self, double *invGamma)
LxResult GetInputMaxBlueLevel(LXtObjectID self, double *inputLevel)
LxResult GetExpType(LXtObjectID self, int *expType)
LxResult GetISO(LXtObjectID self, double *iso)
LxResult GetToneMap(LXtObjectID self, int *toneMap)
LxResult GetToneAmt(LXtObjectID self, double *toneAmt)
LxResult GetHueOffset(LXtObjectID self, double *hueOffset)
LxResult GetSaturation(LXtObjectID self, double *saturation)
LxResult GetColorization(LXtObjectID self, double *colorization)
LxResult GetTargetColor(LXtObjectID self, double *color)
LxResult GetOutputBlackLevel(LXtObjectID self, double *outputLevel)
LxResult GetOutputWhiteLevel(LXtObjectID self, double *outputLevel)
LxResult GetOutputMinRedLevel(LXtObjectID self, double *outputLevel)
LxResult GetOutputMaxRedLevel(LXtObjectID self, double *outputLevel)
LxResult GetOutputMinGreenLevel(LXtObjectID self, double *outputLevel)
LxResult GetOutputMaxGreenLevel(LXtObjectID self, double *outputLevel)
LxResult GetOutputMinBlueLevel(LXtObjectID self, double *outputLevel)
LxResult GetOutputMaxBlueLevel(LXtObjectID self, double *outputLevel)
LxResult GetOutputGamma(LXtObjectID self, double *outputGamma)
LxResult GetOutputInvGamma(LXtObjectID self, double *outputInvGamma)
const char *GetOutputColorspace(LXtObjectID self)
ILxColorMappingID GetOutputColormapping(LXtObjectID self)

ILxImageProcessingService

class ILxImageProcessingService

The service’s main job is to create an object with an ILxImageProcessing object.

Public Functions

LxResult ScriptQuery(LXtObjectID self, void **ppvObj)

As with all globals, the first method gets the ILxScriptQueryID interface for the system. Since there is currently no ScriptQuery interface, this method will always fail.

LxResult Create(LXtObjectID self, void **ppvObj)

This is the important methods, which returns a new image processing object.