ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/doc/man/man1/vwrays.1
Revision: 1.13
Committed: Sat Apr 9 17:18:08 2022 UTC (3 years ago) by greg
Branch: MAIN
CVS Tags: rad5R4, HEAD
Changes since 1.12: +2 -4 lines
Log Message:
fix(vwrays): No longer spits out -ld- with -d option, only -ld+

File Contents

# User Rev Content
1 greg 1.13 .\" RCSid "$Id: vwrays.1,v 1.12 2021/12/04 16:29:29 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 greg 1.12 and/or
51     .I \-pd
52     options should be used to jitter sample postions in most cases.
53 greg 1.9 .PP
54 greg 1.1 View options may be any combination of standard view parameters described
55     in the
56     .I rpict(1)
57     manual page, including input from a view file with the
58     .I \-vf
59     option.
60     Additionally, the target X and Y dimensions may be specified with
61 greg 1.4 .I \-x
62 greg 1.1 and
63 greg 1.4 .I \-y
64 greg 1.1 options, and the pixel aspect ratio may be given with
65 greg 1.4 .I \-pa.
66 greg 1.1 The default dimensions are 512x512, with a pixel aspect ratio of 1.0.
67     Just as in
68     .I rpict,
69     the X or the Y dimension will be reduced if necessary
70     to best match the specified pixel
71     aspect ratio, unless this ratio is set to zero.
72 greg 1.4 The
73     .I \-pj
74     option may be used to jitter samples.
75 greg 1.12 The
76     .I \-pd
77     option specifies a world-diameter aperture for depth-of-field jittering.
78     The default value of 0 for both options turns off all ray jittering.
79 greg 1.1 .PP
80     If the
81 greg 1.4 .I \-d
82 greg 1.1 option is given, then
83     .I vwrays
84     just prints the computed image dimensions, which are based on the view
85     aspect and the pixel aspect ratio just described.
86     The
87 greg 1.4 .I \-ld
88 greg 1.1 switch will also be printed, with
89 greg 1.4 .I \-ld+
90 greg 1.13 if the view has an aft clipping plane.
91 greg 1.1 This is useful for passing options to the
92     .I rtrace
93     command line.
94     (See below.)
95     .PP
96     If the view contains an aft clipping plane
97     .I (-va
98     option), then the magnitudes of the ray directions will
99     equal the maximum distance for each pixel, which will be interpreted
100     correctly by
101     .I rtrace
102     with the
103 greg 1.4 .I \-ld+
104 greg 1.1 option.
105     Note that this option should not be given unless there is an aft
106     clipping plane, since the ray direction vectors will be normalized
107     otherwise, which would produce a uniform clipping distance of 1.
108     .PP
109     If a picture is given on the command line rather than a set of view options,
110     then the view and image dimensions are taken from the picture file, and
111 greg 1.7 the reported ray origins and directions will match the center of each
112     pixel in the picture (plus optional jitter).
113 greg 1.1 .PP
114     If a depth buffer file is given as well, then
115     .I vwrays
116     computes the intersection point of each pixel ray (equal to the ray origin
117     plus the depth times the ray direction), and reports this instead of the
118     ray origin.
119     The reported ray direction will also be reversed.
120     The interpretation of this data is an image of origins and directions
121     for light rays leaving the scene surfaces to strike each pixel.
122     .SH EXAMPLES
123     To compute the ray intersection points and returned directions corresponding
124     to a picture and its depth buffer:
125     .IP "" .2i
126 greg 1.6 vwrays scene_v2.hdr scene_v2.zbf > scene_v2.pts
127 greg 1.1 .PP
128     To determine what the dimensions of a given view would be:
129     .IP "" .2i
130 greg 1.5 vwrays \-d \-vf myview.vf \-x 2048 \-y 2048
131 greg 1.1 .PP
132     To generate a RADIANCE picture using
133     .I rtrace
134     instead of
135     .I rpict:
136     .IP "" .2i
137 greg 1.5 vwrays \-ff \-vf view1.vf \-x 1024 \-y 1024 |
138 greg 1.6 rtrace `vwrays \-d \-vf view1.vf \-x 1024 \-y 1024` \-ffc scene.oct > view1.hdr
139 greg 1.1 .SH AUTHOR
140     Greg Ward Larson
141     .SH ACKNOWLEDGMENT
142     This work was supported by Silicon Graphics, Inc.
143     .SH BUGS
144     Although
145     .I vwrays
146     can reproduce any pixel ordering (i.e., any image orientation) when given
147     a rendered picture, it will only produce standard scanline-ordered rays when
148     given a set of view parameters.
149     .SH "SEE ALSO"
150 greg 1.11 rcalc(1), rcode_depth(1), rcontrib(1), rpict(1), rtpict(1), rtrace(1)