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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines