ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/doc/man/man1/rtcontrib.1
(Generate patch)

Comparing ray/doc/man/man1/rtcontrib.1 (file contents):
Revision 1.1 by greg, Thu May 26 06:55:22 2005 UTC vs.
Revision 1.17 by greg, Sat Nov 17 01:13:50 2007 UTC

# Line 1 | Line 1
1   .\" RCSid "$Id$"
2 < .TH RPIECE 1 5/25/05 RADIANCE
2 > .TH RTCONTRIB 1 5/25/05 RADIANCE
3   .SH NAME
4 < rtcontrib - compute contributions in a RADIANCE scene
4 > rtcontrib - compute contribution coefficients in a RADIANCE scene
5   .SH SYNOPSIS
6   .B rtcontrib
7   [
8   .B "\-n nprocs"
9   ][
10 + .B \-V
11 + ][
12 + .B \-c
13 + ][
14 + .B \-fo
15 + |
16 + .B \-r
17 + ][
18   .B "\-e expr"
19   ][
20   .B "\-f source"
21   ][
22 < .B "\-o fspec"
22 > .B "\-o ospec"
23   ][
24   .B "\-b binv"
25 + ][
26 + .B "\-bn nbins"
27   ]
28 + {
29 + .B "\-m mod | \-M file"
30 + }
31 + ..
32   [
33   .B $EVAR
34   ]
# Line 24 | Line 38 | rtcontrib - compute contributions in a RADIANCE scene
38   [
39   rtrace options
40   ]
27 .B "\-m mod .."
41   .B octree
42 + .br
43 + .B "rtcontrib [ options ] \-defaults"
44   .SH DESCRIPTION
45   .I Rtcontrib
46 < computes ray contributions (i.e., color coefficients)
46 > computes ray coefficients
47   for objects whose modifiers are named in one or more
48   .I \-m
49   settings.
50 < These modifiers are usually materials associated with specific
51 < light sources, though they could correspond to intermediate objects as well.
52 < The resulting contributions may then be used in linear combination to
50 > These modifiers are usually materials associated with
51 > light sources or sky domes, and must directly modify some geometric
52 > primitives to be considered in the output.
53 > A modifier list may also be read from a file using the
54 > .I \-M
55 > option.
56 > The RAYPATH environment variable determines directories to search for
57 > this file.
58 > (No search takes place if a file name begins with a '.', '/' or '~'
59 > character.)\0
60 > .PP
61 > By setting the boolean
62 > .I \-V
63 > option, you may instruct
64 > .I rtcontrib
65 > to report the contribution from each material rather than the ray
66 > coefficient.
67 > This is particularly useful for light sources with directional output
68 > distributions, whose value would otherwise be lost in the shuffle.
69 > With the default
70 > .I -V-
71 > setting, the output of rtcontrib is a coefficient that must be multiplied
72 > by the radiance of each material to arrive at a final contribution.
73 > This is more convenient for computing daylight coefficeints, or cases
74 > where the actual radiance is not desired.
75 > Use the
76 > .I -V+
77 > setting when you wish to simply sum together contributions
78 > (with possible adjustment factors) to obtain a final radiance value.
79 > Combined with the
80 > .I \-i
81 > or
82 > .I \-I
83 > option, irradiance contributions are reported by
84 > .I \-V+
85 > rather than radiance, and
86 > .I \-V-
87 > coefficients contain an additonal factor of PI.
88 > .PP
89 > The output of
90 > .I rtcontrib
91 > has many potential uses.
92 > Source contributions can be used as components in linear combination to
93   reproduce any desired variation, e.g., simulating lighting controls or
94   changing sky conditions via daylight coefficients.
95   More generally,
96   .I rtcontrib
97 < can compute general input-output relationships in optical
98 < systems, such as light pipes and shading devices.
97 > can be used to compute arbitrary input-output relationships in optical
98 > systems, such as luminaires, light pipes, and shading devices.
99   .PP
100 < .I Rtrace(1)
101 < is called to calculate the contributions for each input ray,
102 < and the output tallies are sent to one or more files according to the
100 > Setting the
101 > .I \-c
102 > option instructs
103 > .I rtcontrib
104 > to accumulate values rather than reporting one record per ray.
105 > With this option, only a single record will be produced at the very
106 > end, corresponding to the sum of all rays given on the input.
107 > This is equivalent to passing all the output records through a program like
108 > .I total(1)
109 > to sum RGB values together, but is much more efficient.
110 > Using this option, it is possible to reverse sampling, sending rays from
111 > a parallel source such as the sun to a diffuse surface, for example.
112 > Care must be taken to perform normalization based on the
113 > radiation density and the number of rays sampled.
114 > .PP
115 > .I Rtcontrib
116 > calls
117 > .I rtrace(1)
118 > with the \-oTW (or \-oTV) option to calculate the daughter ray
119 > contributions for each input ray, and the output tallies
120 > are sent to one or more destinations according to the given
121   .I \-o
122   specification.
123 < If the output file specification contains a "%s" format, this will be
123 > If a destination begins with an exclamation mark ('!'), then
124 > a pipe is opened to a command and data is sent to its standard input.
125 > Otherwise, the destination is treated as a file.
126 > An existing file of the same name will not be clobbered, unless the
127 > .I \-fo
128 > option is given.
129 > If instead the
130 > .I \-r
131 > option is specified, data recovery is attempted on existing files.
132 > (If
133 > .I \-c
134 > is used together with the
135 > .I \-r
136 > option, existing files are read in and new ray evaluations are added
137 > to the previous results, providing a convenient means for
138 > progressive simulation.)\0
139 > If an output specification contains a "%s" format, this will be
140   replaced by the modifier name.
141   The
142   .I \-b
143   option may be used to further define
144 < a "bin number" within each object if finer resolution is desired, and
145 < will be applied to a "%d" format in the output file
144 > a "bin number" within each object if finer resolution is needed, and
145 > this will be applied to a "%d" format in the output file
146   specification if present.
147 < (The actual bin number is computed at run time based on ray direction
148 < and surface intersection, as described below.)\0
147 > The actual bin number is computed at run time based on ray direction
148 > and surface intersection, as described below.
149 > If the number of bins is known in advance, it should be specified with the
150 > .I \-bn
151 > option, and this is critical for output files containing multiple values
152 > per record.
153 > Since bin numbers start from 0, the bin count is always equal to
154 > the last bin plus 1.
155 > Set the this value to 0 if the bin count is unknown (the default).
156   The most recent
157 < .I \-b
157 > .I \-b,
158 > .I \-bn
159   and
160   .I \-o
161 < options (to the left) of each
161 > options to the left of each
162   .I \-m
163 < setting affect only that modifier, and the ordering
164 < of other options is unimportant.
68 < .PP
69 < Input and output format defaults to plain text, where each ray's
70 < origin and direction (6 real values) must appear together per
71 < line of input, and one line of output is produced per output file
72 < file per ray.
73 < Alternative input and output formats may be specified using the
74 < .I \-f[io]
75 < option, which is explained in the
76 < .I rtrace
77 < man page along with the associated
163 > setting affect only that modifier.
164 > The ordering of other options is unimportant, except for
165   .I \-x
166   and
167   .I \-y
168 < resolution settings.
169 < In particular, the 'c' output setting
170 < together with positive dimensions for
171 < .I \-x
85 < and
86 < .I \-y
87 < will produce an uncompressed RADIANCE picture,
88 < suitable for manipulation with
89 < .I pcomb(1)
90 < and related tools.
168 > if the
169 > .I \-c
170 > is present, when they control the resolution string
171 > produced in the corresponding output.
172   .PP
173 + If a
174 + .I \-b
175 + expression is defined for a particular modifier,
176 + the bin number will be evaluated at run time for each
177 + ray contribution from
178 + .I rtrace.
179 + Specifically, each ray's world intersection point will be assigned to
180 + the variables Px, Py, and Pz, and the normalized ray direction
181 + will be assigned to Dx, Dy, and Dz.
182 + These parameters may be combined with definitions given in
183 + .I \-e
184 + arguments and files read using the
185 + .I \-f
186 + option.
187 + The computed bin value will be
188 + rounded to the nearest whole number.
189 + This mechanism allows the user to define precise regions or directions
190 + they wish to accumulate, such as the Tregenza sky discretization,
191 + which would be otherwise impossible to specify
192 + as a set of RADIANCE primitives.
193 + The rules and predefined functions available for these expressions are
194 + described in the
195 + .I rcalc(1)
196 + man page.
197 + Unlike
198 + .I rcalc,
199 + .I rtcontrib
200 + will search the RADIANCE library directories for each file given in a
201 + .I \-f
202 + option.
203 + .PP
204   If no
205   .I \-o
206   specification is given, results are written on the standard output in order
207   of modifier (as given on the command line) then bin number.
208 < The same format is used for a simple file name specification
209 < without any embedded "%s" or "%d" formats.
208 > Concatenated data is also sent to a single destination (i.e., an initial
209 > .I \-o
210 > specification without formatting strings).
211   If a "%s" format appears but no "%d" in the
212   .I \-o
213   specification, then each modifier will have its own output file, with
# Line 108 | Line 221 | with a newline at the end of each ray record.
221   For binary output formats, there is no such delimiter to mark
222   the end of each record.
223   .PP
224 < If a
225 < .I \-b
226 < expression is defined for a particular modifier,
227 < the bin number will be evaluated at run time for each
228 < ray contribution from
229 < .I rtrace.
230 < Specifically, each ray's world intersection point will be assigned to
231 < the variables Px, Py, and Pz, and the normalized ray direction
232 < will be assigned to Dx, Dy, and Dz.
233 < These ray parameters may be combined with any definitions given in
234 < .I \-e
235 < options, or any files read in from
236 < .I \-f
237 < options, to compute the bin, which will be
238 < rounded to the closest whole number.
239 < This mechanism allows the user to define precise regions (or directions)
240 < they wish to accumulate, such as the Tregenza sky grid, which would be
241 < otherwise impossible to specify as a set of RADIANCE primitives.
224 > Input and output format defaults to plain text, where each ray's
225 > origin and direction (6 real values) are given on input,
226 > and one line is produced per output file per ray.
227 > Alternative data representations may be specified by the
228 > .I \-f[io]
229 > option, which is described in the
230 > .I rtrace
231 > man page along with the associated
232 > .I \-x
233 > and
234 > .I \-y
235 > resolution settings.
236 > In particular, the color ('c') output data representation
237 > together with positive dimensions for
238 > .I \-x
239 > and
240 > .I \-y
241 > will produce an uncompressed RADIANCE picture,
242 > suitable for manipulation with
243 > .I pcomb(1)
244 > and related tools.
245   .PP
246   If the
247   .I \-n
248   option is specified with a value greater than 1, multiple
249 < .I rtrace(1)
249 > .I rtrace
250   processes will be used to accelerate computation on a shared
251   memory machine.
252   Note that there is no benefit to using more processes
253 < than there are local CPUs available to do the work.
253 > than there are local CPUs available to do the work, and the
254 > .I rtcontrib
255 > process itself may use a considerable amount of CPU time.
256   .PP
257   Options may be given on the command line and/or read from the
258   environment and/or read from a file.
# Line 142 | Line 260 | A command argument beginning with a dollar sign ('$')
260   replaced by the contents of the given environment variable.
261   A command argument beginning with an at sign ('@') is immediately
262   replaced by the contents of the given file.
263 < .SH EXAMPLE
264 < First
265 < .I rpiece
148 < process is started on the machine "goober":
263 > .SH EXAMPLES
264 > To compute the proportional contributions from sources modified
265 > by "light1" vs. "light2" on a set of illuminance values:
266   .IP "" .2i
267 < goober% echo 1 8 > syncfile
151 < .br
152 < goober% echo -F syncfile -x 1024 -y 1024 -vf view -o picture octree > args
153 < .br
154 < goober% rpiece @args &
267 > rtcontrib \-I+ @render.opt \-o c_%s.dat \-m light1 \-m light2 scene.oct < test.dat
268   .PP
269 < Second
270 < .I rpiece
158 < processes is started on the machine "sucker":
269 > To generate a pair of images corresponding to these two lights'
270 > contributions:
271   .IP "" .2i
272 < sucker% rpiece @args &
273 < .SH NOTES
274 < Due to NFS file buffering, the network lock manager is employed to
163 < guarantee consistency in the output file even though non-overlapping
164 < writes are used.
165 < This would tend to slow the process down if
166 < .I rpiece
167 < were to wait for this I/O to complete before starting on the next
168 < piece, so
169 < .I rpiece
170 < forks separate processes to hang around waiting for I/O completion.
171 < The number of processes thus designated is set by the MAXFORK macro
172 < in the program (compiled in the src/util directory).
173 < If the fork call is slow on a system, it may actually be better to
174 < set MAXFORK to zero.
175 < In other cases, the network lock manager may be so slow that this
176 < value should be increased to get the best utilization.
272 > vwrays \-ff \-x 1024 \-y 1024 \-vf best.vf |
273 > rtcontrib \-ffc `vwrays \-d \-x 1024 \-y 1024 \-vf best.vf`
274 > @render.opt \-o c_%s.pic \-m light1 \-m light2 scene.oct
275   .PP
276 < The output picture is not run-length encoded, and can be quite
277 < large.
180 < The approximate size (in kilobytes) can be computed by the simple
181 < formula:
276 > These images may then be recombined using the desired outputs
277 > of light1 and light2:
278   .IP "" .2i
279 < filesize = xres*yres/256
279 > pcomb \-c 100 90 75 c_light1.pic \-c 50 55 57 c_light2.pic > combined.pic
280   .PP
281 < Make sure that there is enough space on the filesystem to hold the
282 < entire picture before beginning.
283 < Once the picture is finished, the
284 < .I ra_rgbe(1)
285 < program with the -r option may be used to convert to a run-length
286 < encoded picture for more efficient storage, although
191 < .I pfilt(1)
192 < or any of the other Radiance picture filters will do the same
193 < thing.
194 < .PP
195 < The ALRM signal may be used to gracefully terminate an
196 < .I rpiece
197 < process after it finishes the current piece.
198 < This permits other currently running or subsequently started
199 < .I rpiece
200 < process(es) to continue rendering the picture without loss.
201 < The
202 < .I \-T
203 < option will send the ALRM signal to
204 < .I rpiece
205 < after the specified number of (decimal) hours.
206 < This is the best way to force a time limit on the computation,
207 < since information will not be lost, though the process may continue
208 < for some time afterwards to finish its current piece.
209 < .SH BUGS
210 < This program may not work on some systems whose NFS lock manager is
211 < unreliable.
212 < In particular, some System V derivative UNIX systems often have
213 < problems with the network lock manager.
214 < If the output is scrambled or rpict aborts with some ambient file
215 < related problem, you should just remove the ambient file and go
216 < back to normal rendering.
281 > To compute an array of illuminance contributions according to a Tregenza sky:
282 > .IP "" .2i
283 > rtcontrib \-I+ \-b tbin \-o sky.dat \-m skyglow \-b 0 \-o ground.dat \-m groundglow
284 > @render.opt \-f tregenza.cal scene.oct < test.dat
285 > .SH ENVIRONMENT
286 > RAYPATH         path to search for \-f and \-M files
287   .SH AUTHOR
288   Greg Ward
289   .SH "SEE ALSO"
290   cnt(1), getinfo(1), pcomb(1), pfilt(1), ra_rgbe(1),
291 < rcalc(1), rpict(1), rtrace(1), vwrays(1), ximage(1)
291 > rcalc(1), rpict(1), rtrace(1), total(1), vwrays(1), ximage(1)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines