ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/doc/man/man1/rtcontrib.1
Revision: 1.8
Committed: Thu Jun 9 17:27:27 2005 UTC (18 years, 11 months ago) by greg
Branch: MAIN
Changes since 1.7: +6 -2 lines
Log Message:
Implementaed rtcontrib -r (recover) option, added MODIFIER= + BIN= to header

File Contents

# User Rev Content
1 greg 1.8 .\" RCSid "$Id: rtcontrib.1,v 1.7 2005/06/02 04:47:26 greg Exp $"
2 greg 1.3 .TH RTCONTRIB 1 5/25/05 RADIANCE
3 greg 1.1 .SH NAME
4 greg 1.5 rtcontrib - compute contribution coefficients in a RADIANCE scene
5 greg 1.1 .SH SYNOPSIS
6     .B rtcontrib
7     [
8     .B "\-n nprocs"
9     ][
10 greg 1.8 .B \-r
11     ][
12 greg 1.1 .B "\-e expr"
13     ][
14     .B "\-f source"
15     ][
16 greg 1.7 .B "\-o ospec"
17 greg 1.1 ][
18     .B "\-b binv"
19     ]
20 greg 1.2 .B "\-m mod .."
21 greg 1.1 [
22     .B $EVAR
23     ]
24     [
25     .B @file
26     ]
27     [
28     rtrace options
29     ]
30     .B octree
31 greg 1.4 .br
32     .B "rtcontrib [ options ] \-defaults"
33 greg 1.1 .SH DESCRIPTION
34     .I Rtcontrib
35     computes ray contributions (i.e., color coefficients)
36     for objects whose modifiers are named in one or more
37     .I \-m
38     settings.
39 greg 1.2 These modifiers are usually materials associated with
40     light sources or sky domes, and must directly modify some geometric
41     primitives to be considered in the output.
42 greg 1.3 The output of
43     .I rtcontrib
44     has many potential uses.
45     Source contributions can be used as components in linear combination to
46 greg 1.1 reproduce any desired variation, e.g., simulating lighting controls or
47     changing sky conditions via daylight coefficients.
48     More generally,
49     .I rtcontrib
50 greg 1.3 can be used to compute arbitrary input-output relationships in optical
51     systems, such as luminaires, light pipes, and shading devices.
52 greg 1.1 .PP
53 greg 1.2 .I Rtcontrib
54     calls
55     .I rtrace(1)
56 greg 1.5 with the -oTW option to calculate the daughter ray
57     contributions for each input ray, and the output tallies
58 greg 1.7 are sent to one or more destinations according to the given
59 greg 1.1 .I \-o
60     specification.
61 greg 1.7 If a destination begins with an exclamation mark ('!'), then
62     a pipe is opened to a command and data is sent to its standard input.
63     Otherwise, the destination is treated as a file.
64 greg 1.8 An existing file of the same name is clobbered, unless the
65     .I \-r
66     option is specified, in which case data recovery is attempted.
67 greg 1.2 If an output specification contains a "%s" format, this will be
68 greg 1.1 replaced by the modifier name.
69     The
70     .I \-b
71     option may be used to further define
72 greg 1.2 a "bin number" within each object if finer resolution is needed, and
73     this will be applied to a "%d" format in the output file
74 greg 1.1 specification if present.
75 greg 1.3 The actual bin number is computed at run time based on ray direction
76     and surface intersection, as described below.
77 greg 1.1 The most recent
78     .I \-b
79     and
80     .I \-o
81 greg 1.2 options to the left of each
82 greg 1.1 .I \-m
83 greg 1.2 setting affect only that modifier.
84     (The ordering of other options is unimportant.)\0
85 greg 1.1 .PP
86 greg 1.2 If a
87     .I \-b
88     expression is defined for a particular modifier,
89     the bin number will be evaluated at run time for each
90     ray contribution from
91     .I rtrace.
92     Specifically, each ray's world intersection point will be assigned to
93     the variables Px, Py, and Pz, and the normalized ray direction
94     will be assigned to Dx, Dy, and Dz.
95     These parameters may be combined with definitions given in
96     .I \-e
97 greg 1.3 arguments and files read using the
98 greg 1.2 .I \-f
99 greg 1.3 option.
100     The computed bin value will be
101 greg 1.2 rounded to the nearest whole number.
102     This mechanism allows the user to define precise regions or directions
103     they wish to accumulate, such as the Tregenza sky discretization,
104     which would be otherwise impossible to specify
105     as a set of RADIANCE primitives.
106 greg 1.3 The rules and predefined functions available for these expressions are
107     described in the
108     .I rcalc(1)
109     man page.
110 greg 1.6 Unlike
111     .I rcalc,
112     .I rtcontrib
113     will search the RADIANCE library directories for each file given in a
114     .I \-f
115     option.
116     (No search takes place if a file name begins with a '.', '/' or '~'
117     character.)\0
118 greg 1.1 .PP
119     If no
120     .I \-o
121     specification is given, results are written on the standard output in order
122     of modifier (as given on the command line) then bin number.
123 greg 1.7 Concatenated data is also sent to a single destination (i.e., an initial
124 greg 1.2 .I \-o
125     specification without formatting strings).
126 greg 1.1 If a "%s" format appears but no "%d" in the
127     .I \-o
128     specification, then each modifier will have its own output file, with
129     multiple values per record in the case of a non-zero
130     .I \-b
131     definition.
132     If a "%d" format appears but no "%s", then each bin will get its own
133     output file, with modifiers output in order in each record.
134     For text output, each RGB coefficient triple is separated by a tab,
135     with a newline at the end of each ray record.
136     For binary output formats, there is no such delimiter to mark
137     the end of each record.
138     .PP
139 greg 1.2 Input and output format defaults to plain text, where each ray's
140     origin and direction (6 real values) are given on input,
141     and one line is produced per output file per ray.
142     Alternative data representations may be specified by the
143     .I \-f[io]
144     option, which is described in the
145     .I rtrace
146     man page along with the associated
147     .I \-x
148     and
149     .I \-y
150     resolution settings.
151     In particular, the color ('c') output data representation
152     together with positive dimensions for
153     .I \-x
154     and
155     .I \-y
156     will produce an uncompressed RADIANCE picture,
157     suitable for manipulation with
158     .I pcomb(1)
159     and related tools.
160 greg 1.1 .PP
161     If the
162     .I \-n
163     option is specified with a value greater than 1, multiple
164 greg 1.2 .I rtrace
165 greg 1.1 processes will be used to accelerate computation on a shared
166     memory machine.
167     Note that there is no benefit to using more processes
168 greg 1.2 than there are local CPUs available to do the work, and the
169     .I rtcontrib
170     process itself may use a considerable amount of CPU time.
171 greg 1.1 .PP
172     Options may be given on the command line and/or read from the
173     environment and/or read from a file.
174     A command argument beginning with a dollar sign ('$') is immediately
175     replaced by the contents of the given environment variable.
176     A command argument beginning with an at sign ('@') is immediately
177     replaced by the contents of the given file.
178 greg 1.2 .SH EXAMPLES
179     To compute the proportional contributions from sources modified
180     by "light1" vs. "light2" on a set of illuminance values:
181 greg 1.1 .IP "" .2i
182 greg 1.2 rtcontrib -I+ @render.opt -o c_%s.dat -m light1 -m light2 scene.oct < test.dat
183     .PP
184     To generate a pair of images corresponding to these two lights'
185     contributions:
186 greg 1.1 .IP "" .2i
187 greg 1.2 vwrays -ff -x 1024 -y 1024 -vf best.vf |
188     rtcontrib -ffc `vwrays -d -x 1024 -y 1024 -vf best.vf`
189     @render.opt -o c_%s.pic -m light1 -m light2 scene.oct
190     .PP
191     These images may then be recombined using the desired outputs
192     of light1 and light2:
193 greg 1.1 .IP "" .2i
194 greg 1.2 pcomb -c 100 90 75 c_light1.pic -c 50 55 57 c_light2.pic > combined.pic
195 greg 1.1 .PP
196 greg 1.2 To compute an array of illuminance contributions according to a Tregenza sky:
197     .IP "" .2i
198     rtcontrib -b tbin -o sky.dat -m skyglow -b 0 -o ground.dat -m groundglow
199     @render.opt -f tregenza.cal scene.oct < test.dat
200 greg 1.6 .SH ENVIRONMENT
201     RAYPATH path to search for -f files
202 greg 1.1 .SH AUTHOR
203     Greg Ward
204     .SH "SEE ALSO"
205     cnt(1), getinfo(1), pcomb(1), pfilt(1), ra_rgbe(1),
206     rcalc(1), rpict(1), rtrace(1), vwrays(1), ximage(1)