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

Diff Legend

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