26.01.2015 Views

The RenderMan Interface - Paul Bourke

The RenderMan Interface - Paul Bourke

The RenderMan Interface - Paul Bourke

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

RiFormat (RtInt xresolution, RtInt yresolution, RtFloat pixelaspectratio)<br />

Set the horizontal (xresolution) and vertical (yresolution) resolution (in pixels) of the<br />

image to be rendered. <strong>The</strong> upper left hand corner of the image has coordinates (0,0)<br />

and the lower right hand corner of the image has coordinates (xresolution, yresolution).<br />

If the resolution is greater than the maximum resolution of the device, the<br />

desired image is clipped to the device boundaries (rather than being shrunk to fit<br />

inside the device). This command also sets the pixel aspect ratio. <strong>The</strong> pixel aspect<br />

ratio is the ratio of the physical width to the height of a single pixel. <strong>The</strong> pixel aspect<br />

ratio should normally be set to 1 unless a picture is being computed specifically for a<br />

display device with non-square pixels.<br />

Implicit in this command is the creation of a display viewport with a<br />

viewportaspectratio =<br />

xresolution · pixelaspectratio<br />

yresolution<br />

<strong>The</strong> viewport aspect ratio is the ratio of the physical width to the height of the entire<br />

image.<br />

An image of the desired aspect ratio can be specified in a device independent way using<br />

the procedure RiFrameAspectRatio described below. <strong>The</strong> RiFormat command<br />

should only be used when an image of a specified resolution is needed or an image<br />

file is being created.<br />

If this command is not given, the resolution defaults to that of the display device<br />

being used (see the Displays section, p. 27). Also, if xresolution, yresolution or pixelaspectratio<br />

is specified as a nonpositive value, the resolution defaults to that of the<br />

display device for that particular parameter.<br />

RIB BINDING<br />

Format xresolution yresolution pixelaspectratio<br />

EXAMPLE<br />

Format 512 512 1<br />

SEE ALSO<br />

RiDisplay, RiFrameAspectRatio<br />

RiFrameAspectRatio ( RtFloat frameaspectratio )<br />

frameaspectratio is the ratio of the width to the height of the desired image. <strong>The</strong><br />

picture produced is adjusted in size so that it fits into the display area specified with<br />

RiDisplay or RiFormat with the specified frame aspect ratio and is such that the<br />

upper left corner is aligned with the upper left corner of the display.<br />

If this procedure is not called, the frame aspect ratio defaults to that determined from<br />

the resolution and pixel aspect ratio.<br />

RIB BINDING<br />

FrameAspectRatio frameaspectratio<br />

23

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!