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.39 by greg, Mon Dec 9 19:21:38 2024 UTC vs.
Revision 1.43 by greg, Tue Jul 22 19:43:59 2025 UTC

# 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 580 | Line 586 | This is only appropriate if the surface hides other (m
586          3 red green blue
587   </pre>
588  
589 +        While alternate materials that are reflective will appear as normal,
590 +        indirect rays will use the mirror's reflectance rather than the
591 +        alternate type.
592 +        Transmitting materials are an exception, where both transmission and
593 +        reflection will use the alternate type for all rays not specifically
594 +        targeting virtual light sources.
595 +        In this case, it is important that any reflections be purely specular
596 +        (mirror-like) and equal to the mirror's reflectivity
597 +        to maintain a valid result.
598 +        A pure diffuse reflection may be added if desired.
599 +
600   <p>
601  
602 +        The mirror material type reflects light sources only from the front side
603 +        of a surface, regardless of any alternate material.
604 +        If virtual source generation is desired on both sides, two coincident
605 +        surfaces with opposite normal orientations may be employed to achieve
606 +        this effect.
607 +        The reflectance and alternate material type may be
608 +        different for the overlapped surfaces,
609 +        and the two sides will behave accordingly.
610 +
611 + <p>
612 +
613   <dt>
614          <a NAME="Prism1">
615          <b>Prism1</b>
# Line 603 | Line 631 | This is only appropriate if the surface hides other (m
631          n A1 A2 .. An
632   </pre>
633  
634 + <p>
635 +
636          The new direction variables dx, dy and dz need not produce a normalized  vector.  
637          For convenience, the variables DxA, DyA and DzA are defined as the normalized direction to the  target  light  source.  
638          See <a HREF="#Function">section 2.2.1</a> on function files for further information.
# Line 646 | Line 676 | This is only appropriate if the surface hides other (m
676          3  source1  mirror1&gt;source10  mirror2&gt;mirror1&gt;source3
677   </pre>
678  
679 + <p>
680   Normally, only one source is given per mist material, and there is an
681   upper limit of 32 to the total number of active scattering sources.
682   The extinction coefficient, if given, is added the the global
# Line 666 | Line 697 | forward direction, as fit by the Henyey-Greenstein fun
697          P(theta) = (1 - g*g) / (1 + g*g - 2*g*cos(theta))^1.5
698   </pre>
699  
700 + <p>
701 +
702   A perfectly isotropic scattering medium has a g parameter of 0, and
703   a highly directional material has a g parameter close to 1.
704   Fits to the g parameter may be found along with typical extinction
# Line 680 | Line 713 | cloud types in USGS meteorological tables.
713          0|3|6|7 [ rext gext bext [ ralb galb balb [ g ] ] ]
714   </pre>
715  
716 + <p>
717 +
718   There are two usual uses of the mist type.
719   One is to surround a beam from a spotlight or laser so that it is
720   visible during rendering.
# Line 857 | Line 892 | unless the line integrals consider enclosed geometry.
892              A10 ..
893   </pre>
894  
895 + <p>
896 +
897   The sum of specular reflectance (<I>rs</I>), specular transmittance (<I>ts</I>),
898   diffuse reflectance (<I>rfdif gfdif bfdif</I> for front and <I>rbdif gbdif bbdif</I> for back)
899   and diffuse transmittance (<I>rtdif gtdif btdif</I>) should be less than 1 for each
# Line 950 | Line 987 | well-defined, so that all components are fully compute
987          tn = (sqrt(.8402528435+.0072522239*Tn*Tn)-.9166530661)/.0036261119/Tn
988   </pre>
989  
990 + <p>
991 +
992          Standard 88% transmittance glass  has  a  transmissivity  of 0.96.  
993          (A <a HREF="#Patterns">pattern</a> modifying glass will affect the transmissivity.)
994          If a fourth real argument is given,  it  is  interpreted as the index of refraction to use instead of 1.52.
# Line 981 | Line 1020 | well-defined, so that all components are fully compute
1020          4+ red green blue spec A5 ..
1021   </pre>
1022  
1023 + <p>
1024 +
1025          The function refl takes four arguments, the x, y and z
1026          direction towards the incident light, and the solid angle
1027          subtended by the source.
# Line 1022 | Line 1063 | well-defined, so that all components are fully compute
1063          6+ red green blue rspec trans tspec A7 ..
1064   </pre>
1065  
1066 + <p>
1067 +
1068          Where trans is the total light transmitted and tspec is  the non-Lambertian  fraction of transmitted light.  
1069          The function brtd should integrate to 1 over each projected hemisphere.
1070  
# Line 1049 | Line 1092 | well-defined, so that all components are fully compute
1092               A10 ..
1093   </pre>
1094  
1095 + <p>
1096 +
1097          The variables rrefl, grefl and brefl specify the color coefficients  for  the ideal specular (mirror) reflection of the surface.  
1098          The variables rtrns, gtrns and btrns  specify  the color coefficients for the ideal specular transmission.  
1099          The functions rbrtd, gbrtd and bbrtd take the direction to the incident light (and its solid angle) and  
# Line 1093 | Line 1138 | well-defined, so that all components are fully compute
1138          4+ red green blue spec A5 ..
1139   </pre>
1140  
1141 + <p>
1142 +
1143          The coordinate indices (x1, x2, etc.) are  themselves  functions  of  the  x,  y and z direction to the incident light, plus the solid angle
1144          subtended by the light source (usually ignored).
1145          The data function (func) takes five variables, the
# Line 1259 | Line 1306 | well-defined, so that all components are fully compute
1306          0
1307   </pre>
1308  
1309 + <p>
1310 +
1311          The first modifier will also be used to shade  the  area  leaving the  antimatter  volume and entering the regular volume.  
1312          If mod1 is void, the antimatter volume is completely invisible.
1313          Antimatter  does  not  work  properly with the material type <a HREF="#Trans">&quot;trans&quot;</a>,
# Line 1308 | Line 1357 | A texture is a perturbation of the surface normal,  an
1357  
1358   <pre>
1359          mod texdata id
1360 <        8+ xfunc yfunc zfunc xdfname ydfname zdfname vfname x0 x1 .. xf
1360 >        8+ xfunc yfunc zfunc xdfname ydfname zdfname funcfile x0 x1 .. xf
1361          0
1362          n A1 A2 .. An
1363   </pre>
1364  
1365 + <p>
1366 +
1367   </dl>
1368  
1369   <p>
# Line 1452 | Line 1503 | A colorfunc is a procedurally  defined  color  pattern
1503                  [spacing]
1504   </pre>
1505  
1506 + <p>
1507 +
1508   or:
1509  
1510   <pre>
# Line 1489 | Line 1542 | or:
1542                  [spacing]
1543   </pre>
1544  
1545 + <p>
1546 +
1547   or:
1548  
1549   <pre>
# Line 1696 | Line 1751 | A mixfunc mixes  two  modifiers  procedurally.   It  i
1751          n A1 A2 .. An
1752   </pre>
1753  
1754 + <p>
1755 +
1756          Foreground and background are modifier names that must be
1757          defined earlier in the scene description.
1758          If one of these is a material, then
# Line 1724 | Line 1781 | A mixfunc mixes  two  modifiers  procedurally.   It  i
1781          m A1 A2 .. Am
1782   </pre>
1783  
1784 + <p>
1785 +
1786   <dt>
1787          <a NAME="Mixpict">
1788          <b>Mixpict</b>
# Line 1768 | Line 1827 | A mixfunc mixes  two  modifiers  procedurally.   It  i
1827                  [spacing]
1828   </pre>
1829  
1830 + <p>
1831 +
1832   or:
1833  
1834   <pre>
# Line 1783 | Line 1844 | or:
1844                  [spacing]
1845   </pre>
1846  
1847 + <p>
1848 +
1849   </dl>
1850  
1851   <p>
# Line 1827 | Line 1890 | An example function file is given below:
1890          cfunc(x) : 10*x / sqrt(x) ;
1891   </pre>
1892  
1893 + <p>
1894 +
1895   Many variables and functions are already defined by the program, and they are listed in the file rayinit.cal.  
1896   The following variables are particularly important:
1897  
# Line 1841 | Line 1906 | The following variables are particularly important:
1906                  arg(i)                  - i'th real argument
1907   </pre>
1908  
1909 + <p>
1910 +
1911   For mesh objects, the local surface coordinates are available:
1912  
1913   <pre>
1914                  Lu, Lv                  - local (u,v) coordinates
1915   </pre>
1916  
1917 + <p>
1918 +
1919   For BRDF types, the following variables are defined as well:
1920  
1921   <pre>
# Line 1855 | Line 1924 | For BRDF types, the following variables are defined as
1924                  CrP, CgP, CbP           - perturbed material color
1925   </pre>
1926  
1927 + <p>
1928 +
1929   A unique context is set up for each file so
1930   that  the  same variable may appear in different
1931   function files without conflict.  
# Line 1909 | Line 1980 | The basic data file format is as follows:
1980          DATA, later dimensions changing faster.
1981   </pre>
1982  
1983 + <p>
1984 +
1985   N is the number of  dimensions.  
1986   For  each  dimension,  the beginning  and  ending  coordinate  values and the dimension size is given.  
1987   Alternatively, individual coordinate  values can  be  given when the points are not evenly spaced.  
# Line 1937 | Line 2010 | All numbers are decimal integers:
2010           ...
2011   </pre>
2012  
2013 + <p>
2014 +
2015   The ASCII codes can appear in any order.  N is the number of vertices,  and  the  last  is automatically connected to the first.  
2016   Separate polygonal sections are joined by coincident sides.  
2017   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 2075 | Line 2150 | or converted a standard image format using one of the
2150   </h2>
2151  
2152   <pre>
2153 < The Radiance Software License, Version 1.0
2153 > The Radiance Software License, Version 2.0
2154  
2155 < Copyright (c) 1990 - 2021 The Regents of the University of California,
2156 < through Lawrence Berkeley National Laboratory.   All rights reserved.
2155 > Radiance v6.0 Copyright (c) 1990 to 2025, The Regents of the University of
2156 > California, through Lawrence Berkeley National Laboratory (subject to receipt
2157 > of any required approvals from the U.S. Dept. of Energy).  All rights reserved.
2158  
2159   Redistribution and use in source and binary forms, with or without
2160 < modification, are permitted provided that the following conditions
2085 < are met:
2160 > modification, are permitted provided that the following conditions are met:
2161  
2162 < 1. Redistributions of source code must retain the above copyright
2163 <        notice, this list of conditions and the following disclaimer.
2162 > (1) Redistributions of source code must retain the above copyright notice,
2163 > this list of conditions and the following disclaimer.
2164  
2165 < 2. Redistributions in binary form must reproduce the above copyright
2166 <      notice, this list of conditions and the following disclaimer in
2167 <      the documentation and/or other materials provided with the
2093 <      distribution.
2165 > (2) Redistributions in binary form must reproduce the above copyright
2166 > notice, this list of conditions and the following disclaimer in the
2167 > documentation and/or other materials provided with the distribution.
2168  
2169 < 3. The end-user documentation included with the redistribution,
2170 <          if any, must include the following acknowledgment:
2171 <            &quot;This product includes Radiance software
2172 <                (<a HREF="http://radsite.lbl.gov/">http://radsite.lbl.gov/</a>)
2099 <                developed by the Lawrence Berkeley National Laboratory
2100 <              (<a HREF="http://www.lbl.gov/">http://www.lbl.gov/</a>).&quot;
2101 <      Alternately, this acknowledgment may appear in the software itself,
2102 <      if and wherever such third-party acknowledgments normally appear.
2169 > (3) Neither the name of the University of California, Lawrence Berkeley
2170 > National Laboratory, U.S. Dept. of Energy nor the names of its contributors
2171 > may be used to endorse or promote products derived from this software
2172 > without specific prior written permission.
2173  
2174 < 4. The names &quot;Radiance,&quot; &quot;Lawrence Berkeley National Laboratory&quot;
2175 <      and &quot;The Regents of the University of California&quot; must
2176 <      not be used to endorse or promote products derived from this
2177 <      software without prior written permission. For written
2178 <      permission, please contact [email protected].
2174 > THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
2175 > AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2176 > IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2177 > ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
2178 > LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2179 > CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2180 > SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2181 > INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2182 > CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
2183 > ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2184 > POSSIBILITY OF SUCH DAMAGE.
2185  
2186 < 5. Products derived from this software may not be called &quot;Radiance&quot;,
2187 <      nor may &quot;Radiance&quot; appear in their name, without prior written
2188 <      permission of Lawrence Berkeley National Laboratory.
2189 <
2190 < THIS SOFTWARE IS PROVIDED ``AS IS&quot; AND ANY EXPRESSED OR IMPLIED
2191 < WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
2192 < OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2193 < DISCLAIMED.   IN NO EVENT SHALL Lawrence Berkeley National Laboratory OR
2194 < ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2195 < SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2120 < LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
2121 < USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
2122 < ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
2123 < OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
2124 < OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2125 < SUCH DAMAGE.
2186 > You are under no obligation whatsoever to provide any bug fixes, patches,
2187 > or upgrades to the features, functionality or performance of the source
2188 > code ("Enhancements") to anyone; however, if you choose to make your
2189 > Enhancements available either publicly, or directly to Lawrence Berkeley
2190 > National Laboratory, without imposing a separate written license agreement
2191 > for such Enhancements, then you hereby grant the following license: a
2192 > non-exclusive, royalty-free perpetual license to install, use, modify,
2193 > prepare derivative works, incorporate into other computer software,
2194 > distribute, and sublicense such enhancements or derivative works thereof,
2195 > in binary and source code form.
2196   </pre>
2197 +
2198 + <p>
2199  
2200   <hr>
2201  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines