21 |
|
][ |
22 |
|
.B "\-o ospec" |
23 |
|
][ |
24 |
+ |
.B "\-p p1=V1,p2=V2" |
25 |
+ |
][ |
26 |
|
.B "\-b binv" |
27 |
|
][ |
28 |
|
.B "\-bn nbins" |
44 |
|
.br |
45 |
|
.B "rcontrib [ options ] \-defaults" |
46 |
|
.SH DESCRIPTION |
47 |
< |
.I Rtcontrib |
47 |
> |
.I Rcontrib |
48 |
|
computes ray coefficients |
49 |
|
for objects whose modifiers are named in one or more |
50 |
|
.I \-m |
63 |
|
If the |
64 |
|
.I \-n |
65 |
|
option is specified with a value greater than 1, multiple |
64 |
– |
.I rtrace |
66 |
|
processes will be used to accelerate computation on a shared |
67 |
|
memory machine. |
68 |
|
Note that there is no benefit to using more processes |
103 |
|
option tells |
104 |
|
.I rcontrib |
105 |
|
how many rays to accumulate for each record. |
106 |
< |
The default value is 1, meaning a full record will be produced for |
106 |
> |
The default value is one, meaning a full record will be produced for |
107 |
|
each input ray. |
108 |
< |
For values greater than 1, contributions will be averaged together |
108 |
> |
For values greater than one, contributions will be averaged together |
109 |
|
over the given number of input rays. |
110 |
|
If set to zero, only a single record will be produced at the very |
111 |
|
end, corresponding to the sum of all rays given on the input |
115 |
|
to sum RGB values together, but is much more efficient. |
116 |
|
Using this option, it is possible to reverse sampling, sending rays from |
117 |
|
a parallel source such as the sun to a diffuse surface, for example. |
118 |
< |
Note that output flushing via zero-direction rays is disabled |
119 |
< |
for accumulated evaluations. |
118 |
> |
Note that output flushing via zero-direction rays is disabled with |
119 |
> |
.I \-c |
120 |
> |
set to zero. |
121 |
|
.PP |
122 |
|
The output of |
123 |
|
.I rcontrib |
130 |
|
can be used to compute arbitrary input-output relationships in optical |
131 |
|
systems, such as luminaires, light pipes, and shading devices. |
132 |
|
.PP |
133 |
< |
.I Rtcontrib |
134 |
< |
calls |
135 |
< |
.I rtrace(1) |
134 |
< |
with the \-oTW (or \-oTV) option to calculate the daughter ray |
135 |
< |
contributions for each input ray, and the output tallies |
136 |
< |
are sent to one or more destinations according to the given |
133 |
> |
.I Rcontrib |
134 |
> |
sends the accumulated rays tallies |
135 |
> |
to one or more destinations according to the given |
136 |
|
.I \-o |
137 |
|
specification. |
138 |
|
If a destination begins with an exclamation mark ('!'), then |
161 |
|
specification if present. |
162 |
|
The actual bin number is computed at run time based on ray direction |
163 |
|
and surface intersection, as described below. |
164 |
< |
If the number of bins is known in advance, it should be specified with the |
164 |
> |
The number of bins must be specified in advance with the |
165 |
|
.I \-bn |
166 |
|
option, and this is critical for output files containing multiple values |
167 |
|
per record. |
171 |
|
or |
172 |
|
.I \-e |
173 |
|
option. |
174 |
< |
Since bin numbers start from 0, the bin count is always equal to |
175 |
< |
the last bin plus 1. |
177 |
< |
Set the this value to 0 if the bin count is unknown (the default). |
174 |
> |
Since bin numbers start from zero, the bin count is always equal to |
175 |
> |
the last bin plus one. |
176 |
|
The most recent |
177 |
+ |
.I \-p, |
178 |
|
.I \-b, |
179 |
|
.I \-bn |
180 |
|
and |
188 |
|
.I \-y |
189 |
|
if the |
190 |
|
.I \-c |
191 |
< |
is 0, when they control the resolution string |
191 |
> |
is zero, when they control the resolution string |
192 |
|
produced in the corresponding output. |
193 |
|
.PP |
194 |
|
If a |
195 |
|
.I \-b |
196 |
|
expression is defined for a particular modifier, |
197 |
|
the bin number will be evaluated at run time for each |
198 |
< |
ray contribution from |
200 |
< |
.I rtrace. |
198 |
> |
ray contribution. |
199 |
|
Specifically, each ray's world intersection point will be assigned to |
200 |
|
the variables Px, Py, and Pz, and the normalized ray direction |
201 |
|
will be assigned to Dx, Dy, and Dz. |
204 |
|
arguments and files read using the |
205 |
|
.I \-f |
206 |
|
option. |
207 |
+ |
Additional parameter values that apply only to this modifier may be specified |
208 |
+ |
with a |
209 |
+ |
.I \-p |
210 |
+ |
option, which contains a list of variable names and assigned values, separated |
211 |
+ |
by commas or semicolons. |
212 |
|
The computed bin value will be |
213 |
|
rounded to the nearest whole number. |
214 |
+ |
(Negative bin values will be silently ignored.)\0 |
215 |
+ |
For a single bin, you may specify |
216 |
+ |
.I "\-b 0", |
217 |
+ |
which is the default. |
218 |
|
This mechanism allows the user to define precise regions or directions |
219 |
|
they wish to accumulate, such as the Tregenza sky discretization, |
220 |
|
which would be otherwise impossible to specify |
223 |
|
described in the |
224 |
|
.I rcalc(1) |
225 |
|
man page. |
226 |
< |
Unlike |
226 |
> |
Like |
227 |
|
.I rcalc, |
228 |
|
.I rcontrib |
229 |
|
will search the RADIANCE library directories for each file given in a |
278 |
|
replaced by the contents of the given environment variable. |
279 |
|
A command argument beginning with an at sign ('@') is immediately |
280 |
|
replaced by the contents of the given file. |
281 |
+ |
.PP |
282 |
+ |
.I Rcontrib |
283 |
+ |
has EXPERIMENTAL support for light source contributions from photon maps |
284 |
+ |
generated by |
285 |
+ |
.I mkpmap(1) |
286 |
+ |
with its |
287 |
+ |
.I -apC |
288 |
+ |
option. In photon mapping mode, |
289 |
+ |
.I rcontrib |
290 |
+ |
only supports contributions from light sources, not arbitrary modifiers. |
291 |
+ |
The |
292 |
+ |
.I -b |
293 |
+ |
option is supported along with its associated ray variables, as |
294 |
+ |
discussed above. Ray coefficients are also supported via the |
295 |
+ |
.I \-V- |
296 |
+ |
option. Using fewer photons than there are light sources for the photon |
297 |
+ |
density estimates results in omitted contributions, thus the bandwidth |
298 |
+ |
is clamped accordingly and a warning issued. |
299 |
|
.SH EXAMPLES |
300 |
|
To compute the proportional contributions from sources modified |
301 |
|
by "light1" vs. "light2" on a set of illuminance values: |
316 |
|
.PP |
317 |
|
To compute an array of illuminance contributions according to a Tregenza sky: |
318 |
|
.IP "" .2i |
319 |
< |
rcontrib \-I+ \-b tbin \-o sky.dat \-m skyglow \-b 0 \-o ground.dat \-m groundglow |
320 |
< |
@render.opt \-f tregenza.cal scene.oct < test.dat |
319 |
> |
rcontrib \-I+ \-f tregenza.cal \-b tbin \-bn Ntbins \-o sky.dat \-m skyglow |
320 |
> |
\-b 0 \-o ground.dat \-m groundglow @render.opt scene.oct < test.dat |
321 |
> |
.PP |
322 |
> |
To perform an annual simulation of 365 daily sun positions in photon mapping |
323 |
> |
mode: |
324 |
> |
.IP "" .2i |
325 |
> |
rcontrib \-I+ \-h \-V \-fo \-o c_%s.dat \-M lights \-ap contrib.pm 365 |
326 |
> |
scene.oct < test.dat, |
327 |
|
.SH ENVIRONMENT |
328 |
|
RAYPATH path to search for \-f and \-M files |
329 |
|
.SH AUTHOR |
330 |
|
Greg Ward |
331 |
|
.SH "SEE ALSO" |
332 |
< |
cnt(1), genklemsamp(1), getinfo(1), pcomb(1), pfilt(1), ra_rgbe(1), |
333 |
< |
rcalc(1), rpict(1), rsensor(1), rtrace(1), total(1), vwrays(1), ximage(1) |
332 |
> |
cnt(1), genklemsamp(1), getinfo(1), mkpmap(1), pcomb(1), pfilt(1), |
333 |
> |
ra_rgbe(1), rcalc(1), rfluxmtx(1), rmtxop(1), rpict(1), rsensor(1), |
334 |
> |
rtrace(1), total(1), vwrays(1), ximage(1) |
335 |
> |
|