VWRAYS(1)                                                            VWRAYS(1)



NNAAMMEE
       vwrays - compute rays for a given picture or view

SSYYNNOOPPSSIISS
       vvwwrraayyss [[ --ii --ff{{aa||ff||dd}} || --dd ]] { vviieeww ooppttss ....  | ppiiccttuurree [[zzbbuuff]] }

DDEESSCCRRIIPPTTIIOONN
       _V_w_r_a_y_s  takes a picture or view specification and computes the ray ori-
       gin and direction corresponding to  each  pixel  in  the  image.   This
       information  may  then be passed to _r_t_r_a_c_e_(_1_) to perform other calcula-
       tions.  If a given pixel has no corresponding ray (because it  is  out-
       side the legal view boundaries), then six zero values are sent instead.

       The _-_i option may be used to specify desired  pixel  positions  on  the
       standard  input rather than generating all the pixels for a given view.

       The _-_f option may be used to set the record format to  something  other
       than  the default ASCII.  Using raw float or double records for example
       can reduce the  time  requirements  of  transferring  and  interpreting
       information in _r_t_r_a_c_e_.

       View  options  may  be  any  combination  of  standard  view parameters
       described in the _r_p_i_c_t_(_1_) manual page, including input from a view file
       with  the  _-_v_f option.  Additionally, the target X and Y dimensions may
       be specified with _-_x and _-_y options, and the pixel aspect ratio may  be
       given  with  _-_p_a_.   The  default  dimensions  are 512x512, with a pixel
       aspect ratio of 1.0.  Just as in _r_p_i_c_t_, the X or the Y  dimension  will
       be reduced if necessary to best match the specified pixel aspect ratio,
       unless this ratio is set to zero.  The _-_p_j option may be used to jitter
       samples.  The default value of 0 turns off ray jittering.

       If  the  _-_d option is given, then _v_w_r_a_y_s just prints the computed image
       dimensions, which are based on the view aspect  and  the  pixel  aspect
       ratio  just  described.  The _-_l_d switch will also be printed, with _-_l_d_+
       if the view file has an aft clipping plane, and _-_l_d_-  otherwise.   This
       is useful for passing options to the _r_t_r_a_c_e command line.  (See below.)

       If the view contains an aft clipping plane _(_-_v_a option), then the  mag-
       nitudes  of the ray directions will equal the maximum distance for each
       pixel, which will be interpreted correctly  by  _r_t_r_a_c_e  with  the  _-_l_d_+
       option.   Note  that this option should not be given unless there is an
       aft clipping plane, since the ray direction vectors will be  normalized
       otherwise, which would produce a uniform clipping distance of 1.

       If  a  picture  is  given on the command line rather than a set of view
       options, then the view and image dimensions are taken from the  picture
       file,  and  the  reported ray origins and directions will exactly match
       the center of each pixel in the picture.

       If a depth buffer file is given  as  well,  then  _v_w_r_a_y_s  computes  the
       intersection  point of each pixel ray (equal to the ray origin plus the
       depth times the ray direction), and reports this  instead  of  the  ray
       origin.   The reported ray direction will also be reversed.  The inter-
       pretation of this data is an image of origins and directions for  light
       rays leaving the scene surfaces to strike each pixel.

EEXXAAMMPPLLEESS
       To  compute  the ray intersection points and returned directions corre-
       sponding to a picture and its depth buffer:

         vwrays scene_v2.hdr scene_v2.zbf > scene_v2.pts

       To determine what the dimensions of a given view would be:

         vwrays -d -vf myview.vf -x 2048 -y 2048

       To generate a RADIANCE picture using _r_t_r_a_c_e instead of _r_p_i_c_t_:

         vwrays -ff -vf view1.vf -x 1024 -y  1024  |  rtrace  `vwrays  -d  -vf
         view1.vf -x 1024 -y 1024` -ffc scene.oct > view1.hdr

AAUUTTHHOORR
       Greg Ward Larson

AACCKKNNOOWWLLEEDDGGMMEENNTT
       This work was supported by Silicon Graphics, Inc.

BBUUGGSS
       Although  _v_w_r_a_y_s can reproduce any pixel ordering (i.e., any image ori-
       entation) when given a rendered picture, it will only produce  standard
       scanline-ordered rays when given a set of view parameters.

SSEEEE AALLSSOO
       rcalc(1), rpict(1), rtcontrib(1), rtrace(1)



RADIANCE                            1/15/99                          VWRAYS(1)
