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

Comparing ray/doc/ray.html (file contents):
Revision 1.27 by greg, Mon Oct 8 20:04:09 2018 UTC vs.
Revision 1.40 by greg, Fri Dec 13 18:17:17 2024 UTC

# Line 2 | Line 2
2   <!-- RCSid $Id$ -->
3   <head>
4   <title>
5 < The RADIANCE 5.2 Synthetic Imaging System
5 > The RADIANCE 6.0 Synthetic Imaging System
6   </title>
7   </head>
8   <body>
# Line 10 | Line 10 | The RADIANCE 5.2 Synthetic Imaging System
10   <p>
11  
12   <h1>
13 < The RADIANCE 5.2 Synthetic Imaging System
13 > The RADIANCE 6.0 Synthetic Imaging System
14   </h1>
15  
16   <p>
# Line 83 | Line 83 | The diagram in Figure 1 shows the flow between program
83   (ovals).  
84   The central program is <i>rpict</i>, which produces a picture from a scene
85   description.
86 < <i>Rview</i> is a  variation  of  rpict  that  computes  and displays images
86 > <i>Rvu</i> is a  variation  of  rpict  that  computes  and displays images
87   interactively, and rtrace computes single ray values.
88   Other programs (not shown) connect many of these elements together,
89   such as the executive programs
# Line 148 | Line 148 | It is stored as ASCII  text,  with  the  following bas
148           ...
149   </pre>
150  
151 + <p>
152 +
153   A comment line begins with a pound sign, `#'.
154  
155   <p>
# Line 394 | Line 396 | The basic types are given below.
396          0
397   </pre>
398  
399 + <p>
400          If the modifier is &quot;void&quot;, then surfaces will
401          use the modifiers  given  in  the  original  description.  
402          Otherwise, the modifier specified is used in their  place.  
# Line 438 | Line 441 | The basic types are given below.
441          0
442   </pre>
443  
444 + <p>
445 +
446          If the modifier is &quot;void&quot;, then surfaces will
447          use the modifiers  given  in  the  original  mesh description.  
448          Otherwise, the modifier specified is used in their  place.  
# Line 532 | Line 537 | A material defines the way light interacts with a  sur
537          4 red green blue maxrad
538   </pre>
539  
540 + <p>
541          If maxrad is zero, then the surface will never be tested for shadow,  although  it  may participate in an interreflection calculation.  
542          If maxrad is negative, then the  surface  will never  contribute  to scene illumination.  
543          Glow sources will never illuminate objects on the other side of an illum  surface.  
# Line 603 | Line 609 | This is only appropriate if the surface hides other (m
609          n A1 A2 .. An
610   </pre>
611  
612 + <p>
613 +
614          The new direction variables dx, dy and dz need not produce a normalized  vector.  
615          For convenience, the variables DxA, DyA and DzA are defined as the normalized direction to the  target  light  source.  
616          See <a HREF="#Function">section 2.2.1</a> on function files for further information.
# Line 646 | Line 654 | This is only appropriate if the surface hides other (m
654          3  source1  mirror1&gt;source10  mirror2&gt;mirror1&gt;source3
655   </pre>
656  
657 + <p>
658   Normally, only one source is given per mist material, and there is an
659   upper limit of 32 to the total number of active scattering sources.
660   The extinction coefficient, if given, is added the the global
# Line 666 | Line 675 | forward direction, as fit by the Henyey-Greenstein fun
675          P(theta) = (1 - g*g) / (1 + g*g - 2*g*cos(theta))^1.5
676   </pre>
677  
678 + <p>
679 +
680   A perfectly isotropic scattering medium has a g parameter of 0, and
681   a highly directional material has a g parameter close to 1.
682   Fits to the g parameter may be found along with typical extinction
# Line 680 | Line 691 | cloud types in USGS meteorological tables.
691          0|3|6|7 [ rext gext bext [ ralb galb balb [ g ] ] ]
692   </pre>
693  
694 + <p>
695 +
696   There are two usual uses of the mist type.
697   One is to surround a beam from a spotlight or laser so that it is
698   visible during rendering.
# Line 822 | Line 835 | unless the line integrals consider enclosed geometry.
835          Also, rather than roughness, specular power is used, which has no
836          physical meaning other than larger numbers are equivalent to a smoother
837          surface.
838 +        Unlike other material types, total reflectance is the sum of
839 +        diffuse and specular colors, and should be adjusted accordingly.
840   <pre>
841          mod ashik2 id
842          4+ ux uy uz funcfile transform
# Line 832 | Line 847 | unless the line integrals consider enclosed geometry.
847   <p>
848  
849   <dt>
850 +        <a NAME="WGMDfunc">
851 +        <b>WGMDfunc</b>
852 +        </a>
853 +
854 + <dd>
855 +        WGMDfunc is a more programmable version of <a HREF="#Trans2">trans2</a>,
856 +        with separate modifier paths and variables to control each component.
857 +        (WGMD stands for Ward-Geisler-Moroder-Duer, which is the basis for
858 +        this empirical model, similar to previous ones beside Ashik2.)
859 +        The specification of this material is given below.
860 + <pre>
861 +        mod WGMDfunc id
862 +        13+ rs_mod  rs  rs_urough rs_vrough
863 +            ts_mod  ts  ts_urough ts_vrough
864 +            td_mod
865 +            ux uy uz  funcfile  transform
866 +        0
867 +        9+  rfdif gfdif bfdif
868 +            rbdif gbdif bbdif
869 +            rtdif gtdif btdif
870 +            A10 ..
871 + </pre>
872 +
873 + <p>
874 +
875 + The sum of specular reflectance (<I>rs</I>), specular transmittance (<I>ts</I>),
876 + diffuse reflectance (<I>rfdif gfdif bfdif</I> for front and <I>rbdif gbdif bbdif</I> for back)
877 + and diffuse transmittance (<I>rtdif gtdif btdif</I>) should be less than 1 for each
878 + channel.
879 +
880 + <p>
881 +
882 + Unique to this material, separate modifier channels are
883 + provided for each component.
884 + The main modifier is used on the diffuse reflectance, both
885 + front and back.
886 + The <I>rs_mod</I> modifier is used for specular reflectance.
887 + If "void" is given for <I>rs_mod</I>,
888 + then the specular reflection color will be white.
889 + The special "inherit" keyword may also be given, in which case
890 + specular reflectance will share the main modifier.
891 + This behavior is replicated for the specular transmittance modifier
892 + <I>ts_mod</I>, which also has its own independent roughness expressions.
893 + Finally, the diffuse transmittance modifier is given as
894 + <I>td_mod</I>, which may also be "void" or "inherit".
895 + Note that any spectra or color for specular components must be
896 + carried by the named modifier(s).
897 +
898 + <p>
899 +
900 + The main advantage to this material over
901 + <a HREF="#BRTDfunc">BRTDfunc</a> and
902 + other programmable types described below is that the specular sampling is
903 + well-defined, so that all components are fully computed.
904 +
905 + <p>
906 +
907 + <dt>
908          <a NAME="Dielectric">
909          <b>Dielectric</b>
910          </a>
# Line 892 | Line 965 | unless the line integrals consider enclosed geometry.
965          tn = (sqrt(.8402528435+.0072522239*Tn*Tn)-.9166530661)/.0036261119/Tn
966   </pre>
967  
968 + <p>
969 +
970          Standard 88% transmittance glass  has  a  transmissivity  of 0.96.  
971          (A <a HREF="#Patterns">pattern</a> modifying glass will affect the transmissivity.)
972          If a fourth real argument is given,  it  is  interpreted as the index of refraction to use instead of 1.52.
# Line 923 | Line 998 | unless the line integrals consider enclosed geometry.
998          4+ red green blue spec A5 ..
999   </pre>
1000  
1001 + <p>
1002 +
1003          The function refl takes four arguments, the x, y and z
1004          direction towards the incident light, and the solid angle
1005          subtended by the source.
# Line 964 | Line 1041 | unless the line integrals consider enclosed geometry.
1041          6+ red green blue rspec trans tspec A7 ..
1042   </pre>
1043  
1044 + <p>
1045 +
1046          Where trans is the total light transmitted and tspec is  the non-Lambertian  fraction of transmitted light.  
1047          The function brtd should integrate to 1 over each projected hemisphere.
1048  
# Line 991 | Line 1070 | unless the line integrals consider enclosed geometry.
1070               A10 ..
1071   </pre>
1072  
1073 + <p>
1074 +
1075          The variables rrefl, grefl and brefl specify the color coefficients  for  the ideal specular (mirror) reflection of the surface.  
1076          The variables rtrns, gtrns and btrns  specify  the color coefficients for the ideal specular transmission.  
1077          The functions rbrtd, gbrtd and bbrtd take the direction to the incident light (and its solid angle) and  
# Line 1035 | Line 1116 | unless the line integrals consider enclosed geometry.
1116          4+ red green blue spec A5 ..
1117   </pre>
1118  
1119 + <p>
1120 +
1121          The coordinate indices (x1, x2, etc.) are  themselves  functions  of  the  x,  y and z direction to the incident light, plus the solid angle
1122          subtended by the light source (usually ignored).
1123          The data function (func) takes five variables, the
# Line 1201 | Line 1284 | unless the line integrals consider enclosed geometry.
1284          0
1285   </pre>
1286  
1287 + <p>
1288 +
1289          The first modifier will also be used to shade  the  area  leaving the  antimatter  volume and entering the regular volume.  
1290          If mod1 is void, the antimatter volume is completely invisible.
1291          Antimatter  does  not  work  properly with the material type <a HREF="#Trans">&quot;trans&quot;</a>,
# Line 1255 | Line 1340 | A texture is a perturbation of the surface normal,  an
1340          n A1 A2 .. An
1341   </pre>
1342  
1343 + <p>
1344 +
1345   </dl>
1346  
1347   <p>
# Line 1394 | Line 1481 | A colorfunc is a procedurally  defined  color  pattern
1481                  [spacing]
1482   </pre>
1483  
1484 + <p>
1485 +
1486   or:
1487  
1488   <pre>
# Line 1431 | Line 1520 | or:
1520                  [spacing]
1521   </pre>
1522  
1523 + <p>
1524 +
1525   or:
1526  
1527   <pre>
# Line 1459 | Line 1550 | or:
1550          A section of text meant to  depict  a  picture, perhaps using a special purpose font such as hexbit4x1.fnt, calls for uniform  spacing.  
1551          Reasonable  magnitudes  for  proportional  spacing are between 0.1 (for tightly spaced characters) and 0.3 (for wide spacing).
1552  
1553 + <p>
1554 +
1555 + <dt>
1556 +        <a NAME="Spectrum">
1557 +        <b>Spectrum</b>
1558 +        </a>
1559 +
1560 + <dd>
1561 +        The spectrum primitive is the most basic type for introducing spectral
1562 +        color to a material.
1563 +        Since materials only provide RGB parameters, spectral patterns
1564 +        are the only way to superimpose wavelength-dependent behavior.
1565 +
1566 + <pre>
1567 +        mod spectrum id
1568 +        0
1569 +        0
1570 +        5+ nmA nmB s1 s2 .. sN
1571 + </pre>
1572 +
1573 + <p>
1574 +        The first two real arguments indicate the extrema of the
1575 +        spectral range in nanometers.
1576 +        Subsequent real values correspond to multipliers at each wavelength.
1577 +        The nmA wavelength may be greater or less than nmB,
1578 +        but they may not be equal, and their ordering matches
1579 +        the order of the spectral values.
1580 +        A minimum of 3 values must be given, which would act
1581 +        more or less the same as a constant RGB multiplier.
1582 +        As with RGB values, spectral quantities normally range between 0
1583 +        and 1 at each wavelength, or average to 1.0 against a standard
1584 +        sensitivity functions such as V(lambda).
1585 +        The best results obtain when the spectral range and number
1586 +        of samples match rendering options, though resampling will handle
1587 +        any differences, zero-filling wavelenths outside the nmA to nmB
1588 +        range.
1589 +        A warning will be issued if the given wavelength range does not
1590 +        adequately cover the visible spectrum.
1591 +
1592 + <p>
1593 +
1594 + <dt>
1595 +        <a NAME="Specfile">
1596 +        <b>Specfile</b>
1597 +        </a>
1598 +
1599 + <dd>
1600 +        The specfile primitive is equivalent to the spectrum type, but
1601 +        the wavelength range and values are contained in a 1-dimensional
1602 +        data file.
1603 +        This may be a more convenient way to specify a spectral color,
1604 +        especially one corresponding to a standard illuminant such as D65
1605 +        or a library of measured spectra.
1606 +
1607 + <pre>
1608 +        mod specfile id
1609 +        1 datafile
1610 +        0
1611 +        0
1612 + </pre>
1613 +
1614 + <p>
1615 +        As with the spectrum type, rendering wavelengths outside the defined
1616 +        range will be zero-filled.
1617 +        Unlike the spectrum type, the file may contain non-uniform samples.
1618 +
1619 + <p>
1620 +
1621 + <dt>
1622 +        <a NAME="Specfunc">
1623 +        <b>Specfunc</b>
1624 +        </a>
1625 +
1626 + <dd>
1627 +        The specfunc primitive offers dynamic control over a spectral
1628 +        pattern, similar to the colorfunc type.
1629 +
1630 + <pre>
1631 +        mod specfunc id
1632 +        2+ sfunc funcfile transform
1633 +        0
1634 +        2+ nmA nmB A3 ..
1635 + </pre>
1636 +
1637 + <p>
1638 +        Like the spectrum primitive, the wavelength range is specified
1639 +        in the first two real arguments, and additional real values are
1640 +        set in the evaluation context.
1641 +        This function is fed a wavelenth sample
1642 +        between nmA and nmB as its only argument,
1643 +        and it returns the corresponding spectral intensity.
1644 +
1645 + <dt>
1646 +       <a NAME="Specdata">
1647 +       <b>Specdata</b>
1648 +       </a>
1649 +
1650 + <dd>
1651 +        Specdata is like brightdata and colordata, but with more
1652 +        than 3 specular samples.
1653 +
1654 + <pre>
1655 +        mod specdata id
1656 +        3+n+
1657 +                func datafile
1658 +                funcfile x1 x2 .. xn transform
1659 +        0
1660 +        m A1 A2 .. Am
1661 + </pre>
1662 +
1663 + <p>
1664 +        The data file must have one more dimension than the coordinate
1665 +        variable count, as this final dimension corresponds to the covered
1666 +        spectrum.
1667 +        The starting and ending wavelengths are specified in "datafile"
1668 +        as well as the number of spectral samples.
1669 +        The function "func" will be called with two parameters, the
1670 +        interpolated spectral value for the current coordinate and the
1671 +        associated wavelength.
1672 +        If the spectrum is broken into 12 components, then 12 calls
1673 +        will be made to "func" for the relevant ray evaluation.
1674 +
1675 + <dt>
1676 +       <a NAME="Specpict">
1677 +       <b>Specpict</b>
1678 +       </a>
1679 +
1680 + <dd>
1681 +        Specpict is a special case of specdata, where the pattern is
1682 +        a hyperspectral image stored in the common-exponent file format.
1683 +        The dimensions of the image data are determined by the picture
1684 +        just as with the colorpict primitive.
1685 +
1686 + <pre>
1687 +        mod specpict id
1688 +        5+
1689 +                func specfile
1690 +                funcfile u v transform
1691 +        0
1692 +        m A1 A2 .. Am
1693 + </pre>
1694 +
1695 + <p>
1696 +        The function "func" is called with the interpolated pixel value
1697 +        and the wavelength sample in nanometers, the same as specdata,
1698 +        with as many calls made as there are components in "specfile".
1699 +
1700   </dl>
1701  
1702   <p>
# Line 1491 | Line 1729 | A mixfunc mixes  two  modifiers  procedurally.   It  i
1729          n A1 A2 .. An
1730   </pre>
1731  
1732 + <p>
1733 +
1734          Foreground and background are modifier names that must be
1735          defined earlier in the scene description.
1736          If one of these is a material, then
# Line 1519 | Line 1759 | A mixfunc mixes  two  modifiers  procedurally.   It  i
1759          m A1 A2 .. Am
1760   </pre>
1761  
1762 + <p>
1763 +
1764   <dt>
1765          <a NAME="Mixpict">
1766          <b>Mixpict</b>
# Line 1563 | Line 1805 | A mixfunc mixes  two  modifiers  procedurally.   It  i
1805                  [spacing]
1806   </pre>
1807  
1808 + <p>
1809 +
1810   or:
1811  
1812   <pre>
# Line 1578 | Line 1822 | or:
1822                  [spacing]
1823   </pre>
1824  
1825 + <p>
1826 +
1827   </dl>
1828  
1829   <p>
# Line 1622 | Line 1868 | An example function file is given below:
1868          cfunc(x) : 10*x / sqrt(x) ;
1869   </pre>
1870  
1871 + <p>
1872 +
1873   Many variables and functions are already defined by the program, and they are listed in the file rayinit.cal.  
1874   The following variables are particularly important:
1875  
# Line 1636 | Line 1884 | The following variables are particularly important:
1884                  arg(i)                  - i'th real argument
1885   </pre>
1886  
1887 + <p>
1888 +
1889   For mesh objects, the local surface coordinates are available:
1890  
1891   <pre>
1892                  Lu, Lv                  - local (u,v) coordinates
1893   </pre>
1894  
1895 + <p>
1896 +
1897   For BRDF types, the following variables are defined as well:
1898  
1899   <pre>
# Line 1650 | Line 1902 | For BRDF types, the following variables are defined as
1902                  CrP, CgP, CbP           - perturbed material color
1903   </pre>
1904  
1905 + <p>
1906 +
1907   A unique context is set up for each file so
1908   that  the  same variable may appear in different
1909   function files without conflict.  
# Line 1704 | Line 1958 | The basic data file format is as follows:
1958          DATA, later dimensions changing faster.
1959   </pre>
1960  
1961 + <p>
1962 +
1963   N is the number of  dimensions.  
1964   For  each  dimension,  the beginning  and  ending  coordinate  values and the dimension size is given.  
1965   Alternatively, individual coordinate  values can  be  given when the points are not evenly spaced.  
# Line 1732 | Line 1988 | All numbers are decimal integers:
1988           ...
1989   </pre>
1990  
1991 + <p>
1992 +
1993   The ASCII codes can appear in any order.  N is the number of vertices,  and  the  last  is automatically connected to the first.  
1994   Separate polygonal sections are joined by coincident sides.  
1995   The  character  coordinate  system is a square with lower left corner at (0,0), lower right at (255,0) and upper right at (255,255).
# Line 1807 | Line 2065 | The details of this process  are  not  important, but
2065   directs the use of a scene description.
2066   <ul>
2067   <li>
2068 < <a NAME="rvu" HREF="../man_html/rvu.1.html"><b>Rview</b></a>  is  ray-tracing  program  for  viewing  a  scene interactively.  
2068 > <a NAME="rvu" HREF="../man_html/rvu.1.html"><b>Rvu</b></a>  is  ray-tracing  program  for  viewing  a  scene interactively.  
2069   When  the user specifies a new perspective, rvu quickly displays a rough image on the  terminal,  
2070   then progressively increases the resolution as the user looks on.
2071   He can select a particular section of the image to  improve, or  move  to  a different view and start over.  
# Line 1843 | Line 2101 | Pictures may be displayed directly under X11 using the
2101   or converted a standard image format using one of the following
2102   <b>translators</b>:
2103          <ul>
2104 <        <li> <a HREF="../man_html/ra_bmp.1.html"><b>Ra_bmp</b>
2104 >        <li> <a HREF="../man_html/ra_bmp.1.html"><b>Ra_bmp</b></a>
2105                  converts to and from BMP image format.
2106          <li> <a HREF="../man_html/ra_ppm.1.html"><b>Ra_ppm</b></a>
2107                  converts to and from Poskanzer Portable Pixmap formats.
# Line 1872 | Line 2130 | or converted a standard image format using one of the
2130   <pre>
2131   The Radiance Software License, Version 1.0
2132  
2133 < Copyright (c) 1990 - 2014 The Regents of the University of California,
2133 > Copyright (c) 1990 - 2021 The Regents of the University of California,
2134   through Lawrence Berkeley National Laboratory.   All rights reserved.
2135  
2136   Redistribution and use in source and binary forms, with or without
# Line 1920 | Line 2178 | OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE PO
2178   SUCH DAMAGE.
2179   </pre>
2180  
2181 + <p>
2182 +
2183   <hr>
2184  
2185   <h2>
# Line 1945 | Line 2205 | Ecole  Polytechnique  Federale de Lausanne (EPFL Unive
2205   </h2>
2206   <p>
2207   <ul>
2208 +    <li>Ward, Gregory J., Bruno Bueno, David Geisler-Moroder,
2209 +      Lars O. Grobe, Jacob C. Jonsson, Eleanor
2210 +      S. Lee, Taoning Wang, Helen Rose Wilson,
2211 +      &quot;<a href="https://doi.org/10.1016/j.enbuild.2022.111890">Daylight
2212 +      Simulation Workflows Incorporating Measured Bidirectional
2213 +      Scattering Distribution Functions</a>&quot;
2214 +      <em>Energy &amp; Buildings</em>, Vol. 259, No. 11890, 2022.
2215      <li>Wang, Taoning, Gregory Ward, Eleanor Lee,
2216        &quot;<a href="https://authors.elsevier.com/a/1XQ0a1M7zGwT7v">Efficient
2217        modeling of optically-complex, non-coplanar exterior shading:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines