Exporting render options
Almost all the render parameters can be passed to the render as command line options as well. It is mandatory that the plug-in provides a command line text field to let the user add additional render options. In this way, it is not needed to update the plug-in each time a new parameter is added, and in addition other useful flags can be passed to the render.
Paths
Paths are specified through the setPath() function:
void Cmaxwell::setPath( const char* type, // path type const char* path, // path name byte& outputBitDepth // Bit depth per plane (
- outputBitDepth specifies the bits depth per plane (8,16,32). This parameter is passed by reference so if the current format does not support the given depth, the SDK tries to change it automatically.
- type must be one of the following values: "RENDER", "ALPHA", "SHADOW", "OBJECT", "MATERIAL", "MOTION", "Z", "ROUGHNESS", "FRESNEL".
Example:
byte depth = 32; byte ok; ok = setPath ("RENDER", "C:\\maxwell\\house.exr", 32); //Correct, EXR format supports 32 bbp. ok = setPath ("RENDER", "C:\\maxwell\\house.jpg", 16); //Incorrect, JPG does support 16 bbp so it will be changed to 8 bpp internally.
Additional paths used for searching textures and other dependencies can be specified through:
byte addSearchingPath( const char *pPath );
Render parameters
Global settings of Maxwell Render are set using the function:
byte Cmaxwell::setRenderParameter( const char* parameterName, // parameter name dword size, // parameter size void* parameterData // parameter data );
Parameters description
Paths
Name |
Type |
Default |
Description |
---|---|---|---|
MXI FULLNAME |
char |
 |
Path of the MXI output file |
"DO NOT SAVE MXI FILE" |
byte |
0 |
0: Save the MXI file 1: Do not save MXI file |
"DO NOT SAVE IMAGE FILE" |
byte |
0 |
0: Save the image file 1: Do not save image file |
SAVE LIGHTS IN SEPARATE FILES |
byte |
0 |
0: Save all the lights embedded it the same 1: Embed all in the same file if the format supports it |
Render parameters
Name |
Type |
Default |
Description |
---|---|---|---|
STOP TIME |
dword |
120 |
Maximum render time in minutes |
SAMPLING LEVEL |
float |
25 |
Maximum sampling level |
NUM THREADS |
dword |
0 |
0:(Automatic) Number of threads |
ID CPU |
dword |
 |
Seed used in the render |
USE MULTILIGHT |
byte |
0Â |
Enable MultiLight |
DO MOTION BLUR |
byte |
1 |
Motion blur on/off |
DO DISPLACEMENT |
byte |
1 |
Displacement on/off |
DO DISPERSION |
byte |
1 |
Dispersion on/off |
Simulens
Name |
Type |
Default |
Description |
---|---|---|---|
DO VIGNETTING |
byte |
1 |
Vignetting on/off |
VIGNETTING |
real |
1 |
Vignetting value |
DO SCATTERING LENS |
byte |
1 |
Scattering on/off |
SCATTERING LENS |
real |
1 |
Scattering value |
Channels
Name |
Type |
Default |
Description |
---|---|---|---|
DO IDOBJECT CHANNEL |
byte |
0 |
Do Object ID channel |
DO IDMATERIAL CHANNEL |
byte |
0 |
Do Material ID channel |
DO SHADOW PASS CHANNEL |
byte |
0 |
Do Shadow pass channel |
DO RENDER CHANNEL |
byte |
1 |
Do render channel |
DO ALPHA CHANNEL |
byte |
0 |
Do alpha channel |
OPAQUE ALPHA |
byte |
0 |
Do alpha opaque |
DO MOTION CHANNEL |
byte |
0 |
Do motion channel |
DO ROUGHNESS CHANNEL |
byte |
0 |
Do roughness channel |
DO FRESNEL CHANNEL |
byte |
0 |
Do fresnel channel |
DO ZBUFFER CHANNEL |
byte |
0 |
Do Zbuffer channel |
ZBUFFER RANGE |
2*real / -a, +b |
 |
Set the zbuffer range using two values (a) and (b) which are negative and positive distances (-a, +b) from a reference location centered on the focalpoints. |
EMBED CHANNELS |
byte |
0 |
Save channels in separate files. 1: Embed them in the same image if the format supports it |
Layers
Name |
Type |
Default |
Description |
---|---|---|---|
DO DIRECT LAYER |
byte |
1 |
Calculate direct layer |
DO INDIRECT LAYER |
byte |
1 |
Calculate indirect layer |
DO DIRECT REFLECTION CAUSTIC LAYER |
byte |
1 |
Calculate direct reflection caustic layer |
DO DIRECT REFRACTION CAUSTIC LAYER |
byte |
1 |
Calculate direct refraction caustic layer |
DO INDIRECT REFLECTION CAUSTIC LAYER |
byte |
1 |
Calculate indirect reflection caustic layer |
DO INDIRECT REFRACTION CAUSTIC LAYER |
byte |
1 |
Calculate indirect refraction caustic layer |
Tonemapping
Tonemapping used for converting from 32 bits high dynamic range to depths displayable by screen devices (typically 8 bits) is set through the function:
byte Cmaxwell::setToneMapping( real monitorGamma, // monitor gamma (2.2) real burn // burn (0.5) );