About
Render filters are used to post-process rendered images. They are currently used to implement the denoiser filter.
The filter interfaces are defined in the render_filter.framework.
FilterContex
A FilterContexRef is the central class to create and use images, filters and queues.
Context implementations are found at the maxon::FilterContextClasses registry:
- maxon::FilterContextClasses::OIDNCONTEXT: Open Image Denoiser context implementation.
Queue
A command queue allows queuing of multiple filters.
Queue implementations are found at the maxon::FilterCommandQueueClasses registry:
- maxon::FilterCommandQueueClasses::OIDNFILTERCOMMANDQUEUE: Open Image Denoiser queue implementation.
Filter
The maxon::FilterInterface allows to use a render filter.
Filter implementations are found at the maxon::FilterClasses registry:
- maxon::FilterClasses::OIDNFILTERRT: Intel Denoiser Raytracing implementation.
FilterImage
A filter image contains the actual image data.
Image implementations are found at the maxon::FilterImageClasses registry:
- maxon::FilterImageClasses::OIDNFILTERIMAGE: Open Image Denoiser image implementation.
An image is created with maxon::FilterContextInterface::CreateImage() using these parameters:
- maxon::FilterImageDescriptionParameters::WIDTH: Image width.
- maxon::FilterImageDescriptionParameters::HEIGHT: Image height.
Open Image Denoiser parameters
The Open Image Denoiser filter can further be configured with these parameters:
- maxon::OIDNFilterParameter::HDR: If the input data is in hight dynamic range.
- maxon::OIDNFilterParameter::SRGB: True if the color data is in sRGB.
- maxon::OIDNFilterParameter::ALBEDO: Albedo buffer.
- maxon::OIDNFilterParameter::NORMAL: Normal buffer.
Example
{
for (
Int32 y = 0; y < height; ++y)
{
{
bitmap->GetPixel(
x, y, &r, &
g, &b);
bufferColor[
pos] = color;
}
}
}
maxon::FilterContextRef filterContext = maxon::FilterContextClasses::OIDNCONTEXT().Create()
iferr_return;
maxon::FilterCommandQueueRef commandQueue = filterContext.CreateCommandQueue()
iferr_return;
maxon::FilterRef filter = filterContext.CreateFilter(maxon::FilterClasses::OIDNFILTERRT.GetId())
iferr_return;
maxon::DataDictionary imgDesc;
imgDesc.Set(maxon::FilterImageDescriptionParameters::HEIGHT,
static_cast<UInt32>(height))
iferr_return;
maxon::FilterImageRef beauty = filterContext.CreateImage(imgDesc)
iferr_return;
filterContext.ExecuteCommandQueue(commandQueue)
iferr_return;
Definition: basearray.h:412
ResultMem Resize(Int newCnt, COLLECTION_RESIZE_FLAGS resizeFlags=COLLECTION_RESIZE_FLAGS::DEFAULT)
Definition: basearray.h:1369
PyObject * x
Definition: bytesobject.h:38
void Py_ssize_t * pos
Definition: dictobject.h:50
Py_ssize_t char * output
Definition: unicodeobject.h:985
maxon::Float32 Float32
Definition: ge_sys_math.h:68
maxon::UInt16 UInt16
Definition: ge_sys_math.h:59
maxon::Int32 Int32
Definition: ge_sys_math.h:60
maxon::Int Int
Definition: ge_sys_math.h:64
maxon::UInt32 UInt32
Definition: ge_sys_math.h:61
#define MAXON_SCOPE
Definition: apibase.h:2818
const char const char grammar * g
Definition: parsetok.h:52
unsigned long Py_ssize_t width
Definition: pycore_traceback.h:88
#define iferr_return
Definition: resultbase.h:1465
A vector consisting of four components X, Y, Z and W.
Definition: vec4.h:21
Further Reading