1 |
.\" RCSid "$Id: vwrays.1,v 1.5 2007/09/04 17:36:41 greg Exp $" |
2 |
.TH VWRAYS 1 1/15/99 RADIANCE |
3 |
.SH NAME |
4 |
vwrays - compute rays for a given picture or view |
5 |
.SH SYNOPSIS |
6 |
.B vwrays |
7 |
.B "[ -i -f{a|f|d} | -d ]" |
8 |
{ |
9 |
.B "view opts .." |
10 |
| |
11 |
.B picture |
12 |
.B [zbuf] |
13 |
} |
14 |
.SH DESCRIPTION |
15 |
.I Vwrays |
16 |
takes a picture or view specification and computes the ray origin and |
17 |
direction corresponding to each pixel in the image. |
18 |
This information may then be passed to |
19 |
.I rtrace(1) |
20 |
to perform other calculations. |
21 |
If a given pixel has no corresponding ray (because it is outside the |
22 |
legal view boundaries), then six zero values are sent instead. |
23 |
.PP |
24 |
The |
25 |
.I \-i |
26 |
option may be used to specify desired pixel positions on the standard |
27 |
input rather than generating all the pixels for a given view. |
28 |
.PP |
29 |
The |
30 |
.I \-f |
31 |
option may be used to set the record format to something other than the |
32 |
default ASCII. |
33 |
Using raw float or double records for example can reduce the time |
34 |
requirements of transferring and interpreting information in |
35 |
.I rtrace. |
36 |
.PP |
37 |
View options may be any combination of standard view parameters described |
38 |
in the |
39 |
.I rpict(1) |
40 |
manual page, including input from a view file with the |
41 |
.I \-vf |
42 |
option. |
43 |
Additionally, the target X and Y dimensions may be specified with |
44 |
.I \-x |
45 |
and |
46 |
.I \-y |
47 |
options, and the pixel aspect ratio may be given with |
48 |
.I \-pa. |
49 |
The default dimensions are 512x512, with a pixel aspect ratio of 1.0. |
50 |
Just as in |
51 |
.I rpict, |
52 |
the X or the Y dimension will be reduced if necessary |
53 |
to best match the specified pixel |
54 |
aspect ratio, unless this ratio is set to zero. |
55 |
The |
56 |
.I \-pj |
57 |
option may be used to jitter samples. |
58 |
The default value of 0 turns off ray jittering. |
59 |
.PP |
60 |
If the |
61 |
.I \-d |
62 |
option is given, then |
63 |
.I vwrays |
64 |
just prints the computed image dimensions, which are based on the view |
65 |
aspect and the pixel aspect ratio just described. |
66 |
The |
67 |
.I \-ld |
68 |
switch will also be printed, with |
69 |
.I \-ld+ |
70 |
if the view file has an aft clipping plane, and |
71 |
.I \-ld- |
72 |
otherwise. |
73 |
This is useful for passing options to the |
74 |
.I rtrace |
75 |
command line. |
76 |
(See below.) |
77 |
.PP |
78 |
If the view contains an aft clipping plane |
79 |
.I (-va |
80 |
option), then the magnitudes of the ray directions will |
81 |
equal the maximum distance for each pixel, which will be interpreted |
82 |
correctly by |
83 |
.I rtrace |
84 |
with the |
85 |
.I \-ld+ |
86 |
option. |
87 |
Note that this option should not be given unless there is an aft |
88 |
clipping plane, since the ray direction vectors will be normalized |
89 |
otherwise, which would produce a uniform clipping distance of 1. |
90 |
.PP |
91 |
If a picture is given on the command line rather than a set of view options, |
92 |
then the view and image dimensions are taken from the picture file, and |
93 |
the reported ray origins and directions will exactly match the center of each |
94 |
pixel in the picture. |
95 |
.PP |
96 |
If a depth buffer file is given as well, then |
97 |
.I vwrays |
98 |
computes the intersection point of each pixel ray (equal to the ray origin |
99 |
plus the depth times the ray direction), and reports this instead of the |
100 |
ray origin. |
101 |
The reported ray direction will also be reversed. |
102 |
The interpretation of this data is an image of origins and directions |
103 |
for light rays leaving the scene surfaces to strike each pixel. |
104 |
.SH EXAMPLES |
105 |
To compute the ray intersection points and returned directions corresponding |
106 |
to a picture and its depth buffer: |
107 |
.IP "" .2i |
108 |
vwrays scene_v2.hdr scene_v2.zbf > scene_v2.pts |
109 |
.PP |
110 |
To determine what the dimensions of a given view would be: |
111 |
.IP "" .2i |
112 |
vwrays \-d \-vf myview.vf \-x 2048 \-y 2048 |
113 |
.PP |
114 |
To generate a RADIANCE picture using |
115 |
.I rtrace |
116 |
instead of |
117 |
.I rpict: |
118 |
.IP "" .2i |
119 |
vwrays \-ff \-vf view1.vf \-x 1024 \-y 1024 | |
120 |
rtrace `vwrays \-d \-vf view1.vf \-x 1024 \-y 1024` \-ffc scene.oct > view1.hdr |
121 |
.SH AUTHOR |
122 |
Greg Ward Larson |
123 |
.SH ACKNOWLEDGMENT |
124 |
This work was supported by Silicon Graphics, Inc. |
125 |
.SH BUGS |
126 |
Although |
127 |
.I vwrays |
128 |
can reproduce any pixel ordering (i.e., any image orientation) when given |
129 |
a rendered picture, it will only produce standard scanline-ordered rays when |
130 |
given a set of view parameters. |
131 |
.SH "SEE ALSO" |
132 |
rcalc(1), rpict(1), rtcontrib(1), rtrace(1) |