1 |
|
.\" RCSid "$Id$" |
2 |
|
.\" Print using the -ms macro package |
3 |
< |
.DA 11/13/2023 |
3 |
> |
.DA 12/09/2024 |
4 |
|
.LP |
5 |
< |
.tl """Copyright \(co 2023 Regents, University of California |
5 |
> |
.tl """Copyright \(co 2024 Regents, University of California |
6 |
|
.sp 2 |
7 |
|
.TL |
8 |
|
The |
422 |
|
0 |
423 |
|
3 red green blue |
424 |
|
.DE |
425 |
+ |
While alternate materials that are reflective will appear as normal, |
426 |
+ |
indirect rays will use the mirror's reflectance rather than the |
427 |
+ |
alternate type. |
428 |
+ |
Transmitting materials are an exception, where both transmission and |
429 |
+ |
reflection will use the alternate type for all rays not specifically |
430 |
+ |
targeting virtual light sources. |
431 |
+ |
Therefore, transmitting alternate types should only have pure specular |
432 |
+ |
reflection if they reflect at all, to maintain a valid calculation. |
433 |
+ |
.PP |
434 |
+ |
The mirror material type reflects light sources only from the front side |
435 |
+ |
of a surface, regardless of any alternate material. |
436 |
+ |
If virtual source generation is desired on both sides, two coincident |
437 |
+ |
surfaces with opposite normal orientations may be employed to achieve |
438 |
+ |
this effect. |
439 |
+ |
The reflectance and alternate material type may be |
440 |
+ |
different for the overlapped surfaces, |
441 |
+ |
and the two sides will behave accordingly. |
442 |
|
.LP |
443 |
|
.UL Prism1 |
444 |
|
.PP |
656 |
|
8 dred dgrn dblu sred sgrn sblu u-power v-power |
657 |
|
.DE |
658 |
|
.LP |
659 |
+ |
.UL WGMDfunc |
660 |
+ |
.PP |
661 |
+ |
WGMDfunc is a more programmable version of trans2, |
662 |
+ |
with separate modifier paths and variables to control each component. |
663 |
+ |
(WGMD stands for Ward-Geisler-Moroder-Duer, which is the basis for |
664 |
+ |
this empirical model, similar to the previous ones beside Ashik2.)\0 |
665 |
+ |
The specification of this material is given below. |
666 |
+ |
.DS |
667 |
+ |
mod WGMDfunc id |
668 |
+ |
13+ rs_mod rs rs_urough rs_vrough |
669 |
+ |
ts_mod ts ts_urough ts_vrough |
670 |
+ |
td_mod |
671 |
+ |
ux uy uz funcfile transform |
672 |
+ |
0 |
673 |
+ |
9+ rfdif gfdif bfdif |
674 |
+ |
rbdif gbdif bbdif |
675 |
+ |
rtdif gtdif btdif |
676 |
+ |
A10 .. |
677 |
+ |
.DE |
678 |
+ |
The sum of specular reflectance ( |
679 |
+ |
.I rs |
680 |
+ |
), specular transmittance ( |
681 |
+ |
.I ts |
682 |
+ |
), diffuse reflectance ( |
683 |
+ |
.I "rfdif gfdif bfdif" |
684 |
+ |
for front and |
685 |
+ |
.I "rbdif gbdif bbdif" |
686 |
+ |
for back) |
687 |
+ |
and diffuse transmittance ( |
688 |
+ |
.I "rtdif gtdif btdif" |
689 |
+ |
) should be less than 1 for each |
690 |
+ |
channel. |
691 |
+ |
.PP |
692 |
+ |
Unique to this material, separate modifier channels are |
693 |
+ |
provided for each component. |
694 |
+ |
The main modifier is used on the diffuse reflectance, both |
695 |
+ |
front and back. |
696 |
+ |
The |
697 |
+ |
.I rs_mod |
698 |
+ |
modifier is used for specular reflectance. |
699 |
+ |
If "void" is given for |
700 |
+ |
.I rs_mod, |
701 |
+ |
then the specular reflection color will be white. |
702 |
+ |
The special "inherit" keyword may also be given, in which case |
703 |
+ |
specular reflectance will share the main modifier. |
704 |
+ |
This behavior is replicated for the specular transmittance modifier |
705 |
+ |
.I ts_mod, |
706 |
+ |
which has its own independent roughness expressions. |
707 |
+ |
Finally, the diffuse transmittance modifier is given as |
708 |
+ |
.I td_mod, |
709 |
+ |
which may also be "void" or "inherit". |
710 |
+ |
Note that any spectra or color for specular components must be |
711 |
+ |
carried by the named modifier(s). |
712 |
+ |
.PP |
713 |
+ |
The main advantage to this material over BRTDfunc and |
714 |
+ |
other programmable types described below is that the specular sampling is |
715 |
+ |
well-defined, so that all components are fully computed. |
716 |
+ |
.LP |
717 |
|
.UL Dielectric |
718 |
|
.PP |
719 |
|
A dielectric material is transparent, and it refracts light |
1282 |
|
0 |
1283 |
|
5+ nmA nmB s1 s2 .. sN |
1284 |
|
.DE |
1285 |
< |
The first two real arguments indicate the limits of the covered |
1285 |
> |
The first two real arguments indicate the extrema of the |
1286 |
|
spectral range in nanometers. |
1287 |
< |
Subsequent real values correspond to multipliers in each wavelength band, |
1213 |
< |
where the first band goes from nmA to nmA+(nmB-nmA)/N, and N is the |
1214 |
< |
number of bands (i.e., the number of real arguments minus 2). |
1287 |
> |
Subsequent real values correspond to multipliers at each wavelength. |
1288 |
|
The nmA wavelength may be greater or less than nmB, |
1289 |
|
but they may not be equal, and their ordering matches |
1290 |
|
the order of the spectral values. |
1324 |
|
pattern, similar to the colorfunc type. |
1325 |
|
.DS |
1326 |
|
mod specfunc id |
1327 |
< |
2+ sval funcfile transform |
1327 |
> |
2+ sfunc funcfile transform |
1328 |
|
0 |
1329 |
|
2+ nmA nmB A3 .. |
1330 |
|
.DE |
1331 |
|
Like the spectrum primitive, the wavelength range is specified |
1332 |
|
in the first two real arguments, and additional real values are |
1333 |
< |
accessible to the sval function. |
1333 |
> |
set in the evaluation context. |
1334 |
|
This function is fed a wavelenth sample |
1335 |
|
between nmA and nmB as its only argument, |
1336 |
|
and it returns the corresponding spectral intensity. |
1337 |
+ |
.LP |
1338 |
+ |
.UL Specdata |
1339 |
+ |
.PP |
1340 |
+ |
Specdata is like brightdata and colordata, but with more |
1341 |
+ |
than 3 specular samples. |
1342 |
+ |
.DS |
1343 |
+ |
mod specdata id |
1344 |
+ |
3+n+ |
1345 |
+ |
func datafile |
1346 |
+ |
funcfile x1 x2 .. xn transform |
1347 |
+ |
0 |
1348 |
+ |
m A1 A2 .. Am |
1349 |
+ |
.DE |
1350 |
+ |
The data file must have one more dimension than the coordinate |
1351 |
+ |
variable count, as this final dimension corresponds to the covered |
1352 |
+ |
spectrum. |
1353 |
+ |
The starting and ending wavelengths are specified in "datafile" |
1354 |
+ |
as well as the number of spectral samples. |
1355 |
+ |
The function "func" will be called with two parameters, the |
1356 |
+ |
interpolated spectral value for the current coordinate and the |
1357 |
+ |
associated wavelength. |
1358 |
+ |
If the spectrum is broken into 12 components, then 12 calls |
1359 |
+ |
will be made to "func" for the relevant ray evaluation. |
1360 |
+ |
.LP |
1361 |
+ |
.UL Specpict |
1362 |
+ |
.PP |
1363 |
+ |
Specpict is a special case of specdata, where the pattern is |
1364 |
+ |
a hyperspectral image stored in the common-exponent file format. |
1365 |
+ |
The dimensions of the image data are determined by the picture |
1366 |
+ |
just as with the colorpict primitive. |
1367 |
+ |
.DS |
1368 |
+ |
mod specpict id |
1369 |
+ |
5+ |
1370 |
+ |
func specfile |
1371 |
+ |
funcfile u v transform |
1372 |
+ |
0 |
1373 |
+ |
m A1 A2 .. Am |
1374 |
+ |
.DE |
1375 |
+ |
The function "func" is called with the interpolated pixel value |
1376 |
+ |
and the wavelength sample in nanometers, the same as specdata, |
1377 |
+ |
with as many calls made as there are components in "specfile". |
1378 |
|
.NH 3 |
1379 |
|
Mixtures |
1380 |
|
.PP |