| 1 |
< |
.\" RCSid "$Id" |
| 1 |
> |
.\" RCSid "$Id$" |
| 2 |
|
.\" Print using the -ms macro package |
| 3 |
< |
.DA 1/20/99 |
| 3 |
> |
.DA 07/22/2025 |
| 4 |
|
.LP |
| 5 |
< |
.tl """Copyright \(co 1996 Regents, University of California |
| 5 |
> |
.tl """Copyright \(co 2025 Regents, University of California |
| 6 |
|
.sp 2 |
| 7 |
|
.TL |
| 8 |
|
The |
| 10 |
|
.br |
| 11 |
|
Synthetic Imaging System |
| 12 |
|
.AU |
| 13 |
< |
Greg Ward |
| 13 |
> |
Building Technologies Department |
| 14 |
|
.br |
| 15 |
|
Lawrence Berkeley Laboratory |
| 16 |
|
.br |
| 17 |
< |
1 Cyclotron Rd. |
| 17 |
> |
1 Cyclotron Rd., MS 90-3111 |
| 18 |
|
.br |
| 19 |
|
Berkeley, CA 94720 |
| 20 |
– |
.br |
| 21 |
– |
(510) 486-4757 |
| 20 |
|
.NH 1 |
| 21 |
|
Introduction |
| 22 |
|
.PP |
| 47 |
|
is a variation of |
| 48 |
|
.I rpict |
| 49 |
|
that computes and displays images interactively. |
| 50 |
+ |
Other programs (not shown) connect many of these elements together, |
| 51 |
+ |
such as the executive programs |
| 52 |
+ |
.I rad |
| 53 |
+ |
and |
| 54 |
+ |
.I ranimate, |
| 55 |
+ |
the interactive rendering program |
| 56 |
+ |
.I rholo, |
| 57 |
+ |
and the animation program |
| 58 |
+ |
.I ranimove. |
| 59 |
+ |
The program |
| 60 |
+ |
.I obj2mesh |
| 61 |
+ |
acts as both a converter and scene compiler, converting a Wavefront .OBJ |
| 62 |
+ |
file into a compiled mesh octree for efficient rendering. |
| 63 |
|
.PP |
| 64 |
|
A scene description file lists the surfaces and materials |
| 65 |
< |
that make up a specific environment. |
| 66 |
< |
The current surface types are spheres, polygons, cones, |
| 67 |
< |
and cylinders. |
| 68 |
< |
They can be made from materials such as plastic, metal, |
| 69 |
< |
and glass. |
| 70 |
< |
Light sources can be distant disks as well as local spheres, discs and |
| 71 |
< |
polygons. |
| 65 |
> |
that make up a specific environment. |
| 66 |
> |
The current surface types are spheres, polygons, cones, and cylinders. |
| 67 |
> |
There is also a composite surface type, called mesh, and a pseudosurface |
| 68 |
> |
type, called instance, which facilitates very complex geometries. |
| 69 |
> |
Surfaces can be made from materials such as plastic, metal, and glass. |
| 70 |
> |
Light sources can be distant disks as well as local spheres, disks |
| 71 |
> |
and polygons. |
| 72 |
|
.PP |
| 73 |
|
From a three-dimensional scene description and a specified view, |
| 74 |
|
.I rpict |
| 95 |
|
# comment |
| 96 |
|
|
| 97 |
|
modifier type identifier |
| 98 |
< |
n S1 S2 S3 .. Sn |
| 98 |
> |
n S1 S2 "S 3" .. Sn |
| 99 |
|
0 |
| 100 |
|
m R1 R2 R3 .. Rm |
| 101 |
|
|
| 123 |
|
Thus, the same identifier may be used repeatedly, and each new |
| 124 |
|
definition will apply to the primitives following it. |
| 125 |
|
.FE |
| 126 |
< |
An identifier can be any string (i.e. sequence of non-blank |
| 116 |
< |
characters). |
| 126 |
> |
An identifier can be any string (i.e., any sequence of non-white characters). |
| 127 |
|
The |
| 128 |
|
.I arguments |
| 129 |
|
associated with a primitive can be strings or real numbers. |
| 130 |
|
The first integer following the identifier is the number |
| 131 |
|
of string arguments, and it is followed by the arguments themselves |
| 132 |
< |
(separated by white space). |
| 132 |
> |
(separated by white space or enclosed in quotes). |
| 133 |
|
The next integer is the number of integer arguments, and is followed |
| 134 |
|
by the integer arguments. |
| 135 |
|
(There are currently no primitives that use them, however.) |
| 152 |
|
A command may be continued over multiple lines using a backslash, `\\', |
| 153 |
|
to escape the newline. |
| 154 |
|
.PP |
| 155 |
< |
Blank space is generally ignored, except as a separator. |
| 155 |
> |
White space is generally ignored, except as a separator. |
| 156 |
|
The exception is the newline character after a command or comment. |
| 157 |
|
Commands, comments and primitives may appear in any combination, so long |
| 158 |
|
as they are not intermingled. |
| 160 |
|
Primitive Types |
| 161 |
|
.PP |
| 162 |
|
Primitives can be surfaces, materials, textures or patterns. |
| 163 |
< |
Modifiers can be materials, textures or patterns. |
| 163 |
> |
Modifiers can be materials, mixtures, textures or patterns. |
| 164 |
|
Simple surfaces must have one material in their modifier list. |
| 165 |
|
.NH 3 |
| 166 |
|
Surfaces |
| 233 |
|
.LP |
| 234 |
|
.UL Cup |
| 235 |
|
.PP |
| 236 |
< |
A cup is an inverted cone (i.e. has an inward surface normal). |
| 236 |
> |
A cup is an inverted cone (i.e., has an inward surface normal). |
| 237 |
|
.LP |
| 238 |
|
.UL Cylinder |
| 239 |
|
.PP |
| 272 |
|
A mesh is a compound surface, made up of many triangles and |
| 273 |
|
an octree data structure to accelerate ray intersection. |
| 274 |
|
It is typically converted from a Wavefront .OBJ file using the |
| 275 |
< |
obj2mesh program. |
| 275 |
> |
.I obj2mesh |
| 276 |
> |
program. |
| 277 |
|
.DS |
| 278 |
|
mod mesh id |
| 279 |
|
1+ meshfile transform |
| 294 |
|
available memory. |
| 295 |
|
In addition, the mesh primitive can have associated (u,v) coordinates |
| 296 |
|
for pattern and texture mapping. |
| 297 |
< |
These are made available to function files via the Lu and Lu variables. |
| 297 |
> |
These are made available to function files via the Lu and Lv variables. |
| 298 |
|
.LP |
| 299 |
|
.UL Instance |
| 300 |
|
.PP |
| 332 |
|
.LP |
| 333 |
|
.UL Light |
| 334 |
|
.PP |
| 335 |
< |
Light is the basic material for self-luminous surfaces (i.e. light |
| 335 |
> |
Light is the basic material for self-luminous surfaces (i.e., light |
| 336 |
|
sources). |
| 337 |
|
In addition to the source surface type, spheres, discs (rings with zero |
| 338 |
|
inner radius), cylinders (provided they are long enough), and |
| 392 |
|
As well as radiance, the full cone angle (in degrees) |
| 393 |
|
and orientation (output direction) vector are given. |
| 394 |
|
The length of the orientation vector is the distance |
| 395 |
< |
of the effective focus behind the source center (i.e. the focal length). |
| 395 |
> |
of the effective focus behind the source center (i.e., the focal length). |
| 396 |
|
.DS |
| 397 |
|
mod spotlight id |
| 398 |
|
0 |
| 402 |
|
.LP |
| 403 |
|
.UL Mirror |
| 404 |
|
.PP |
| 405 |
< |
Mirror is used for planar surfaces that produce secondary |
| 405 |
> |
Mirror is used for planar surfaces that produce virtual |
| 406 |
|
source reflections. |
| 407 |
|
This material should be used sparingly, as it may cause the light |
| 408 |
|
source calculation to blow up if it is applied to many small surfaces. |
| 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 |
+ |
In this case, it is important that any reflections be purely specular |
| 432 |
+ |
(mirror-like) and equal to the mirror's reflectivity |
| 433 |
+ |
to maintain a valid result. |
| 434 |
+ |
A pure diffuse reflection may be added if desired. |
| 435 |
+ |
.PP |
| 436 |
+ |
The mirror material type reflects light sources only from the front side |
| 437 |
+ |
of a surface, regardless of any alternate material. |
| 438 |
+ |
If virtual source generation is desired on both sides, two coincident |
| 439 |
+ |
surfaces with opposite normal orientations may be employed to achieve |
| 440 |
+ |
this effect. |
| 441 |
+ |
The reflectance and alternate material type may be |
| 442 |
+ |
different for the overlapped surfaces, |
| 443 |
+ |
and the two sides will behave accordingly. |
| 444 |
|
.LP |
| 445 |
|
.UL Prism1 |
| 446 |
|
.PP |
| 447 |
|
The prism1 material is for general light redirection from prismatic |
| 448 |
< |
glazings, generating secondary light sources. |
| 449 |
< |
It can only be used to modify a planar surface (i.e. a polygon or disk) |
| 448 |
> |
glazings, generating virtual light sources. |
| 449 |
> |
It can only be used to modify a planar surface (i.e., a polygon or disk) |
| 450 |
|
and should not result in either light concentration or scattering. |
| 451 |
|
The new direction of the ray can be on either side of the material, |
| 452 |
|
and the definitions must have the correct bidirectional properties |
| 453 |
< |
to work properly with secondary light sources. |
| 453 |
> |
to work properly with virtual light sources. |
| 454 |
|
The arguments give the coefficient for the redirected light |
| 455 |
|
and its direction. |
| 456 |
|
.DS |
| 510 |
|
The scattering eccentricity parameter will likewise override the global |
| 511 |
|
setting if it is present. |
| 512 |
|
Scattering eccentricity indicates how much scattered light favors the |
| 513 |
< |
forward direction, as fit by the Heyney-Greenstein function: |
| 513 |
> |
forward direction, as fit by the Henyey-Greenstein function: |
| 514 |
|
.DS |
| 515 |
|
P(theta) = (1 - g*g) / (1 + g*g - 2*g*cos(theta))^1.5 |
| 516 |
|
.DE |
| 599 |
|
These three expressions (separated by white space) are evaluated in |
| 600 |
|
the context of the function file |
| 601 |
|
.I funcfile. |
| 602 |
< |
If no function file is required (i.e. no special variables or |
| 602 |
> |
If no function file is required (i.e., no special variables or |
| 603 |
|
functions are required), a period (`.') may be given in its |
| 604 |
|
place. |
| 605 |
|
(See the discussion of Function Files in the Auxiliary Files section). |
| 641 |
|
8 red green blue spec urough vrough trans tspec |
| 642 |
|
.DE |
| 643 |
|
.LP |
| 644 |
+ |
.UL Ashik2 |
| 645 |
+ |
.PP |
| 646 |
+ |
Ashik2 is the anisotropic reflectance model by Ashikhmin & Shirley. |
| 647 |
+ |
The string arguments are the same as for plastic2, but the real |
| 648 |
+ |
arguments have additional flexibility to specify the specular color. |
| 649 |
+ |
Also, rather than roughness, specular power is used, which has no |
| 650 |
+ |
physical meaning other than larger numbers are equivalent to a smoother |
| 651 |
+ |
surface. |
| 652 |
+ |
Unlike other material types, total reflectance is the sum of |
| 653 |
+ |
diffuse and specular colors, and should be adjusted accordingly. |
| 654 |
+ |
.DS |
| 655 |
+ |
mod ashik2 id |
| 656 |
+ |
4+ ux uy uz funcfile transform |
| 657 |
+ |
0 |
| 658 |
+ |
8 dred dgrn dblu sred sgrn sblu u-power v-power |
| 659 |
+ |
.DE |
| 660 |
+ |
.LP |
| 661 |
+ |
.UL WGMDfunc |
| 662 |
+ |
.PP |
| 663 |
+ |
WGMDfunc is a more programmable version of trans2, |
| 664 |
+ |
with separate modifier paths and variables to control each component. |
| 665 |
+ |
(WGMD stands for Ward-Geisler-Moroder-Duer, which is the basis for |
| 666 |
+ |
this empirical model, similar to the previous ones beside Ashik2.)\0 |
| 667 |
+ |
The specification of this material is given below. |
| 668 |
+ |
.DS |
| 669 |
+ |
mod WGMDfunc id |
| 670 |
+ |
13+ rs_mod rs rs_urough rs_vrough |
| 671 |
+ |
ts_mod ts ts_urough ts_vrough |
| 672 |
+ |
td_mod |
| 673 |
+ |
ux uy uz funcfile transform |
| 674 |
+ |
0 |
| 675 |
+ |
9+ rfdif gfdif bfdif |
| 676 |
+ |
rbdif gbdif bbdif |
| 677 |
+ |
rtdif gtdif btdif |
| 678 |
+ |
A10 .. |
| 679 |
+ |
.DE |
| 680 |
+ |
The sum of specular reflectance ( |
| 681 |
+ |
.I rs |
| 682 |
+ |
), specular transmittance ( |
| 683 |
+ |
.I ts |
| 684 |
+ |
), diffuse reflectance ( |
| 685 |
+ |
.I "rfdif gfdif bfdif" |
| 686 |
+ |
for front and |
| 687 |
+ |
.I "rbdif gbdif bbdif" |
| 688 |
+ |
for back) |
| 689 |
+ |
and diffuse transmittance ( |
| 690 |
+ |
.I "rtdif gtdif btdif" |
| 691 |
+ |
) should be less than 1 for each |
| 692 |
+ |
channel. |
| 693 |
+ |
.PP |
| 694 |
+ |
Unique to this material, separate modifier channels are |
| 695 |
+ |
provided for each component. |
| 696 |
+ |
The main modifier is used on the diffuse reflectance, both |
| 697 |
+ |
front and back. |
| 698 |
+ |
The |
| 699 |
+ |
.I rs_mod |
| 700 |
+ |
modifier is used for specular reflectance. |
| 701 |
+ |
If "void" is given for |
| 702 |
+ |
.I rs_mod, |
| 703 |
+ |
then the specular reflection color will be white. |
| 704 |
+ |
The special "inherit" keyword may also be given, in which case |
| 705 |
+ |
specular reflectance will share the main modifier. |
| 706 |
+ |
This behavior is replicated for the specular transmittance modifier |
| 707 |
+ |
.I ts_mod, |
| 708 |
+ |
which has its own independent roughness expressions. |
| 709 |
+ |
Finally, the diffuse transmittance modifier is given as |
| 710 |
+ |
.I td_mod, |
| 711 |
+ |
which may also be "void" or "inherit". |
| 712 |
+ |
Note that any spectra or color for specular components must be |
| 713 |
+ |
carried by the named modifier(s). |
| 714 |
+ |
.PP |
| 715 |
+ |
The main advantage to this material over BRTDfunc and |
| 716 |
+ |
other programmable types described below is that the specular sampling is |
| 717 |
+ |
well-defined, so that all components are fully computed. |
| 718 |
+ |
.LP |
| 719 |
|
.UL Dielectric |
| 720 |
|
.PP |
| 721 |
|
A dielectric material is transparent, and it refracts light |
| 959 |
|
6+ red green blue rspec trans tspec A7 .. |
| 960 |
|
.DE |
| 961 |
|
.LP |
| 962 |
+ |
.UL BSDF |
| 963 |
+ |
.PP |
| 964 |
+ |
The BSDF material type loads an XML (eXtensible Markup Language) |
| 965 |
+ |
file describing a bidirectional scattering distribution function. |
| 966 |
+ |
Real arguments to this material may define additional |
| 967 |
+ |
diffuse components that augment the BSDF data. |
| 968 |
+ |
String arguments are used to define thickness for proxied |
| 969 |
+ |
surfaces and the "up" orientation for the material. |
| 970 |
+ |
.DS |
| 971 |
+ |
mod BSDF id |
| 972 |
+ |
6+ thick BSDFfile ux uy uz funcfile transform |
| 973 |
+ |
0 |
| 974 |
+ |
0|3|6|9 |
| 975 |
+ |
rfdif gfdif bfdif |
| 976 |
+ |
rbdif gbdif bbdif |
| 977 |
+ |
rtdif gtdif btdif |
| 978 |
+ |
.DE |
| 979 |
+ |
The first string argument is a "thickness" parameter that may be used |
| 980 |
+ |
to hide detail geometry being proxied by an aggregate BSDF material. |
| 981 |
+ |
If a view or shadow ray hits a BSDF proxy with non-zero thickness, |
| 982 |
+ |
it will pass directly through as if the surface were not there. |
| 983 |
+ |
Similar to the illum type, this permits direct viewing and |
| 984 |
+ |
shadow testing of complex geometry. |
| 985 |
+ |
The BSDF is used when a scattered (indirect) ray hits the surface, |
| 986 |
+ |
and any transmitted sample rays will be offset by the thickness amount |
| 987 |
+ |
to avoid the hidden geometry and gather samples from the other side. |
| 988 |
+ |
In this manner, BSDF surfaces can improve the results for indirect |
| 989 |
+ |
scattering from complex systems without sacrificing appearance or |
| 990 |
+ |
shadow accuracy. |
| 991 |
+ |
If the BSDF has transmission and back-side reflection data, |
| 992 |
+ |
a parallel BSDF surface may be |
| 993 |
+ |
placed slightly less than the given thickness away from the front surface |
| 994 |
+ |
to enclose the complex geometry on both sides. |
| 995 |
+ |
The sign of the thickness is important, as it indicates whether the |
| 996 |
+ |
proxied geometry is behind the BSDF surface (when thickness is positive) |
| 997 |
+ |
or in front (when thickness is negative). |
| 998 |
+ |
.LP |
| 999 |
+ |
The second string argument is the name of the BSDF file, which is |
| 1000 |
+ |
found in the usual auxiliary locations. |
| 1001 |
+ |
The following three string parameters name variables for an "up" vector, |
| 1002 |
+ |
which together with the surface normal, define the |
| 1003 |
+ |
local coordinate system that orients the BSDF. |
| 1004 |
+ |
These variables, along with the thickness, are defined in a function |
| 1005 |
+ |
file given as the next string argument. |
| 1006 |
+ |
An optional transform is used to scale the thickness and reorient the up vector. |
| 1007 |
+ |
.LP |
| 1008 |
+ |
If no real arguments are given, the BSDF is used by itself to determine |
| 1009 |
+ |
reflection and transmission. |
| 1010 |
+ |
If there are at least 3 real arguments, the first triplet is an |
| 1011 |
+ |
additional diffuse reflectance for the front side. |
| 1012 |
+ |
At least 6 real arguments adds diffuse reflectance to the rear side of the surface. |
| 1013 |
+ |
If there are 9 real arguments, the final triplet will be taken as an additional |
| 1014 |
+ |
diffuse transmittance. |
| 1015 |
+ |
All diffuse components as well as the non-diffuse transmission are |
| 1016 |
+ |
modified by patterns applied to this material. |
| 1017 |
+ |
The non-diffuse reflection from either side are unaffected. |
| 1018 |
+ |
Textures perturb the effective surface normal in the usual way. |
| 1019 |
+ |
.LP |
| 1020 |
+ |
The surface normal of this type is not altered to face the incoming ray, |
| 1021 |
+ |
so the front and back BSDF reflections may differ. |
| 1022 |
+ |
(Transmission is identical front-to-back by physical law.)\0 |
| 1023 |
+ |
If back visibility is turned off during rendering and there is no |
| 1024 |
+ |
transmission or back-side reflection, only then the surface will be |
| 1025 |
+ |
invisible from behind. |
| 1026 |
+ |
Unlike other data-driven material types, the BSDF type is fully |
| 1027 |
+ |
supported and all parts of the distribution are properly sampled. |
| 1028 |
+ |
.LP |
| 1029 |
+ |
.UL aBSDF |
| 1030 |
+ |
.PP |
| 1031 |
+ |
The aBSDF material is identical to the BSDF type with two important |
| 1032 |
+ |
differences. |
| 1033 |
+ |
First, proxy geometry is not supported, so there is no thickness parameter. |
| 1034 |
+ |
Second, an aBSDF is assumed to have some specular through component |
| 1035 |
+ |
(the 'a' stands for "aperture"), which |
| 1036 |
+ |
is treated specially during the direct calculation and when viewing the |
| 1037 |
+ |
material. |
| 1038 |
+ |
Based on the BSDF data, the coefficient of specular transmission is |
| 1039 |
+ |
determined and used for modifying unscattered shadow and view rays. |
| 1040 |
+ |
.DS |
| 1041 |
+ |
mod aBSDF id |
| 1042 |
+ |
5+ BSDFfile ux uy uz funcfile transform |
| 1043 |
+ |
0 |
| 1044 |
+ |
0|3|6|9 |
| 1045 |
+ |
rfdif gfdif bfdif |
| 1046 |
+ |
rbdif gbdif bbdif |
| 1047 |
+ |
rtdif gtdif btdif |
| 1048 |
+ |
.DE |
| 1049 |
+ |
.LP |
| 1050 |
+ |
If a material has no specular transmitted component, it is much better |
| 1051 |
+ |
to use the BSDF type with a zero thickness than to use aBSDF. |
| 1052 |
+ |
.LP |
| 1053 |
|
.UL Antimatter |
| 1054 |
|
.PP |
| 1055 |
|
Antimatter is a material that can "subtract" volumes from other volumes. |
| 1064 |
|
The first modifier will also be used to shade the area leaving the |
| 1065 |
|
antimatter volume and entering the regular volume. |
| 1066 |
|
If mod1 is void, the antimatter volume is completely invisible. |
| 1067 |
< |
Antimatter does not work properly with the material type "trans", |
| 1068 |
< |
and multiple antimatter surfaces should be disjoint. |
| 1067 |
> |
If shading is desired at antimatter surfaces, it is important |
| 1068 |
> |
that the related volumes are closed with outward-facing normals. |
| 1069 |
> |
Antimatter surfaces should not intersect with other antimatter boundaries, |
| 1070 |
> |
and it is unwise to use the same modifier in nested antimatter volumes. |
| 1071 |
|
The viewpoint must be outside all volumes concerned for a correct |
| 1072 |
|
rendering. |
| 1073 |
|
.NH 3 |
| 1104 |
|
.I zdfname. |
| 1105 |
|
.DS |
| 1106 |
|
mod texdata id |
| 1107 |
< |
8+ xfunc yfunc zfunc xdfname ydfname zdfname vfname x0 x1 .. xf |
| 1107 |
> |
8+ xfunc yfunc zfunc xdfname ydfname zdfname funcfile x0 x1 .. xf |
| 1108 |
|
0 |
| 1109 |
|
n A1 A2 .. An |
| 1110 |
|
.DE |
| 1271 |
|
font such as hexbit4x1.fnt, calls for uniform spacing. |
| 1272 |
|
Reasonable magnitudes for proportional spacing are |
| 1273 |
|
between 0.1 (for tightly spaced characters) and 0.3 (for wide spacing). |
| 1274 |
+ |
.LP |
| 1275 |
+ |
.UL Spectrum |
| 1276 |
+ |
.PP |
| 1277 |
+ |
The spectrum primitive is the most basic type for introducing spectral |
| 1278 |
+ |
color to a material. |
| 1279 |
+ |
Since materials only provide RGB parameters, spectral patterns |
| 1280 |
+ |
are the only way to superimpose wavelength-dependent behavior. |
| 1281 |
+ |
.DS |
| 1282 |
+ |
mod spectrum id |
| 1283 |
+ |
0 |
| 1284 |
+ |
0 |
| 1285 |
+ |
5+ nmA nmB s1 s2 .. sN |
| 1286 |
+ |
.DE |
| 1287 |
+ |
The first two real arguments indicate the extrema of the |
| 1288 |
+ |
spectral range in nanometers. |
| 1289 |
+ |
Subsequent real values correspond to multipliers at each wavelength. |
| 1290 |
+ |
The nmA wavelength may be greater or less than nmB, |
| 1291 |
+ |
but they may not be equal, and their ordering matches |
| 1292 |
+ |
the order of the spectral values. |
| 1293 |
+ |
A minimum of 3 values must be given, which would act |
| 1294 |
+ |
more or less the same as a constant RGB multiplier. |
| 1295 |
+ |
As with RGB values, spectral quantities normally range between 0 |
| 1296 |
+ |
and 1 at each wavelength, or average to 1.0 against a standard |
| 1297 |
+ |
sensitivity functions such as V(lambda). |
| 1298 |
+ |
The best results obtain when the spectral range and number |
| 1299 |
+ |
of samples match rendering options, though resampling will handle |
| 1300 |
+ |
any differences, zero-filling wavelenths outside the nmA to nmB |
| 1301 |
+ |
range. |
| 1302 |
+ |
A warning will be issued if the given wavelength range does not |
| 1303 |
+ |
adequately cover the visible spectrum. |
| 1304 |
+ |
.LP |
| 1305 |
+ |
.UL Specfile |
| 1306 |
+ |
.PP |
| 1307 |
+ |
The specfile primitive is equivalent to the spectrum type, but |
| 1308 |
+ |
the wavelength range and values are contained in a 1-dimensional |
| 1309 |
+ |
data file. |
| 1310 |
+ |
This may be a more convenient way to specify a spectral color, |
| 1311 |
+ |
especially one corresponding to a standard illuminant such as D65 |
| 1312 |
+ |
or a library of measured spectra. |
| 1313 |
+ |
.DS |
| 1314 |
+ |
mod specfile id |
| 1315 |
+ |
1 datafile |
| 1316 |
+ |
0 |
| 1317 |
+ |
0 |
| 1318 |
+ |
.DE |
| 1319 |
+ |
As with the spectrum type, rendering wavelengths outside the defined |
| 1320 |
+ |
range will be zero-filled. |
| 1321 |
+ |
Unlike the spectrum type, the file may contain non-uniform samples. |
| 1322 |
+ |
.LP |
| 1323 |
+ |
.UL Specfunc |
| 1324 |
+ |
.PP |
| 1325 |
+ |
The specfunc primitive offers dynamic control over a spectral |
| 1326 |
+ |
pattern, similar to the colorfunc type. |
| 1327 |
+ |
.DS |
| 1328 |
+ |
mod specfunc id |
| 1329 |
+ |
2+ sfunc funcfile transform |
| 1330 |
+ |
0 |
| 1331 |
+ |
2+ nmA nmB A3 .. |
| 1332 |
+ |
.DE |
| 1333 |
+ |
Like the spectrum primitive, the wavelength range is specified |
| 1334 |
+ |
in the first two real arguments, and additional real values are |
| 1335 |
+ |
set in the evaluation context. |
| 1336 |
+ |
This function is fed a wavelenth sample |
| 1337 |
+ |
between nmA and nmB as its only argument, |
| 1338 |
+ |
and it returns the corresponding spectral intensity. |
| 1339 |
+ |
.LP |
| 1340 |
+ |
.UL Specdata |
| 1341 |
+ |
.PP |
| 1342 |
+ |
Specdata is like brightdata and colordata, but with more |
| 1343 |
+ |
than 3 specular samples. |
| 1344 |
+ |
.DS |
| 1345 |
+ |
mod specdata id |
| 1346 |
+ |
3+n+ |
| 1347 |
+ |
func datafile |
| 1348 |
+ |
funcfile x1 x2 .. xn transform |
| 1349 |
+ |
0 |
| 1350 |
+ |
m A1 A2 .. Am |
| 1351 |
+ |
.DE |
| 1352 |
+ |
The data file must have one more dimension than the coordinate |
| 1353 |
+ |
variable count, as this final dimension corresponds to the covered |
| 1354 |
+ |
spectrum. |
| 1355 |
+ |
The starting and ending wavelengths are specified in "datafile" |
| 1356 |
+ |
as well as the number of spectral samples. |
| 1357 |
+ |
The function "func" will be called with two parameters, the |
| 1358 |
+ |
interpolated spectral value for the current coordinate and the |
| 1359 |
+ |
associated wavelength. |
| 1360 |
+ |
If the spectrum is broken into 12 components, then 12 calls |
| 1361 |
+ |
will be made to "func" for the relevant ray evaluation. |
| 1362 |
+ |
.LP |
| 1363 |
+ |
.UL Specpict |
| 1364 |
+ |
.PP |
| 1365 |
+ |
Specpict is a special case of specdata, where the pattern is |
| 1366 |
+ |
a hyperspectral image stored in the common-exponent file format. |
| 1367 |
+ |
The dimensions of the image data are determined by the picture |
| 1368 |
+ |
just as with the colorpict primitive. |
| 1369 |
+ |
.DS |
| 1370 |
+ |
mod specpict id |
| 1371 |
+ |
5+ |
| 1372 |
+ |
func specfile |
| 1373 |
+ |
funcfile u v transform |
| 1374 |
+ |
0 |
| 1375 |
+ |
m A1 A2 .. Am |
| 1376 |
+ |
.DE |
| 1377 |
+ |
The function "func" is called with the interpolated pixel value |
| 1378 |
+ |
and the wavelength sample in nanometers, the same as specdata, |
| 1379 |
+ |
with as many calls made as there are components in "specfile". |
| 1380 |
|
.NH 3 |
| 1381 |
|
Mixtures |
| 1382 |
|
.PP |
| 1383 |
|
A mixture is a blend of one or more materials or textures and patterns. |
| 1384 |
+ |
Blended materials should not be light source types or virtual source types. |
| 1385 |
|
The basic types are given below. |
| 1386 |
|
.LP |
| 1387 |
|
.UL Mixfunc |
| 1403 |
|
Vname is the coefficient defined in funcfile that determines the influence |
| 1404 |
|
of foreground. |
| 1405 |
|
The background coefficient is always (1-vname). |
| 1101 |
– |
Since the references are not resolved until runtime, the last |
| 1102 |
– |
definitions of the modifier id's will be used. |
| 1103 |
– |
This can result in modifier loops, which are detected by the |
| 1104 |
– |
renderer. |
| 1406 |
|
.LP |
| 1407 |
|
.UL Mixdata |
| 1408 |
|
.PP |
| 1503 |
|
The following variables are particularly important: |
| 1504 |
|
.DS |
| 1505 |
|
Dx, Dy, Dz - incident ray direction |
| 1205 |
– |
Px, Py, Pz - intersection point |
| 1506 |
|
Nx, Ny, Nz - surface normal at intersection point |
| 1507 |
+ |
Px, Py, Pz - intersection point |
| 1508 |
+ |
T - distance from start |
| 1509 |
+ |
Ts - single ray (shadow) distance |
| 1510 |
|
Rdot - cosine between ray and normal |
| 1511 |
|
arg(0) - number of real arguments |
| 1512 |
|
arg(i) - i'th real argument |
| 1513 |
|
.DE |
| 1514 |
+ |
For mesh objects, the local surface coordinates are available: |
| 1515 |
+ |
.DS |
| 1516 |
+ |
Lu, Lv - local (u,v) coordinates |
| 1517 |
+ |
.DE |
| 1518 |
|
For BRDF types, the following variables are defined as well: |
| 1519 |
|
.DS |
| 1520 |
|
NxP, NyP, NzP - perturbed surface normal |
| 1529 |
|
variables are global, a period (`.') can be given in |
| 1530 |
|
place of the file name. |
| 1531 |
|
It is also possible to give an expression instead of a straight |
| 1532 |
< |
variable name in a scene file, although such expressions should |
| 1533 |
< |
be kept simple as they cannot contain any white space. |
| 1227 |
< |
Also, functions (requiring parameters) |
| 1532 |
> |
variable name in a scene file. |
| 1533 |
> |
Functions (requiring parameters) |
| 1534 |
|
must be given as names and not as expressions. |
| 1535 |
|
.PP |
| 1536 |
|
Constant expressions are used as an optimization in function |
| 1694 |
|
Pictures may be displayed directly under X11 using the program |
| 1695 |
|
.I ximage, |
| 1696 |
|
or converted a standard image format. |
| 1697 |
< |
.I Ra_avs |
| 1698 |
< |
converts to and from AVS image format. |
| 1393 |
< |
.I Ra_pict |
| 1394 |
< |
converts to Macintosh 32-bit PICT2 format. |
| 1697 |
> |
.I Ra_bmp |
| 1698 |
> |
converts to and from Microsoft Bitmap images. |
| 1699 |
|
.I Ra_ppm |
| 1700 |
|
converts to and from Poskanzer Portable Pixmap formats. |
| 1397 |
– |
.I Ra_pr |
| 1398 |
– |
converts to and from Sun 8-bit rasterfile format. |
| 1399 |
– |
.I Ra_pr24 |
| 1400 |
– |
converts to and from Sun 24-bit rasterfile format. |
| 1701 |
|
.I Ra_ps |
| 1702 |
|
converts to PostScript color and greyscale formats. |
| 1703 |
|
.I Ra_rgbe |
| 1713 |
|
.NH 1 |
| 1714 |
|
License |
| 1715 |
|
.PP |
| 1716 |
< |
Radiance is a registered copyright of The Regents of the University of |
| 1717 |
< |
California ("The Regents"). The Regents grant to you a nonexclusive, |
| 1718 |
< |
nontransferable license ("License") to use Radiance source code without fee. |
| 1719 |
< |
You may not sell or distribute Radiance to others without the prior express |
| 1720 |
< |
written permission of The Regents. |
| 1721 |
< |
You may compile and use this software on any machines to which you have |
| 1722 |
< |
personal access, and may share its use with others who have access to the |
| 1723 |
< |
same machines. |
| 1724 |
< |
.PP |
| 1725 |
< |
NEITHER THE UNITED STATES NOR THE UNITED STATES DEPARTMENT OF ENERGY, NOR ANY |
| 1726 |
< |
OF THEIR EMPLOYEES, MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY |
| 1727 |
< |
LEGAL LIABILITY OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR |
| 1728 |
< |
USEFULNESS OF ANY INFORMATION, APPARATUS, PRODUCT, OR PROCESS DISCLOSED, OR |
| 1729 |
< |
REPRESENTS THAT ITS USE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS. |
| 1730 |
< |
By downloading, using or copying this software, you agree to abide by the |
| 1731 |
< |
intellectual property laws and all other applicable laws of the United |
| 1732 |
< |
States, and by the terms of this License Agreement. Ownership of the software |
| 1733 |
< |
shall remain solely in The Regents. |
| 1734 |
< |
The Regents shall have the right to terminate this License immediately by |
| 1735 |
< |
written notice upon your breach of, or noncompliance with, any of its terms. |
| 1736 |
< |
You shall be liable for any infringement or damages resulting from your |
| 1737 |
< |
failure to abide by the terms of this License Agreement. |
| 1738 |
< |
.PP |
| 1739 |
< |
NOTICE: The Government is granted for itself and others acting on its behalf |
| 1740 |
< |
a paid-up, nonexclusive irrevocable worldwide license in this data to |
| 1741 |
< |
reproduce, prepare derivative works, and perform publicly and display |
| 1742 |
< |
publicly. Beginning five (5) years after permission to assert copyright is |
| 1743 |
< |
granted, subject to two possible five year renewals, the Government is |
| 1744 |
< |
granted for itself and others acting on its behalf a paid-up, non-exclusive, |
| 1745 |
< |
irrevocable worldwide license in this data to reproduce, prepare derivative |
| 1746 |
< |
works, distribute copies to the public, perform publicly and display |
| 1747 |
< |
publicly, and to permit others to do so. |
| 1716 |
> |
.DS |
| 1717 |
> |
The Radiance Software License, Version 2.0 |
| 1718 |
> |
|
| 1719 |
> |
Radiance v6.0 Copyright (c) 1990 to 2025, The Regents of the University of |
| 1720 |
> |
California, through Lawrence Berkeley National Laboratory (subject to receipt |
| 1721 |
> |
of any required approvals from the U.S. Dept. of Energy). All rights reserved. |
| 1722 |
> |
|
| 1723 |
> |
Redistribution and use in source and binary forms, with or without |
| 1724 |
> |
modification, are permitted provided that the following conditions are met: |
| 1725 |
> |
|
| 1726 |
> |
(1) Redistributions of source code must retain the above copyright notice, |
| 1727 |
> |
this list of conditions and the following disclaimer. |
| 1728 |
> |
|
| 1729 |
> |
(2) Redistributions in binary form must reproduce the above copyright |
| 1730 |
> |
notice, this list of conditions and the following disclaimer in the |
| 1731 |
> |
documentation and/or other materials provided with the distribution. |
| 1732 |
> |
|
| 1733 |
> |
(3) Neither the name of the University of California, Lawrence Berkeley |
| 1734 |
> |
National Laboratory, U.S. Dept. of Energy nor the names of its contributors |
| 1735 |
> |
may be used to endorse or promote products derived from this software |
| 1736 |
> |
without specific prior written permission. |
| 1737 |
> |
|
| 1738 |
> |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| 1739 |
> |
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 1740 |
> |
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 1741 |
> |
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
| 1742 |
> |
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 1743 |
> |
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 1744 |
> |
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 1745 |
> |
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 1746 |
> |
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 1747 |
> |
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 1748 |
> |
POSSIBILITY OF SUCH DAMAGE. |
| 1749 |
> |
|
| 1750 |
> |
You are under no obligation whatsoever to provide any bug fixes, patches, |
| 1751 |
> |
or upgrades to the features, functionality or performance of the source |
| 1752 |
> |
code ("Enhancements") to anyone; however, if you choose to make your |
| 1753 |
> |
Enhancements available either publicly, or directly to Lawrence Berkeley |
| 1754 |
> |
National Laboratory, without imposing a separate written license agreement |
| 1755 |
> |
for such Enhancements, then you hereby grant the following license: a |
| 1756 |
> |
non-exclusive, royalty-free perpetual license to install, use, modify, |
| 1757 |
> |
prepare derivative works, incorporate into other computer software, |
| 1758 |
> |
distribute, and sublicense such enhancements or derivative works thereof, |
| 1759 |
> |
in binary and source code form. |
| 1760 |
> |
.DE |
| 1761 |
|
.NH 1 |
| 1762 |
|
Acknowledgements |
| 1763 |
|
.PP |
| 1773 |
|
in Lausanne, Switzerland. |
| 1774 |
|
.NH 1 |
| 1775 |
|
References |
| 1776 |
+ |
.LP |
| 1777 |
+ |
Ward, Gregory J., Bruno Bueno, David Geisler-Moroder, |
| 1778 |
+ |
Lars O. Grobe, Jacob C. Jonsson, Eleanor |
| 1779 |
+ |
S. Lee, Taoning Wang, Helen Rose Wilson, |
| 1780 |
+ |
``Daylight Simulation Workflows Incorporating |
| 1781 |
+ |
Measured Bidirectional Scattering Distribution Functions,'' |
| 1782 |
+ |
.I "Energy & Buildings", |
| 1783 |
+ |
Vol. 259, No. 111890, 2022. |
| 1784 |
+ |
.LP |
| 1785 |
+ |
Wang, Taoning, Gregory Ward, Eleanor Lee, |
| 1786 |
+ |
``Efficient modeling of optically-complex, non-coplanar |
| 1787 |
+ |
exterior shading: Validation of matrix algebraic methods,'' |
| 1788 |
+ |
.I "Energy & Buildings", |
| 1789 |
+ |
vol. 174, pp. 464-83, Sept. 2018. |
| 1790 |
+ |
.LP |
| 1791 |
+ |
Lee, Eleanor S., David Geisler-Moroder, Gregory Ward, |
| 1792 |
+ |
``Modeling the direct sun component in buildings using matrix |
| 1793 |
+ |
algebraic approaches: Methods and validation,'' |
| 1794 |
+ |
.I Solar Energy, |
| 1795 |
+ |
vol. 160, 15 January 2018, pp 380-395. |
| 1796 |
+ |
.LP |
| 1797 |
+ |
Ward, G., M. Kurt & N. Bonneel, |
| 1798 |
+ |
``Reducing Anisotropic BSDF Measurement to Common Practice,'' |
| 1799 |
+ |
.I Workshop on Material Appearance Modeling, |
| 1800 |
+ |
2014. |
| 1801 |
+ |
.LP |
| 1802 |
+ |
McNeil, A., C.J. Jonsson, D. Appelfeld, G. Ward, E.S. Lee, |
| 1803 |
+ |
``A validation of a ray-tracing tool used to generate |
| 1804 |
+ |
bi-directional scattering distribution functions for |
| 1805 |
+ |
complex fenestration systems,'' |
| 1806 |
+ |
.I "Solar Energy", |
| 1807 |
+ |
98, 404-14, November 2013. |
| 1808 |
+ |
.LP |
| 1809 |
+ |
Ward, G., R. Mistrick, E.S. Lee, A. McNeil, J. Jonsson, |
| 1810 |
+ |
``Simulating the Daylight Performance of Complex Fenestration Systems |
| 1811 |
+ |
Using Bidirectional Scattering Distribution Functions within Radiance,'' |
| 1812 |
+ |
.I "Leukos", |
| 1813 |
+ |
7(4), |
| 1814 |
+ |
April 2011. |
| 1815 |
+ |
.LP |
| 1816 |
+ |
Cater, K., A. Chalmers, G. Ward, |
| 1817 |
+ |
``Detail to Attention: Exploiting Visual Tasks for Selective Rendering,'' |
| 1818 |
+ |
.I "Eurograhics Symposium on Rendering", |
| 1819 |
+ |
June 2003. |
| 1820 |
+ |
.LP |
| 1821 |
+ |
Ward, G., Elena Eydelberg-Vileshin, |
| 1822 |
+ |
``Picture Perfect RGB Rendering Using Spectral Prefiltering and |
| 1823 |
+ |
Sharp Color Primaries,'' |
| 1824 |
+ |
13th Eurographics Workshop on Rendering, P. Debevec and |
| 1825 |
+ |
S. Gibson (Editors), June 2002. |
| 1826 |
+ |
.LP |
| 1827 |
+ |
Ward, G. and M. Simmons, |
| 1828 |
+ |
``The Holodeck Ray Cache: An Interactive Rendering System for Global |
| 1829 |
+ |
Illumination in Nondiffuse Environments,'' |
| 1830 |
+ |
.I "ACM Transactions on Graphics," |
| 1831 |
+ |
18(4):361-98, October 1999. |
| 1832 |
+ |
.LP |
| 1833 |
+ |
Larson, G.W., H. Rushmeier, C. Piatko, |
| 1834 |
+ |
``A Visibility Matching Tone Reproduction Operator for High Dynamic |
| 1835 |
+ |
Range Scenes,'' |
| 1836 |
+ |
.I "IEEE Transactions on Visualization and Computer Graphics", |
| 1837 |
+ |
3(4), 291-306, December 1997. |
| 1838 |
+ |
.LP |
| 1839 |
+ |
Ward, G., |
| 1840 |
+ |
``Making Global Illumination User Friendly,'' |
| 1841 |
+ |
.I "Sixth Eurographics Workshop on Rendering", |
| 1842 |
+ |
proceedings to be published by Springer-Verlag, |
| 1843 |
+ |
Dublin, Ireland, June 1995. |
| 1844 |
+ |
.LP |
| 1845 |
+ |
Rushmeier, H., G. Ward, C. Piatko, P. Sanders, B. Rust, |
| 1846 |
+ |
``Comparing Real and Synthetic Images: Some Ideas about Metrics,'' |
| 1847 |
+ |
.I "Sixth Eurographics Workshop on Rendering", |
| 1848 |
+ |
proceedings to be published by Springer-Verlag, |
| 1849 |
+ |
Dublin, Ireland, June 1995. |
| 1850 |
|
.LP |
| 1851 |
|
Ward, G., |
| 1852 |
|
``The Radiance Lighting Simulation and Rendering System,'' |