ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/Development/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.14 by greg, Tue Oct 11 16:54:26 2005 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 \-fo
11 + |
12 + .B \-r
13 + ][
14   .B "\-e expr"
15   ][
16   .B "\-f source"
17   ][
18 < .B "\-o fspec"
18 > .B "\-o ospec"
19   ][
20   .B "\-b binv"
21 + ][
22 + .B "\-bn nbins"
23   ]
24 + {
25 + .B "\-m mod | \-M file"
26 + }
27 + ..
28   [
29   .B $EVAR
30   ]
# Line 24 | Line 34 | rtcontrib - compute contributions in a RADIANCE scene
34   [
35   rtrace options
36   ]
27 .B "\-m mod .."
37   .B octree
38 + .br
39 + .B "rtcontrib [ options ] \-defaults"
40   .SH DESCRIPTION
41   .I Rtcontrib
42   computes ray contributions (i.e., color coefficients)
43   for objects whose modifiers are named in one or more
44   .I \-m
45   settings.
46 < These modifiers are usually materials associated with specific
47 < light sources, though they could correspond to intermediate objects as well.
48 < The resulting contributions may then be used in linear combination to
46 > These modifiers are usually materials associated with
47 > light sources or sky domes, and must directly modify some geometric
48 > primitives to be considered in the output.
49 > A modifier list may also be read from a file using the
50 > .I \-M
51 > option.
52 > The RAYPATH environment variable determines directories to search for
53 > this file.
54 > (No search takes place if a file name begins with a '.', '/' or '~'
55 > character.)\0
56 > .PP
57 > The output of
58 > .I rtcontrib
59 > has many potential uses.
60 > Source contributions can be used as components in linear combination to
61   reproduce any desired variation, e.g., simulating lighting controls or
62   changing sky conditions via daylight coefficients.
63   More generally,
64   .I rtcontrib
65 < can compute general input-output relationships in optical
66 < systems, such as light pipes and shading devices.
65 > can be used to compute arbitrary input-output relationships in optical
66 > systems, such as luminaires, light pipes, and shading devices.
67   .PP
68 < .I Rtrace(1)
69 < is called to calculate the contributions for each input ray,
70 < and the output tallies are sent to one or more files according to the
68 > .I Rtcontrib
69 > calls
70 > .I rtrace(1)
71 > with the -oTW option to calculate the daughter ray
72 > contributions for each input ray, and the output tallies
73 > are sent to one or more destinations according to the given
74   .I \-o
75   specification.
76 < If the output file specification contains a "%s" format, this will be
76 > If a destination begins with an exclamation mark ('!'), then
77 > a pipe is opened to a command and data is sent to its standard input.
78 > Otherwise, the destination is treated as a file.
79 > An existing file of the same name will not be clobbered, unless the
80 > .I \-fo
81 > option is given.
82 > If instead the
83 > .I \-r
84 > option is specified, data recovery is attempted on existing files.
85 > If an output specification contains a "%s" format, this will be
86   replaced by the modifier name.
87   The
88   .I \-b
89   option may be used to further define
90 < a "bin number" within each object if finer resolution is desired, and
91 < will be applied to a "%d" format in the output file
90 > a "bin number" within each object if finer resolution is needed, and
91 > this will be applied to a "%d" format in the output file
92   specification if present.
93 < (The actual bin number is computed at run time based on ray direction
94 < and surface intersection, as described below.)\0
93 > The actual bin number is computed at run time based on ray direction
94 > and surface intersection, as described below.
95 > If the number of bins is known in advance, it should be specified with the
96 > .I \-bn
97 > option, and this is critical for output files containing multiple values
98 > per record.
99 > Since bin numbers start from 0, the bin count is always equal to
100 > the last bin plus 1.
101 > Set the this value to 0 if the bin count is unknown (the default).
102   The most recent
103 < .I \-b
103 > .I \-b,
104 > .I \-bn
105   and
106   .I \-o
107 < options (to the left) of each
107 > options to the left of each
108   .I \-m
109 < setting affect only that modifier, and the ordering
110 < of other options is unimportant.
109 > setting affect only that modifier.
110 > (The ordering of other options is unimportant.)\0
111   .PP
112 < Input and output format defaults to plain text, where each ray's
113 < origin and direction (6 real values) must appear together per
114 < line of input, and one line of output is produced per output file
115 < file per ray.
116 < Alternative input and output formats may be specified using the
117 < .I \-f[io]
118 < option, which is explained in the
119 < .I rtrace
120 < man page along with the associated
121 < .I \-x
122 < and
123 < .I \-y
124 < resolution settings.
125 < In particular, the 'c' output setting
126 < together with positive dimensions for
127 < .I \-x
128 < and
129 < .I \-y
130 < will produce an uncompressed RADIANCE picture,
131 < suitable for manipulation with
132 < .I pcomb(1)
133 < and related tools.
112 > If a
113 > .I \-b
114 > expression is defined for a particular modifier,
115 > the bin number will be evaluated at run time for each
116 > ray contribution from
117 > .I rtrace.
118 > Specifically, each ray's world intersection point will be assigned to
119 > the variables Px, Py, and Pz, and the normalized ray direction
120 > will be assigned to Dx, Dy, and Dz.
121 > These parameters may be combined with definitions given in
122 > .I \-e
123 > arguments and files read using the
124 > .I \-f
125 > option.
126 > The computed bin value will be
127 > rounded to the nearest whole number.
128 > This mechanism allows the user to define precise regions or directions
129 > they wish to accumulate, such as the Tregenza sky discretization,
130 > which would be otherwise impossible to specify
131 > as a set of RADIANCE primitives.
132 > The rules and predefined functions available for these expressions are
133 > described in the
134 > .I rcalc(1)
135 > man page.
136 > Unlike
137 > .I rcalc,
138 > .I rtcontrib
139 > will search the RADIANCE library directories for each file given in a
140 > .I \-f
141 > option.
142   .PP
143   If no
144   .I \-o
145   specification is given, results are written on the standard output in order
146   of modifier (as given on the command line) then bin number.
147 < The same format is used for a simple file name specification
148 < without any embedded "%s" or "%d" formats.
147 > Concatenated data is also sent to a single destination (i.e., an initial
148 > .I \-o
149 > specification without formatting strings).
150   If a "%s" format appears but no "%d" in the
151   .I \-o
152   specification, then each modifier will have its own output file, with
# Line 108 | Line 160 | with a newline at the end of each ray record.
160   For binary output formats, there is no such delimiter to mark
161   the end of each record.
162   .PP
163 < If a
164 < .I \-b
165 < expression is defined for a particular modifier,
166 < the bin number will be evaluated at run time for each
167 < ray contribution from
168 < .I rtrace.
169 < Specifically, each ray's world intersection point will be assigned to
170 < the variables Px, Py, and Pz, and the normalized ray direction
171 < will be assigned to Dx, Dy, and Dz.
172 < These ray parameters may be combined with any definitions given in
173 < .I \-e
174 < options, or any files read in from
175 < .I \-f
176 < options, to compute the bin, which will be
177 < rounded to the closest whole number.
178 < This mechanism allows the user to define precise regions (or directions)
179 < they wish to accumulate, such as the Tregenza sky grid, which would be
180 < otherwise impossible to specify as a set of RADIANCE primitives.
163 > Input and output format defaults to plain text, where each ray's
164 > origin and direction (6 real values) are given on input,
165 > and one line is produced per output file per ray.
166 > Alternative data representations may be specified by the
167 > .I \-f[io]
168 > option, which is described in the
169 > .I rtrace
170 > man page along with the associated
171 > .I \-x
172 > and
173 > .I \-y
174 > resolution settings.
175 > In particular, the color ('c') output data representation
176 > together with positive dimensions for
177 > .I \-x
178 > and
179 > .I \-y
180 > will produce an uncompressed RADIANCE picture,
181 > suitable for manipulation with
182 > .I pcomb(1)
183 > and related tools.
184   .PP
185   If the
186   .I \-n
187   option is specified with a value greater than 1, multiple
188 < .I rtrace(1)
188 > .I rtrace
189   processes will be used to accelerate computation on a shared
190   memory machine.
191   Note that there is no benefit to using more processes
192 < than there are local CPUs available to do the work.
192 > than there are local CPUs available to do the work, and the
193 > .I rtcontrib
194 > process itself may use a considerable amount of CPU time.
195   .PP
196   Options may be given on the command line and/or read from the
197   environment and/or read from a file.
# Line 142 | Line 199 | A command argument beginning with a dollar sign ('$')
199   replaced by the contents of the given environment variable.
200   A command argument beginning with an at sign ('@') is immediately
201   replaced by the contents of the given file.
202 < .SH EXAMPLE
203 < First
204 < .I rpiece
148 < process is started on the machine "goober":
202 > .SH EXAMPLES
203 > To compute the proportional contributions from sources modified
204 > by "light1" vs. "light2" on a set of illuminance values:
205   .IP "" .2i
206 < 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 &
206 > rtcontrib -I+ @render.opt -o c_%s.dat -m light1 -m light2 scene.oct < test.dat
207   .PP
208 < Second
209 < .I rpiece
158 < processes is started on the machine "sucker":
208 > To generate a pair of images corresponding to these two lights'
209 > contributions:
210   .IP "" .2i
211 < sucker% rpiece @args &
212 < .SH NOTES
213 < 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.
211 > vwrays -ff -x 1024 -y 1024 -vf best.vf |
212 > rtcontrib -ffc `vwrays -d -x 1024 -y 1024 -vf best.vf`
213 > @render.opt -o c_%s.pic -m light1 -m light2 scene.oct
214   .PP
215 < The output picture is not run-length encoded, and can be quite
216 < large.
180 < The approximate size (in kilobytes) can be computed by the simple
181 < formula:
215 > These images may then be recombined using the desired outputs
216 > of light1 and light2:
217   .IP "" .2i
218 < filesize = xres*yres/256
218 > pcomb -c 100 90 75 c_light1.pic -c 50 55 57 c_light2.pic > combined.pic
219   .PP
220 < Make sure that there is enough space on the filesystem to hold the
221 < entire picture before beginning.
222 < Once the picture is finished, the
223 < .I ra_rgbe(1)
224 < program with the -r option may be used to convert to a run-length
225 < 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.
220 > To compute an array of illuminance contributions according to a Tregenza sky:
221 > .IP "" .2i
222 > rtcontrib -I+ -b tbin -o sky.dat -m skyglow -b 0 -o ground.dat -m groundglow
223 > @render.opt -f tregenza.cal scene.oct < test.dat
224 > .SH ENVIRONMENT
225 > RAYPATH         path to search for -f and -M files
226   .SH AUTHOR
227   Greg Ward
228   .SH "SEE ALSO"

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)