--- ray/doc/ray.html 2024/12/09 19:21:38 1.39 +++ ray/doc/ray.html 2025/05/29 16:42:28 1.41 @@ -1,5 +1,5 @@ - +
+ A comment line begins with a pound sign, `#'.
@@ -394,6 +396,7 @@ The basic types are given below. 0 +
If the modifier is "void", then surfaces will use the modifiers given in the original description. Otherwise, the modifier specified is used in their place. @@ -438,6 +441,8 @@ The basic types are given below. 0 +
+ If the modifier is "void", then surfaces will use the modifiers given in the original mesh description. Otherwise, the modifier specified is used in their place. @@ -532,6 +537,7 @@ A material defines the way light interacts with a sur 4 red green blue maxrad +
If maxrad is zero, then the surface will never be tested for shadow, although it may participate in an interreflection calculation. If maxrad is negative, then the surface will never contribute to scene illumination. Glow sources will never illuminate objects on the other side of an illum surface. @@ -580,8 +586,28 @@ This is only appropriate if the surface hides other (m 3 red green blue +While alternate materials that are reflective will appear as normal, +indirect rays will use the mirror's reflectance rather than the +alternate type. +Transmitting materials are an exception, where both transmission and +reflection will use the alternate type for all rays not specifically +targeting virtual light sources. +Therefore, transmitting alternate types should only have pure specular +reflection if they reflect at all, to maintain a valid calculation. +
+The mirror material type reflects light sources only from the front side +of a surface, regardless of any alternate material. +If virtual source generation is desired on both sides, two coincident +surfaces with opposite normal orientations may be employed to achieve +this effect. +The reflectance and alternate material type may be +different for the overlapped surfaces, +and the two sides will behave accordingly. + +
+
+ The new direction variables dx, dy and dz need not produce a normalized vector. For convenience, the variables DxA, DyA and DzA are defined as the normalized direction to the target light source. See section 2.2.1 on function files for further information. @@ -646,6 +674,7 @@ This is only appropriate if the surface hides other (m 3 source1 mirror1>source10 mirror2>mirror1>source3 +
Normally, only one source is given per mist material, and there is an upper limit of 32 to the total number of active scattering sources. The extinction coefficient, if given, is added the the global @@ -666,6 +695,8 @@ forward direction, as fit by the Henyey-Greenstein fun P(theta) = (1 - g*g) / (1 + g*g - 2*g*cos(theta))^1.5 +
+ A perfectly isotropic scattering medium has a g parameter of 0, and a highly directional material has a g parameter close to 1. Fits to the g parameter may be found along with typical extinction @@ -680,6 +711,8 @@ cloud types in USGS meteorological tables. 0|3|6|7 [ rext gext bext [ ralb galb balb [ g ] ] ] +
+ There are two usual uses of the mist type. One is to surround a beam from a spotlight or laser so that it is visible during rendering. @@ -857,6 +890,8 @@ unless the line integrals consider enclosed geometry. A10 .. +
+ The sum of specular reflectance (rs), specular transmittance (ts), diffuse reflectance (rfdif gfdif bfdif for front and rbdif gbdif bbdif for back) and diffuse transmittance (rtdif gtdif btdif) should be less than 1 for each @@ -950,6 +985,8 @@ well-defined, so that all components are fully compute tn = (sqrt(.8402528435+.0072522239*Tn*Tn)-.9166530661)/.0036261119/Tn +
+ Standard 88% transmittance glass has a transmissivity of 0.96. (A pattern modifying glass will affect the transmissivity.) If a fourth real argument is given, it is interpreted as the index of refraction to use instead of 1.52. @@ -981,6 +1018,8 @@ well-defined, so that all components are fully compute 4+ red green blue spec A5 .. +
+ The function refl takes four arguments, the x, y and z direction towards the incident light, and the solid angle subtended by the source. @@ -1022,6 +1061,8 @@ well-defined, so that all components are fully compute 6+ red green blue rspec trans tspec A7 .. +
+ Where trans is the total light transmitted and tspec is the non-Lambertian fraction of transmitted light. The function brtd should integrate to 1 over each projected hemisphere. @@ -1049,6 +1090,8 @@ well-defined, so that all components are fully compute A10 .. +
+ The variables rrefl, grefl and brefl specify the color coefficients for the ideal specular (mirror) reflection of the surface. The variables rtrns, gtrns and btrns specify the color coefficients for the ideal specular transmission. The functions rbrtd, gbrtd and bbrtd take the direction to the incident light (and its solid angle) and @@ -1093,6 +1136,8 @@ well-defined, so that all components are fully compute 4+ red green blue spec A5 .. +
+ The coordinate indices (x1, x2, etc.) are themselves functions of the x, y and z direction to the incident light, plus the solid angle subtended by the light source (usually ignored). The data function (func) takes five variables, the @@ -1259,6 +1304,8 @@ well-defined, so that all components are fully compute 0 +
+ The first modifier will also be used to shade the area leaving the antimatter volume and entering the regular volume. If mod1 is void, the antimatter volume is completely invisible. Antimatter does not work properly with the material type "trans", @@ -1313,6 +1360,8 @@ A texture is a perturbation of the surface normal, an n A1 A2 .. An +
+
@@ -1452,6 +1501,8 @@ A colorfunc is a procedurally defined color pattern [spacing] +
+ or:
@@ -1489,6 +1540,8 @@ or: [spacing]+
+ or:
@@ -1696,6 +1749,8 @@ A mixfunc mixes two modifiers procedurally. It i n A1 A2 .. An+
+ Foreground and background are modifier names that must be defined earlier in the scene description. If one of these is a material, then @@ -1724,6 +1779,8 @@ A mixfunc mixes two modifiers procedurally. It i m A1 A2 .. Am +
+
+ or:
@@ -1783,6 +1842,8 @@ or: [spacing]+
+
@@ -1827,6 +1888,8 @@ An example function file is given below: cfunc(x) : 10*x / sqrt(x) ; +
+ Many variables and functions are already defined by the program, and they are listed in the file rayinit.cal. The following variables are particularly important: @@ -1841,12 +1904,16 @@ The following variables are particularly important: arg(i) - i'th real argument +
+ For mesh objects, the local surface coordinates are available:
Lu, Lv - local (u,v) coordinates+
+ For BRDF types, the following variables are defined as well:
@@ -1855,6 +1922,8 @@ For BRDF types, the following variables are defined as CrP, CgP, CbP - perturbed material color+
+ A unique context is set up for each file so that the same variable may appear in different function files without conflict. @@ -1909,6 +1978,8 @@ The basic data file format is as follows: DATA, later dimensions changing faster. +
+ N is the number of dimensions. For each dimension, the beginning and ending coordinate values and the dimension size is given. Alternatively, individual coordinate values can be given when the points are not evenly spaced. @@ -1937,6 +2008,8 @@ All numbers are decimal integers: ... +
+ The ASCII codes can appear in any order. N is the number of vertices, and the last is automatically connected to the first. Separate polygonal sections are joined by coincident sides. 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). @@ -2124,6 +2197,8 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +