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.42 by greg, Fri May 30 16:35:52 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 1313 | Line 1362 | A texture is a perturbation of the surface normal,  an
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 2124 | Line 2199 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
2199   OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2200   SUCH DAMAGE.
2201   </pre>
2202 +
2203 + <p>
2204  
2205   <hr>
2206  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines