ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/doc/man/man1/rtcontrib.1
Revision: 1.4
Committed: Thu May 26 21:03:22 2005 UTC (19 years ago) by greg
Branch: MAIN
Changes since 1.3: +3 -1 lines
Log Message:
Added -defaults invocation to synopsis

File Contents

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