| Element type: | miSCENE_OPTIONS |
| Data type: | miOptions |
| Sizes: | - |
| Defaults: | as described below |
The rendering options were designed to accommodate as wide a range of renderers as possible, from simple wireframe displayers to complex ray tracers. The interpretation of the structure members is left to the renderer. Generally, no renderer will require all provided fields; each renderer may use a different subset.
struct miOptions {
miBoolean trace; /* 2nd generation ray trace? */
int scanline; /* one of miRENDER_FH_* */
miUint motion; /* motion blur? : miFALSE */
miBoolean shadow_sort; /* Obsolete! Do not use */
miBoolean preview_mode; /* for future use */
int reflection_depth; /* refl. trace depth : 1 */
int refraction_depth; /* refr. trace depth : 1 */
int trace_depth; /* refl. + refr. depth : 1 */
int min_samples; /* min. sampling level : -2 */
int max_samples; /* max. sampling level : 0 */
miColor contrast; /* sampling contrast: .1 */
miColor time_contrast; /* temporal sampling contrast*/
miTag contour_contrast; /* NULLTAG */
miTag contour_store; /* NULLTAG */
miBoolean caustic; /* enable caustics: miFALSE */
miBoolean globillum; /* enable global il.: miFALSE*/
int caustic_accuracy; /* no. caus. photons in est. */
float caustic_radius; /* maxdist for caus. photons */
int globillum_accuracy; /* no. glob. photons in est. */
float globillum_radius; /* maxdist for glob. photons */
float caustic_filter_const; /* filter const. for caus. */
float filter_size_x; /* filter size in x : 1.0 */
float filter_size_y; /* filter size in y : 1.0 */
float jitter; /* sample jittering : 1.0 */
float shutter; /* shutter close time: 0 */
short grid_res[3]; /* grid resolution */
short grid_max_size; /* max obj. in grid cell */
short grid_max_depth; /* max grid nesting */
miSint1 def_min_samples; /* min/max samples for objs */
miSint1 def_max_samples; /* without min/max, -128 127 */
int space_max_size; /* space subdiv. leaf size: 4*/
int space_max_depth; /* space subdiv. depth : 25*/
float shutter_delay; /* shutter open time: 0 */
int no_images; /* # images : 1 */
miApprox approx; /* approximation overrides if*/
miApprox approx_displace; /* style != APPROX_STYLE_NONE*/
miUint spare1[19]; /* keep ray33 offsets */
miTag images_info; /* frame buffers */
miTag finalgather_file; /* finalgather map file: 0 */
miCBoolean space_shadow_separate; /* space subdiv shadow struct*/
miUchar finalgather_filter; /* finalgather ray filter */
char rast_collect_rate; /* rasterizer only: */
/* samples per pixel dim. */
char rast_motion_resample; /* rasterizer only: # of */
/* time samples for movng geo*/
char use_shadow_maps; /* 0=off, 1=on, 'o'=opengl*/
/* bit7: only shmap,no render*/
miCBoolean rendering_shadow_maps; /* Shadow map mode? 0 */
char recompute_shadow_maps; /* 'n'o,'y'es (could be Bool)*/
char shadow; /* shadow casting? : 1 */
/* 0 off, 1 on, 'l' sort, */
/* 's' segments */
char caustic_filter; /* filter-type */
/* 'b' box, 'c' cone, */
/* 'g' gaussian */
miCBoolean finalgather_rebuild; /* rebuild FG ?: on*/
char filter; /* sample filter type : 'b' */
/* 'b' box, 't' triangle, */
/* 'g' gauss */
char acceleration; /* one of miRENDER_ACCEL_* */
char face; /* primitive facing: 'a' */
/* 'f' front, 'b' back, */
/* 'a' all */
char field; /* field rendering? 0 */
/* 0 off, 'e' even, 'o' odd */
char smethod; /* sampling algorithm: 'q' */
char render_space; /* coordinate space 'o' */
/* 'c' camera space, */
/* 'o' object space, */
/* 'm' mixed space */
miCBoolean pixel_preview; /* pixel selective sampling */
miCBoolean task_preview; /* task selective sampling */
miCBoolean visible_lights; /* any visible area lights? */
miCBoolean shadow_map_motion; /* motion blurred shadowmaps?*/
int task_size; /* image task size : 0 */
miBoolean strips; /* GAP returns triangles in
* strips */
miTag photonmap_file; /* photon map file name */
miBoolean photonmap_rebuild; /* photon map rebuild ? */
int photon_reflection_depth;/* photon refl. depth */
int photon_refraction_depth;/* photon refr. depth */
int photon_trace_depth; /* total photon trace depth */
int space_max_mem; /* maximum bsp memory (mb):0 */
miColor caustic_scale; /* caustic multiplier */
miColor globillum_scale; /* globillum multiplier */
miColor finalgather_scale; /* finalgather multiplier */
miColor finalgather_sec_scale; /* secondary fg multiplier */
miUint spare4;
miColor photonvol_scale; /* photon volume multiplier */
miUint spare2[6]; /* keep ray33 offsets */
miTag spectrum_blueprint; /* spectrum for render space */
miTag input_cprof; /* input color space, default */
miTag white_cprof; /* white adapt. col. space */
miTag render_cprof; /* color profile render space*/
miTag fb_dir; /* frame buffer directory */
miCBoolean no_lens; /* disable lens shaders */
miCBoolean no_volume; /* disable volume shaders */
miCBoolean no_geometry; /* disable geometry shaders */
miCBoolean no_displace; /* disable displace shaders */
miUint1 no_output; /* disable output shaders */
miCBoolean no_merge; /* disable surface merging */
miUint1 caustic_flag; /* def. caustic flag for objs*/
miUint1 diagnostic_mode; /* miSCENE_DIAG_* flags */
int photonvol_accuracy; /* no. vol. photons in est. */
float photonvol_radius; /* maxdist for vol. photons */
miUint1 globillum_flag; /* def. globil. flag for objs*/
miCBoolean samplelock; /* steady samples?: on */
miCBoolean autovolume; /* internal volumes? */
miCBoolean finalgather_view; /* radii in raster pixels ? */
miCBoolean no_hair; /* disable hair rendering */
miUint1 n_motion_vectors; /* global number of motions */
miCBoolean no_pass; /* disable multipass render */
miCBoolean photon_autovolume; /* autovolume for photons */
miCBoolean no_predisplace; /* disable displ presampling */
miUint1 fg_reflection_depth; /* finalgather refl. depth */
miUint1 fg_refraction_depth; /* finalgather refr. depth */
miUint1 fg_trace_depth; /* total fg trace depth */
float fg_falloff_start; /* finalgather falloff start */
float fg_falloff_stop; /* finalgather falloff stop */
miTag userdata; /* optional user data blocks */
miBoolean irradiance_particles; /* irradiance particles on/off */
miUint4 spare5[23]; /* not used, but keep offsets */
int finalgather; /* 0:off,1:on,'f':fastlookup*/
int finalgather_rays; /* no. rays in final gather */
float finalgather_maxradius; /* maxdist for finalgather */
float finalgather_minradius; /* mindist for finalgather */
float diag_photon_density; /* density for diag */
float diag_grid_size; /* gridsize for diag */
miBoolean desaturate; /* for IMG: fade to white? */
miBoolean dither; /* for IMG: LSB dithering? */
miBoolean nopremult; /* for IMG: A < RGB ok? */
int colorclip; /* for IMG: miIMG_COLORCLIP* */
float gamma; /* for IMG: gamma, default 1 */
miTag inh_funcdecl; /* inheritance function */
miColor luminance_weight; /* weights to calc intensity */
int spare0[2]; /* not used */
miCBoolean inh_is_traversal; /* inh_funcdecl is a traver- */
/* sal, not inheritance, shd */
miUint1 hardware; /* hwrender 0=off 1=on 3=all */
miUint1 hardware_diagnostic; /* flags for diagn. mode */
miUint1 shadowmap_flags; /* flag for shadowmaps */
float maxdisplace; /* override if !=0: default 0*/
miScalar shadowmap_bias; /* move shmap Z back by bias */
miUint1 hwshader; /* 1=force */
/* 2=cg 4=oglsl/hlsl 8=fast */
miCBoolean photonmap_only; /* render photon map only */
miUint1 lightmap; /* 0=off,1=on,2=only */
/* 4=use any host (unsafe) */
miUint1 fg_diffuse_depth; /* #secondary fg bounces */
miTag state_func; /* allow user to init state */
float fg_presamp_density; /* samples density for precomp.
* finalgather points */
float rast_shading_samples; /* shading samples per pixel */
/* default: 1.0f */
miUint1 fb_virtual; /* fb mem management */
/* 0=none 1=mapped 2=cached */
/* default: 1 */
miCBoolean spare3[3]; /* not used */
miTag string_options; /* arbitrary name-value options */
int spare[9]; /* not used */
};
A translator must provide: nothing.
A translator may provide: all fields.
miTRUE.
miRENDER_FH_OFFmiRENDER_FH_SCANLINEmiRENDER_FH_OPENGLmiRENDER_FH_RASTmiRENDER_FH_SCANLINE.
miFALSE.
2.
2.
4.
-2 (at least 1 sample per 16 pixels).
0 (at most 1 sample per 1 pixel).
0.1 0.1 0.1 0.1.
0.2 0.2 0.2 0.2.
miNULLTAG.
miNULLTAG.
miFALSE.
miFALSE.
100.
0.0 then an estimate based on the scene extent will be used.
0.0.
500.
0.0 then an estimate based on the scene extent will be used.
0.0.
1.1.
filter field.
1.0.
filter field.
1.0.
1.0.
0.0.
0 0 0.
128.
2.
min_samples option.
An object may set its local min_samples value to achieve custom
oversampling effects in the area of the image that it covers. See the related
samples object setting for further
explanation. Like the per object min/max samples parameters, the default value
should stay within the global sampling range specified in the options with
min_samples…max_samples to have an impact on oversampling.
A value of -128 turns per object control off; and the global
min_samples will be used as usual.
-128.
max_samples option on objects.
See the related def_min_samples for
details. A value of 127 turns per object control off; and the
global max_samples will be used as usual.
127.
10.
40.
shutter_delay to shutter.
This is useful for shifting the evaluation time to the center of the frame
by setting shutter_delay and shutter to the same
value, such as 0.5, and then doing bidirectional postprocessing motion blur.
0.0.
1.
miFb_info, which
is described below. Frame buffers may be accessed only in
output shaders.
typedef struct miFb_info {
miImg_type image_type; /* image types */
miUint4 write_image; /* bits: 0=sample image */
/* 1=write image */
miBoolean interp_image /* interpolate image? */
} miFb_info;
shader.hfor a list of valid
image types.
miIMG_TYPE_RGBA.
3.
miTRUE, miFALSE, ....
miNULLTAG then no finalgather map is loaded or
saved.
miNULLTAG.
miFALSE.
0 means off; values greater than 4
are not normally useful.
1.
0
an internal default will be used, which is 3 giving 9 samples
per pixel. Note, in contrast to adaptive sampling settings, the number of
samples is not given as power of 2.
0.
1.0.
0.
0.
miTRUEenables shadowmaps to be used for the light
sources which have shadowmaps specified. If set to 'o'
shadowmaps are computed using OpenGL. mental ray allows setting bit 7
independently to only render shadowmaps to files, if applicable, but
omit the main rendering stage (similar to -shadowmap only
on the command line of standalone mental ray). This flag applies to all
shadowmaps in the scene.
0 (off).
miTRUE by mental ray when shadowmaps are being
rendered. This option is internal to RC and only used to optimize the
rendering of shadowmaps.
miFALSE.
1) controls shadow casting. It
is one of 0 (no shadows), 1 (normal shadows),
's' (shadow segments with separate volume shaders), and
'l' (shadow intersections sorted from the light source
towards the illumination point).
'b') is one of 'b' (box filter),
't' (triangle filter), 'g' (Gaussian filter),
'm' (Mitchell filter), or 'l' (Lanczos filter).
'b') is one of
'b' (space subdivision, BSP), 'l' (large-scene
BSP), and 'g' (grid).
'a') enables backface culling, one
of 'f' (front-facing only), 'b' (back-facing
only), and 'a' (both). During rendering, mental ray 3.x
copies the face flag to the shader state to make it controllable by
shaders.
photonmap_rebuild set to false.
photonmap_rebuild set to false.
finalgather_rebuild set to false, saving the
finalgather preprocessing step.
finalgather_rebuild set to false, saving the
finalgather preprocessing step.
miTRUEdisables all lens shaders.
The default is miFALSE.
miTRUEdisables all volume shaders.
The default is miFALSE.
miTRUEdisables all geometry shaders.
The default is miFALSE.
miTRUEdisables all displacement shaders.
The default is miFALSE.
miTRUEdisables all edge merging and adjacency detection.
The default is miFALSE.
3, making all objects caustic generators and caustic receivers.
miSCENE_DIAG_SAMPLES which, when set, turns on
sample view mode. The default value is zero for all bits.
miTRUE) uses the same
sampling sequences for every frame, causing sampling noise to
remain unchanged in unchanged parts of the scene. If set to
miFALSE, the sequences are initialized with the
frame number to cause moving
noise.
miFALSE enables automatic
volume tracking by mental ray. This allows managing overlapping
volumes and a camera that is inside one or more volumes, to always
call the correct volume shaders.
miFALSE) switches the
final gather radius parameters from world space to projected
raster space.
motion steps.
miAPPROX_STYLE_NONE. This style
is the default, and all other fields are 0. Use the
miAPPROX_DEFAULT macro to activate this approximation. See
the miApprox data structure description above.
miIMG_COLORCLIP_RGB (preserve RGB and adjust alpha),
miIMG_COLORCLIP_ALPHA (preserve alpha and adjust RGB), or
miIMG_COLORCLIP_RAW (disable color clipping).
miHW_DEFAULT: use the best shading mode.miHW_FORCE: force hardware rendering even if the
following modes fail. Never fall back on software. This may result
in gray default surfaces.miHW_CG: try programmable Cg shaders.miHW_NATIVE: try OpenGL Shading Language. (This is
currently not well-supported, added in future releases when the
OpenGL standard is finalized.)miHW_FAST: try non-programmable OpenGL, which can
handle only very simple vertex shading models.0 (off), 1 (on), and 2
(only). By default, lightmaps are enabled. If this option is set to
2 only the lightmaps and not the camera images are rendered.
1.0). Only has an effect for
scanline = miRENDER_FH_RAST.
0), or
memory-mapped to disk in single potentially large chunks (1),
or cached to disk in pieces (2). The default is 1,
which allows an arbitrary number of frame buffers or arbitrary resolution
without filling up physical memory on 64bit systems. On 32bit systems with
limited memory address space mode 2 may be more appropriate.
For certain applications such as fast preview rendering it may be desirable
to keep the framebuffer in main memory by setting this flag to 0.
Copyright © 1986-2009 by mental images GmbH