| 1 |
|
.\" RCSid "$Id$" |
| 2 |
< |
.TH RTCONTRIB 1 5/25/05 RADIANCE |
| 2 |
> |
.TH RCONTRIB 1 5/25/05 RADIANCE |
| 3 |
|
.SH NAME |
| 4 |
|
rcontrib - compute contribution coefficients in a RADIANCE scene |
| 5 |
|
.SH SYNOPSIS |
| 9 |
|
][ |
| 10 |
|
.B \-V |
| 11 |
|
][ |
| 12 |
+ |
.B "\-t secs" |
| 13 |
+ |
][ |
| 14 |
|
.B "\-c count" |
| 15 |
|
][ |
| 16 |
|
.B \-fo |
| 23 |
|
][ |
| 24 |
|
.B "\-o ospec" |
| 25 |
|
][ |
| 26 |
+ |
.B "\-p p1=V1,p2=V2" |
| 27 |
+ |
][ |
| 28 |
|
.B "\-b binv" |
| 29 |
|
][ |
| 30 |
|
.B "\-bn nbins" |
| 46 |
|
.br |
| 47 |
|
.B "rcontrib [ options ] \-defaults" |
| 48 |
|
.SH DESCRIPTION |
| 49 |
< |
.I Rtcontrib |
| 49 |
> |
.I Rcontrib |
| 50 |
|
computes ray coefficients |
| 51 |
|
for objects whose modifiers are named in one or more |
| 52 |
|
.I \-m |
| 65 |
|
If the |
| 66 |
|
.I \-n |
| 67 |
|
option is specified with a value greater than 1, multiple |
| 64 |
– |
.I rtrace |
| 68 |
|
processes will be used to accelerate computation on a shared |
| 69 |
|
memory machine. |
| 70 |
|
Note that there is no benefit to using more processes |
| 105 |
|
option tells |
| 106 |
|
.I rcontrib |
| 107 |
|
how many rays to accumulate for each record. |
| 108 |
< |
The default value is 1, meaning a full record will be produced for |
| 108 |
> |
The default value is one, meaning a full record will be produced for |
| 109 |
|
each input ray. |
| 110 |
< |
For values greater than 1, contributions will be averaged together |
| 110 |
> |
For values greater than one, contributions will be averaged together |
| 111 |
|
over the given number of input rays. |
| 112 |
|
If set to zero, only a single record will be produced at the very |
| 113 |
|
end, corresponding to the sum of all rays given on the input |
| 117 |
|
to sum RGB values together, but is much more efficient. |
| 118 |
|
Using this option, it is possible to reverse sampling, sending rays from |
| 119 |
|
a parallel source such as the sun to a diffuse surface, for example. |
| 120 |
< |
Note that output flushing via zero-direction rays is disabled |
| 121 |
< |
for accumulated evaluations. |
| 120 |
> |
Note that output flushing via zero-direction rays is disabled with |
| 121 |
> |
.I \-c |
| 122 |
> |
set to zero. |
| 123 |
|
.PP |
| 124 |
+ |
If progress reports are desired, the |
| 125 |
+ |
.I \-t |
| 126 |
+ |
option specifies a time interval in seconds for reports sent to |
| 127 |
+ |
standard error. |
| 128 |
+ |
.PP |
| 129 |
|
The output of |
| 130 |
|
.I rcontrib |
| 131 |
|
has many potential uses. |
| 137 |
|
can be used to compute arbitrary input-output relationships in optical |
| 138 |
|
systems, such as luminaires, light pipes, and shading devices. |
| 139 |
|
.PP |
| 140 |
< |
.I Rtcontrib |
| 141 |
< |
calls |
| 142 |
< |
.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 |
| 140 |
> |
.I Rcontrib |
| 141 |
> |
sends the accumulated rays tallies |
| 142 |
> |
to one or more destinations according to the given |
| 143 |
|
.I \-o |
| 144 |
|
specification. |
| 145 |
|
If a destination begins with an exclamation mark ('!'), then |
| 165 |
|
option may be used to further define |
| 166 |
|
a "bin number" within each object if finer resolution is needed, and |
| 167 |
|
this will be applied to a "%d" format in the output file |
| 168 |
< |
specification if present. |
| 168 |
> |
specification if present. |
| 169 |
> |
(The final integer will be offset incrementally |
| 170 |
> |
if the output is a RADIANCE picture and more than one modifier has |
| 171 |
> |
the same format specification.)\0 |
| 172 |
|
The actual bin number is computed at run time based on ray direction |
| 173 |
|
and surface intersection, as described below. |
| 174 |
< |
If the number of bins is known in advance, it should be specified with the |
| 174 |
> |
The number of bins must be specified in advance with the |
| 175 |
|
.I \-bn |
| 176 |
|
option, and this is critical for output files containing multiple values |
| 177 |
|
per record. |
| 181 |
|
or |
| 182 |
|
.I \-e |
| 183 |
|
option. |
| 184 |
< |
Since bin numbers start from 0, the bin count is always equal to |
| 185 |
< |
the last bin plus 1. |
| 177 |
< |
Set the this value to 0 if the bin count is unknown (the default). |
| 184 |
> |
Since bin numbers start from zero, the bin count is always equal to |
| 185 |
> |
the last bin plus one. |
| 186 |
|
The most recent |
| 187 |
+ |
.I \-p, |
| 188 |
|
.I \-b, |
| 189 |
|
.I \-bn |
| 190 |
|
and |
| 198 |
|
.I \-y |
| 199 |
|
if the |
| 200 |
|
.I \-c |
| 201 |
< |
is 0, when they control the resolution string |
| 201 |
> |
is zero, when they control the resolution string |
| 202 |
|
produced in the corresponding output. |
| 203 |
|
.PP |
| 204 |
|
If a |
| 205 |
|
.I \-b |
| 206 |
|
expression is defined for a particular modifier, |
| 207 |
|
the bin number will be evaluated at run time for each |
| 208 |
< |
ray contribution from |
| 200 |
< |
.I rtrace. |
| 208 |
> |
ray contribution. |
| 209 |
|
Specifically, each ray's world intersection point will be assigned to |
| 210 |
|
the variables Px, Py, and Pz, and the normalized ray direction |
| 211 |
|
will be assigned to Dx, Dy, and Dz. |
| 214 |
|
arguments and files read using the |
| 215 |
|
.I \-f |
| 216 |
|
option. |
| 217 |
+ |
Additional parameter values that apply only to this modifier may be specified |
| 218 |
+ |
with a |
| 219 |
+ |
.I \-p |
| 220 |
+ |
option, which contains a list of variable names and assigned values, separated |
| 221 |
+ |
by commas, colons, or semicolons. |
| 222 |
|
The computed bin value will be |
| 223 |
|
rounded to the nearest whole number. |
| 224 |
+ |
(Negative bin values will be silently ignored.)\0 |
| 225 |
+ |
For a single bin, you may specify |
| 226 |
+ |
.I "\-b 0", |
| 227 |
+ |
which is the default. |
| 228 |
|
This mechanism allows the user to define precise regions or directions |
| 229 |
|
they wish to accumulate, such as the Tregenza sky discretization, |
| 230 |
|
which would be otherwise impossible to specify |
| 233 |
|
described in the |
| 234 |
|
.I rcalc(1) |
| 235 |
|
man page. |
| 236 |
< |
Unlike |
| 236 |
> |
Like |
| 237 |
|
.I rcalc, |
| 238 |
|
.I rcontrib |
| 239 |
|
will search the RADIANCE library directories for each file given in a |
| 288 |
|
replaced by the contents of the given environment variable. |
| 289 |
|
A command argument beginning with an at sign ('@') is immediately |
| 290 |
|
replaced by the contents of the given file. |
| 291 |
+ |
.PP |
| 292 |
+ |
.I Rcontrib |
| 293 |
+ |
supports light source contributions from photon maps generated by |
| 294 |
+ |
.I mkpmap(1) |
| 295 |
+ |
with its |
| 296 |
+ |
.I -apC |
| 297 |
+ |
option. Enabling photon mapping is described in the |
| 298 |
+ |
.I rtrace |
| 299 |
+ |
man page along with its relevant settings. In photon mapping mode, |
| 300 |
+ |
.I rcontrib |
| 301 |
+ |
only supports contributions from light sources, not arbitrary modifiers. |
| 302 |
+ |
The |
| 303 |
+ |
.I -b |
| 304 |
+ |
option is supported along with its associated ray variables, as |
| 305 |
+ |
discussed above. Ray coefficients are also supported via the |
| 306 |
+ |
.I \-V- |
| 307 |
+ |
option. Using fewer photons than there are light sources for the photon |
| 308 |
+ |
density estimates results in omitted contributions, thus the bandwidth |
| 309 |
+ |
is clamped accordingly and a warning is issued. |
| 310 |
|
.SH EXAMPLES |
| 311 |
|
To compute the proportional contributions from sources modified |
| 312 |
|
by "light1" vs. "light2" on a set of illuminance values: |
| 327 |
|
.PP |
| 328 |
|
To compute an array of illuminance contributions according to a Tregenza sky: |
| 329 |
|
.IP "" .2i |
| 330 |
< |
rcontrib \-I+ \-b tbin \-o sky.dat \-m skyglow \-b 0 \-o ground.dat \-m groundglow |
| 331 |
< |
@render.opt \-f tregenza.cal scene.oct < test.dat |
| 330 |
> |
rcontrib \-I+ \-f tregenza.cal \-b tbin \-bn Ntbins \-o sky.dat \-m skyglow |
| 331 |
> |
\-b 0 \-o ground.dat \-m groundglow @render.opt scene.oct < test.dat |
| 332 |
> |
.PP |
| 333 |
> |
To perform an annual simulation of 365 daily sun positions in photon mapping |
| 334 |
> |
mode: |
| 335 |
> |
.IP "" .2i |
| 336 |
> |
rcontrib \-I+ \-h \-V \-fo \-o c_%s.dat \-M lights \-ap contrib.pm 365 |
| 337 |
> |
scene.oct < test.dat, |
| 338 |
|
.SH ENVIRONMENT |
| 339 |
|
RAYPATH path to search for \-f and \-M files |
| 340 |
+ |
.SH BUGS |
| 341 |
+ |
We do not currently compute contributions or coefficients properly |
| 342 |
+ |
in scenes with participating media. |
| 343 |
+ |
A single warning will be issued if a scattering or absorbing medium |
| 344 |
+ |
is detected. |
| 345 |
|
.SH AUTHOR |
| 346 |
|
Greg Ward |
| 347 |
|
.SH "SEE ALSO" |
| 348 |
< |
cnt(1), genklemsamp(1), getinfo(1), pcomb(1), pfilt(1), ra_rgbe(1), |
| 349 |
< |
rcalc(1), rpict(1), rsensor(1), rtrace(1), total(1), vwrays(1), ximage(1) |
| 348 |
> |
cnt(1), genklemsamp(1), getinfo(1), mkpmap(1), pcomb(1), pfilt(1), |
| 349 |
> |
ra_rgbe(1), rcalc(1), rfluxmtx(1), rmtxop(1), rpict(1), rsensor(1), |
| 350 |
> |
rtrace(1), total(1), vwrays(1), ximage(1) |
| 351 |
> |
|