On this page |
In the Karma rendering pipeline, there are three separate types of filters.
-
Sample filters
-
Pixel filters
-
Image filters
Each filter works on AOV data at different stages of the rendering pipeline. Sample filters access raw sample data straight from ray evaluation. These filters run independent of any other samples.
Pixel filters combine multiple samples into a single pixel value.
Image filters process the entire image, after all the pixels have been resolved.
You can get a list of all filters using the command line tool by running:
karma --filters
At the current time, this doesn’t list any options to control filters.
Sample and Image filters are “global” and run on all AOVs simultaneously. For example, a sample filter might take multiple AOVs for different color components and sum them into a different AOV. An image filter might take several AOVs and use them to run a denoiser on other AOVs. There can be multiple Sample and Image filters for each render.
On the other hand, Pixel Filters are defined on each AOV individually. Thus, a color AOV might have a Pixel Filter that averages samples together, while an AOV for surface normals might take a single sample. Each AOV only has a single Pixel Filter defined.
Sample and Image filters are specified using a JSON string. Each filter is specified by a JSON list of 2 elements. The first element specifies the name of the filter, the second argument is a dictionary of arguments to control the filter’s behaviour.
Image Filters ¶
ocio
Key |
Type |
Description |
---|---|---|
|
string |
Required The list of AOVs to be processed by OCIO. |
|
string |
Required Output color space name. |
|
string |
Source color space name. The default is |
|
string |
A comma separated list of color grading names. |
Example: [ "ocio", {"planes":"C,diff*,spec*", "output":"sRGB"} ]
denoise
Key |
Type |
Description |
---|---|---|
|
string |
The denoiser to apply (for example “oidn” or “optix”). |
|
list of strings |
List of AOV names to de-noise. Default is |
|
boolean |
Whether to pass the |
|
boolean |
Whether to pass the |
|
boolean |
Whether to output directly to OpenGL. |
Example: [ "denoise", {"engine":"optix", "use_n_input":true, "use_albedo_input":true ]
Sample Filters ¶
colorlimit
Key |
Type |
Description |
---|---|---|
|
string |
Comma separated list of AOV names/patterns to color limit. |
|
float |
The maximum channel value allowed. |
Example: [ "colorlimit", {"planes":"C*,color*,diff*", "colorlimit":10.0} ]
copyalpha
Key |
Type |
Description |
---|---|---|
|
string |
Comma separated list of AOV names/patterns to use as input. |
This is added automatically by the renderer to copy the Af
render global to the fourth component of any AOVs defined by LPE.
ocio
This sample filter is primarily an example since it’s much more efficient to do color correction in the image filter (after samples have been combined by pixel filters).
Key |
Type |
Description |
---|---|---|
|
string |
Required Comma separated list of AOV names/patterns to process with OCIO. |
|
string |
Required Output color space name. |
|
string |
Source color space name. The default is |
|
string |
Comma-separated list of color grading names. |
Example: [ "ocio", {"planes":"C,diff*,spec*", "output":"sRGB"} ]
Tip
You can chain multiple image filters (or sample filters):
[ [ "denoise", {"engine":"oidn", "aovs":["Cf","diffuse","specular"]} ], [ "ocio", { "planes":"C,diff*", "output", "sRGB" }] ]
Pixel Filters ¶
Radial Pixel Filter
Names: bartlett
, blackman
, box
, catrom
, gauss
, hanning
, mitchell
, sinc
.
These pixel filters are radial filters which combine samples using the given filter shapes.
Key |
Type |
Description |
---|---|---|
|
float |
Filter width. |
Example: [ "gauss", {"width":2.5} ]
Unit Box Filter (ubox
)
Uniform box filter. This simply averages all the samples which fall within a pixel. This is different than the box filter which blends in samples from adjacent pixels (based on the filter width).
Min Max filters (min
, max
)
Take only the sample with the minimum or maximum value.
omin
, omax
Currently, these are synonyms for the min, max filters.
ocover
, edge
, idcover
Currently, these are not implemented
Pixel Oracles ¶
Pixel Oracles are related to filters in karma. Oracles are used to tell the renderer where additional samples need to be sent. Unlike filters, Oracles take a simple string which is parsed into arguments.
Currently, there are two oracles:
uniform
Uniformly distribute rays to each pixel. Each pixel will always get the same number of ray-samples.
variance
Distribute rays based on variance in the rendered image.
Key |
Type |
Description |
---|---|---|
|
integer |
The minimum number of samples. Set to '-1' to make it automatic based on maximum primary sample count. |
|
float |
The pixel variance. |
|
string |
The image plane to measure. |
|
integer |
How to apply OCIO transform when measuring variance. Set to |
|
string |
OCIO display (ignored unless |
|
string |
OCIO view (ignored unless |
|
string |
OCIO color space (ignored unless |
Example: [ "variance", {"minrays":2, "plane":"C", "variance":0.01} ]