ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/doc/ray.1
(Generate patch)

Comparing ray/doc/ray.1 (file contents):
Revision 1.14 by greg, Wed Apr 30 22:00:28 2008 UTC vs.
Revision 1.48 by greg, Thu May 29 16:42:28 2025 UTC

# Line 1 | Line 1
1 < .\" RCSid "$Id"
1 > .\" RCSid "$Id$"
2   .\" Print using the -ms macro package
3 < .DA 4/30/2008
3 > .DA 12/09/2024
4   .LP
5 < .tl """Copyright \(co 2008 Regents, University of California
5 > .tl """Copyright \(co 2024 Regents, University of California
6   .sp 2
7   .TL
8   The
# Line 422 | Line 422 | mod mirror id
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
# Line 491 | Line 508 | a perfectly scattering medium (no absorption).
508   The scattering eccentricity parameter will likewise override the global
509   setting if it is present.
510   Scattering eccentricity indicates how much scattered light favors the
511 < forward direction, as fit by the Heyney-Greenstein function:
511 > forward direction, as fit by the Henyey-Greenstein function:
512   .DS
513   P(theta) = (1 - g*g) / (1 + g*g - 2*g*cos(theta))^1.5
514   .DE
# Line 622 | Line 639 | mod trans2 id
639   8 red green blue spec urough vrough trans tspec
640   .DE
641   .LP
642 + .UL Ashik2
643 + .PP
644 + Ashik2 is the anisotropic reflectance model by Ashikhmin & Shirley.
645 + The string arguments are the same as for plastic2, but the real
646 + arguments have additional flexibility to specify the specular color.
647 + Also, rather than roughness, specular power is used, which has no
648 + physical meaning other than larger numbers are equivalent to a smoother
649 + surface.
650 + Unlike other material types, total reflectance is the sum of
651 + diffuse and specular colors, and should be adjusted accordingly.
652 + .DS
653 + mod ashik2 id
654 + 4+ ux uy uz funcfile transform
655 + 0
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
# Line 865 | Line 957 | mod transdata id
957   6+ red green blue rspec trans tspec A7 ..
958   .DE
959   .LP
960 + .UL BSDF
961 + .PP
962 + The BSDF material type loads an XML (eXtensible Markup Language)
963 + file describing a bidirectional scattering distribution function.
964 + Real arguments to this material may define additional
965 + diffuse components that augment the BSDF data.
966 + String arguments are used to define thickness for proxied
967 + surfaces and the "up" orientation for the material.
968 + .DS
969 + mod BSDF id
970 + 6+ thick BSDFfile ux uy uz funcfile transform
971 + 0
972 + 0|3|6|9
973 +     rfdif gfdif bfdif
974 +     rbdif gbdif bbdif
975 +     rtdif gtdif btdif
976 + .DE
977 + The first string argument is a "thickness" parameter that may be used
978 + to hide detail geometry being proxied by an aggregate BSDF material.
979 + If a view or shadow ray hits a BSDF proxy with non-zero thickness,
980 + it will pass directly through as if the surface were not there.
981 + Similar to the illum type, this permits direct viewing and
982 + shadow testing of complex geometry.
983 + The BSDF is used when a scattered (indirect) ray hits the surface,
984 + and any transmitted sample rays will be offset by the thickness amount
985 + to avoid the hidden geometry and gather samples from the other side.
986 + In this manner, BSDF surfaces can improve the results for indirect
987 + scattering from complex systems without sacrificing appearance or
988 + shadow accuracy.
989 + If the BSDF has transmission and back-side reflection data,
990 + a parallel BSDF surface may be
991 + placed slightly less than the given thickness away from the front surface
992 + to enclose the complex geometry on both sides.
993 + The sign of the thickness is important, as it indicates whether the
994 + proxied geometry is behind the BSDF surface (when thickness is positive)
995 + or in front (when thickness is negative).
996 + .LP
997 + The second string argument is the name of the BSDF file, which is
998 + found in the usual auxiliary locations.
999 + The following three string parameters name variables for an "up" vector,
1000 + which together with the surface normal, define the
1001 + local coordinate system that orients the BSDF.
1002 + These variables, along with the thickness, are defined in a function
1003 + file given as the next string argument.
1004 + An optional transform is used to scale the thickness and reorient the up vector.
1005 + .LP
1006 + If no real arguments are given, the BSDF is used by itself to determine
1007 + reflection and transmission.
1008 + If there are at least 3 real arguments, the first triplet is an
1009 + additional diffuse reflectance for the front side.
1010 + At least 6 real arguments adds diffuse reflectance to the rear side of the surface.
1011 + If there are 9 real arguments, the final triplet will be taken as an additional
1012 + diffuse transmittance.
1013 + All diffuse components as well as the non-diffuse transmission are
1014 + modified by patterns applied to this material.
1015 + The non-diffuse reflection from either side are unaffected.
1016 + Textures perturb the effective surface normal in the usual way.
1017 + .LP
1018 + The surface normal of this type is not altered to face the incoming ray,
1019 + so the front and back BSDF reflections may differ.
1020 + (Transmission is identical front-to-back by physical law.)\0
1021 + If back visibility is turned off during rendering and there is no
1022 + transmission or back-side reflection, only then the surface will be
1023 + invisible from behind.
1024 + Unlike other data-driven material types, the BSDF type is fully
1025 + supported and all parts of the distribution are properly sampled.
1026 + .LP
1027 + .UL aBSDF
1028 + .PP
1029 + The aBSDF material is identical to the BSDF type with two important
1030 + differences.
1031 + First, proxy geometry is not supported, so there is no thickness parameter.
1032 + Second, an aBSDF is assumed to have some specular through component
1033 + (the 'a' stands for "aperture"), which
1034 + is treated specially during the direct calculation and when viewing the
1035 + material.
1036 + Based on the BSDF data, the coefficient of specular transmission is
1037 + determined and used for modifying unscattered shadow and view rays.
1038 + .DS
1039 + mod aBSDF id
1040 + 5+ BSDFfile ux uy uz funcfile transform
1041 + 0
1042 + 0|3|6|9
1043 +     rfdif gfdif bfdif
1044 +     rbdif gbdif bbdif
1045 +     rtdif gtdif btdif
1046 + .DE
1047 + .LP
1048 + If a material has no specular transmitted component, it is much better
1049 + to use the BSDF type with a zero thickness than to use aBSDF.
1050 + .LP
1051   .UL Antimatter
1052   .PP
1053   Antimatter is a material that can "subtract" volumes from other volumes.
# Line 879 | Line 1062 | N mod1 mod2 .. modN
1062   The first modifier will also be used to shade the area leaving the
1063   antimatter volume and entering the regular volume.
1064   If mod1 is void, the antimatter volume is completely invisible.
1065 < Antimatter does not work properly with the material type "trans",
1066 < and multiple antimatter surfaces should be disjoint.
1065 > If shading is desired at antimatter surfaces, it is important
1066 > that the related volumes are closed with outward-facing normals.
1067 > Antimatter surfaces should not intersect with other antimatter boundaries,
1068 > and it is unwise to use the same modifier in nested antimatter volumes.
1069   The viewpoint must be outside all volumes concerned for a correct
1070   rendering.
1071   .NH 3
# Line 1084 | Line 1269 | A section of text meant to depict a picture, perhaps u
1269   font such as hexbit4x1.fnt, calls for uniform spacing.
1270   Reasonable magnitudes for proportional spacing are
1271   between 0.1 (for tightly spaced characters) and 0.3 (for wide spacing).
1272 + .LP
1273 + .UL Spectrum
1274 + .PP
1275 + The spectrum primitive is the most basic type for introducing spectral
1276 + color to a material.
1277 + Since materials only provide RGB parameters, spectral patterns
1278 + are the only way to superimpose wavelength-dependent behavior.
1279 + .DS
1280 + mod spectrum id
1281 + 0
1282 + 0
1283 + 5+ nmA nmB s1 s2 .. sN
1284 + .DE
1285 + The first two real arguments indicate the extrema of the
1286 + spectral range in nanometers.
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.
1291 + A minimum of 3 values must be given, which would act
1292 + more or less the same as a constant RGB multiplier.
1293 + As with RGB values, spectral quantities normally range between 0
1294 + and 1 at each wavelength, or average to 1.0 against a standard
1295 + sensitivity functions such as V(lambda).
1296 + The best results obtain when the spectral range and number
1297 + of samples match rendering options, though resampling will handle
1298 + any differences, zero-filling wavelenths outside the nmA to nmB
1299 + range.
1300 + A warning will be issued if the given wavelength range does not
1301 + adequately cover the visible spectrum.
1302 + .LP
1303 + .UL Specfile
1304 + .PP
1305 + The specfile primitive is equivalent to the spectrum type, but
1306 + the wavelength range and values are contained in a 1-dimensional
1307 + data file.
1308 + This may be a more convenient way to specify a spectral color,
1309 + especially one corresponding to a standard illuminant such as D65
1310 + or a library of measured spectra.
1311 + .DS
1312 + mod specfile id
1313 + 1 datafile
1314 + 0
1315 + 0
1316 + .DE
1317 + As with the spectrum type, rendering wavelengths outside the defined
1318 + range will be zero-filled.
1319 + Unlike the spectrum type, the file may contain non-uniform samples.
1320 + .LP
1321 + .UL Specfunc
1322 + .PP
1323 + The specfunc primitive offers dynamic control over a spectral
1324 + pattern, similar to the colorfunc type.
1325 + .DS
1326 + mod specfunc id
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 + 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
1381   A mixture is a blend of one or more materials or textures and patterns.
1382 + Blended materials should not be light source types or virtual source types.
1383   The basic types are given below.
1384   .LP
1385   .UL Mixfunc
# Line 1400 | Line 1692 | converts a picture to and from simpler formats.
1692   Pictures may be displayed directly under X11 using the program
1693   .I ximage,
1694   or converted a standard image format.
1695 < .I Ra_avs
1696 < converts to and from AVS image format.
1405 < .I Ra_pict
1406 < converts to Macintosh 32-bit PICT2 format.
1695 > .I Ra_bmp
1696 > converts to and from Microsoft Bitmap images.
1697   .I Ra_ppm
1698   converts to and from Poskanzer Portable Pixmap formats.
1409 .I Ra_pr
1410 converts to and from Sun 8-bit rasterfile format.
1411 .I Ra_pr24
1412 converts to and from Sun 24-bit rasterfile format.
1699   .I Ra_ps
1700   converts to PostScript color and greyscale formats.
1701   .I Ra_rgbe
# Line 1490 | Line 1776 | the Ecole Polytechnique Federale de Lausanne (EPFL Uni
1776   in Lausanne, Switzerland.
1777   .NH 1
1778   References
1779 + .LP
1780 + Ward, Gregory J., Bruno Bueno, David Geisler-Moroder,
1781 + Lars O. Grobe, Jacob C. Jonsson, Eleanor
1782 + S. Lee, Taoning Wang, Helen Rose Wilson,
1783 + ``Daylight Simulation Workflows Incorporating
1784 + Measured Bidirectional Scattering Distribution Functions,''
1785 + .I "Energy & Buildings",
1786 + Vol. 259, No. 111890, 2022.
1787 + .LP
1788 + Wang, Taoning, Gregory Ward, Eleanor Lee,
1789 + ``Efficient modeling of optically-complex, non-coplanar
1790 + exterior shading: Validation of matrix algebraic methods,''
1791 + .I "Energy & Buildings",
1792 + vol. 174, pp. 464-83, Sept. 2018.
1793 + .LP
1794 + Lee, Eleanor S., David Geisler-Moroder, Gregory Ward,
1795 + ``Modeling the direct sun component in buildings using matrix
1796 + algebraic approaches: Methods and validation,''
1797 + .I Solar Energy,
1798 + vol. 160, 15 January 2018, pp 380-395.
1799 + .LP
1800 + Ward, G., M. Kurt & N. Bonneel,
1801 + ``Reducing Anisotropic BSDF Measurement to Common Practice,''
1802 + .I Workshop on Material Appearance Modeling,
1803 + 2014.
1804 + .LP
1805 + McNeil, A., C.J. Jonsson, D. Appelfeld, G. Ward, E.S. Lee,
1806 + ``A validation of a ray-tracing tool used to generate
1807 + bi-directional scattering distribution functions for
1808 + complex fenestration systems,''
1809 + .I "Solar Energy",
1810 + 98, 404-14, November 2013.
1811 + .LP
1812 + Ward, G., R. Mistrick, E.S. Lee, A. McNeil, J. Jonsson,
1813 + ``Simulating the Daylight Performance of Complex Fenestration Systems
1814 + Using Bidirectional Scattering Distribution Functions within Radiance,''
1815 + .I "Leukos",
1816 + 7(4),
1817 + April 2011.
1818   .LP
1819   Cater, K., A. Chalmers, G. Ward,
1820   ``Detail to Attention: Exploiting Visual Tasks for Selective Rendering,''

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines