1 |
greg |
1.10 |
.\" RCSid "$Id: vwrays.1,v 1.9 2012/06/14 05:19:05 greg Exp $" |
2 |
greg |
1.1 |
.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 |
greg |
1.9 |
.B "[ -i -u -f{a|f|d} -c rept | -d ]" |
8 |
greg |
1.1 |
{ |
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 |
greg |
1.4 |
.I \-i |
26 |
greg |
1.1 |
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 |
greg |
1.8 |
If the |
29 |
|
|
.I \-u |
30 |
|
|
option is also given, output will be unbuffered. |
31 |
greg |
1.1 |
.PP |
32 |
|
|
The |
33 |
greg |
1.4 |
.I \-f |
34 |
greg |
1.1 |
option may be used to set the record format to something other than the |
35 |
|
|
default ASCII. |
36 |
|
|
Using raw float or double records for example can reduce the time |
37 |
|
|
requirements of transferring and interpreting information in |
38 |
|
|
.I rtrace. |
39 |
|
|
.PP |
40 |
greg |
1.9 |
The |
41 |
|
|
.I \-c |
42 |
|
|
option repeats each pixel the given number of times (default is 1). |
43 |
|
|
This is most useful when sending rays to |
44 |
greg |
1.10 |
.I rcontrib(1) |
45 |
greg |
1.9 |
with the same |
46 |
|
|
.I \-c |
47 |
|
|
setting, providing a much faster way to average pixels over image sets. |
48 |
|
|
The |
49 |
|
|
.I \-pj |
50 |
|
|
option should be used to jitter sample postions in most cases. |
51 |
|
|
.PP |
52 |
greg |
1.1 |
View options may be any combination of standard view parameters described |
53 |
|
|
in the |
54 |
|
|
.I rpict(1) |
55 |
|
|
manual page, including input from a view file with the |
56 |
|
|
.I \-vf |
57 |
|
|
option. |
58 |
|
|
Additionally, the target X and Y dimensions may be specified with |
59 |
greg |
1.4 |
.I \-x |
60 |
greg |
1.1 |
and |
61 |
greg |
1.4 |
.I \-y |
62 |
greg |
1.1 |
options, and the pixel aspect ratio may be given with |
63 |
greg |
1.4 |
.I \-pa. |
64 |
greg |
1.1 |
The default dimensions are 512x512, with a pixel aspect ratio of 1.0. |
65 |
|
|
Just as in |
66 |
|
|
.I rpict, |
67 |
|
|
the X or the Y dimension will be reduced if necessary |
68 |
|
|
to best match the specified pixel |
69 |
|
|
aspect ratio, unless this ratio is set to zero. |
70 |
greg |
1.4 |
The |
71 |
|
|
.I \-pj |
72 |
|
|
option may be used to jitter samples. |
73 |
|
|
The default value of 0 turns off ray jittering. |
74 |
greg |
1.1 |
.PP |
75 |
|
|
If the |
76 |
greg |
1.4 |
.I \-d |
77 |
greg |
1.1 |
option is given, then |
78 |
|
|
.I vwrays |
79 |
|
|
just prints the computed image dimensions, which are based on the view |
80 |
|
|
aspect and the pixel aspect ratio just described. |
81 |
|
|
The |
82 |
greg |
1.4 |
.I \-ld |
83 |
greg |
1.1 |
switch will also be printed, with |
84 |
greg |
1.4 |
.I \-ld+ |
85 |
greg |
1.1 |
if the view file has an aft clipping plane, and |
86 |
greg |
1.4 |
.I \-ld- |
87 |
greg |
1.1 |
otherwise. |
88 |
|
|
This is useful for passing options to the |
89 |
|
|
.I rtrace |
90 |
|
|
command line. |
91 |
|
|
(See below.) |
92 |
|
|
.PP |
93 |
|
|
If the view contains an aft clipping plane |
94 |
|
|
.I (-va |
95 |
|
|
option), then the magnitudes of the ray directions will |
96 |
|
|
equal the maximum distance for each pixel, which will be interpreted |
97 |
|
|
correctly by |
98 |
|
|
.I rtrace |
99 |
|
|
with the |
100 |
greg |
1.4 |
.I \-ld+ |
101 |
greg |
1.1 |
option. |
102 |
|
|
Note that this option should not be given unless there is an aft |
103 |
|
|
clipping plane, since the ray direction vectors will be normalized |
104 |
|
|
otherwise, which would produce a uniform clipping distance of 1. |
105 |
|
|
.PP |
106 |
|
|
If a picture is given on the command line rather than a set of view options, |
107 |
|
|
then the view and image dimensions are taken from the picture file, and |
108 |
greg |
1.7 |
the reported ray origins and directions will match the center of each |
109 |
|
|
pixel in the picture (plus optional jitter). |
110 |
greg |
1.1 |
.PP |
111 |
|
|
If a depth buffer file is given as well, then |
112 |
|
|
.I vwrays |
113 |
|
|
computes the intersection point of each pixel ray (equal to the ray origin |
114 |
|
|
plus the depth times the ray direction), and reports this instead of the |
115 |
|
|
ray origin. |
116 |
|
|
The reported ray direction will also be reversed. |
117 |
|
|
The interpretation of this data is an image of origins and directions |
118 |
|
|
for light rays leaving the scene surfaces to strike each pixel. |
119 |
|
|
.SH EXAMPLES |
120 |
|
|
To compute the ray intersection points and returned directions corresponding |
121 |
|
|
to a picture and its depth buffer: |
122 |
|
|
.IP "" .2i |
123 |
greg |
1.6 |
vwrays scene_v2.hdr scene_v2.zbf > scene_v2.pts |
124 |
greg |
1.1 |
.PP |
125 |
|
|
To determine what the dimensions of a given view would be: |
126 |
|
|
.IP "" .2i |
127 |
greg |
1.5 |
vwrays \-d \-vf myview.vf \-x 2048 \-y 2048 |
128 |
greg |
1.1 |
.PP |
129 |
|
|
To generate a RADIANCE picture using |
130 |
|
|
.I rtrace |
131 |
|
|
instead of |
132 |
|
|
.I rpict: |
133 |
|
|
.IP "" .2i |
134 |
greg |
1.5 |
vwrays \-ff \-vf view1.vf \-x 1024 \-y 1024 | |
135 |
greg |
1.6 |
rtrace `vwrays \-d \-vf view1.vf \-x 1024 \-y 1024` \-ffc scene.oct > view1.hdr |
136 |
greg |
1.1 |
.SH AUTHOR |
137 |
|
|
Greg Ward Larson |
138 |
|
|
.SH ACKNOWLEDGMENT |
139 |
|
|
This work was supported by Silicon Graphics, Inc. |
140 |
|
|
.SH BUGS |
141 |
|
|
Although |
142 |
|
|
.I vwrays |
143 |
|
|
can reproduce any pixel ordering (i.e., any image orientation) when given |
144 |
|
|
a rendered picture, it will only produce standard scanline-ordered rays when |
145 |
|
|
given a set of view parameters. |
146 |
|
|
.SH "SEE ALSO" |
147 |
greg |
1.10 |
rcalc(1), rpict(1), rcontrib(1), rtrace(1) |