Mapping Camera Settings

This section shows how to map the XSI camera settings to the corresponding mental ray settings.

Projection plane on:

// Convert from inches to cm (Softimage units)
ppwidth = 2.54 * cam.projplanewidth
ppheight = 2.54 * cam.projplaneheight
ppoffsetx = 2.54 * cam.projplaneoffx
ppoffsety = 2.54 * cam.projplaneoffy

mr.aspect = cam.projplanewidth / cam.projplaneheight
mr.aperture = cam.focal * ( cam.projplanewidth / projplanedist )
mr.x_offset = ( render_res.x * ppoffsetx ) / ppwidth
mr.y_offset = ( render_res.y * ppoffsety ) / ppheight

Projection plane off:

mr.aspect = cam.aspect
mr.aperture = cam.aperture
mr.x_offset = mr.y_offset = 0

Orthographic off:

mr.orthographic = miFALSE
mr.focal = cam.focal

Orthographic on:

mr.orthographic = miTRUE
mr.focal = 1.0


SOFTIMAGE|XSI v6.01     

Return to Softimage XSI Index