Element type: | miSCENE_CAMERA |
Data type: | miCamera |
Sizes: | - |
Defaults: | as described below |
typedef struct miCamera { miBoolean orthographic; /* orthographic rendering? */ float focal; /* focal length */ float aperture; /* aperture */ float aspect; /* aspect ratio of the image */ miRange clip; /* min/max clipping */ int x_resolution; /* x resolution */ int y_resolution; /* y resolution */ struct {int xl, yl, xh, yh;} window; /* corners of subwindow */ miTag volume; /* opt. volume shader */ miTag environment; /* opt. environment shader */ miTag lens; /* opt. lens shader */ miTag output; /* opt. output shaders/files */ int frame; /* current frame number */ float frame_time; /* ... as time in seconds */ int frame_field; /* 0=frame, 1/2=field number */ float x_offset; /* x image offset in pixels */ float y_offset; /* y image offset in pixels */ miTag userdata; /* optional user data blocks */ miTag pass; /* opt. pass function chain */ float focus; /* not used */ float radius; /* not used */ miBoolean pass_mask; /* not used */ int spare[11]; /* not used */ } miCamera;
A translator must provide: nothing.
A translator may provide: all fields.
orthographic (default miFALSE) switches the camera from the standard pinhole camera to an orthographic camera.
focal (default 1.0) is the focal length of the camera (the distance between the camera and the viewing plane).
aperture (default 1.0) is the width of the viewing plane in 3D space.
aspect (default 1.0) is the height of a pixel 1 unit wide.
clip (default 0.001, 1000000.0) describes the minimum (hither) and maximum (yon) limits of the scene for scanline rendering. Geometry outside these limits will not be rendered.
x_resolution (default 768) is the width of the rendered image in pixels.
y_resolution (default 576) is the height of the rendered image in pixels.
window (default 0, 0, 65535, 65535) describes the lower left and upper right corners of the rendered subwindow. Pixels outside this window will be black. If the upper right pixel exceeds the resolution, it is clipped to the resolution.
volume (default miNULLTAG) is the optional atmosphere volume shader.
environment (default miNULLTAG) is the optional view environment shader that is called for all (including primary) rays leaving the scene (the active environment shader for secondary rays may be overridden by materials).
lens (default miNULLTAG) is the optional first lens shader.
output (default miNULLTAG) is the optional first output shader or output file.
frame (default 0) is the frame number of the current render. It is not used by mental ray but is accessible to shaders.
frame_time (default 0.0) is the same as the frame number, but expressed in seconds. It is not used by mental ray.
frame_field (default 0) is the number after the field substatement in a frame statement. Since frame numbers are integers, the field number must be used to distinguish the first and second field of the frame, if field rendering is in effect. By convention, 0 means that the entire frame is rendered; 1 is the first (odd) and 2 is the second (even) field. It is not used by mental ray.
x_offset (default 0.0) is the x offset of the rendered image from the center of the camera axis in pixel units.
y_offset (default 0.0) is the y offset of the rendered image from the center of the camera axis in pixel units.
userdata allows attaching a user data block (miUserdata) or a chain of user data blocks. Shaders can retrieve the data with mi_query.
pass (default miNULLTAG) is the optional first pass statement for multipass rendering.
Copyright © 1986-2009 by mental images GmbH