--- ray/src/cv/mgflib/spec.txt 1994/07/22 09:58:52 1.5 +++ ray/src/cv/mgflib/spec.txt 1995/04/13 12:38:33 1.8 @@ -27,9 +27,8 @@ current transform and the current object name. Each entity is given by a short keyword, followed by space- or tab- delimited arguments on a single line. A single entity may be extended over multiple lines using a backslash ('\') character right before the -end of line, though no extended line may exceed 512 characters in total -length. (Given the current set of entities, even approaching 80 -characters would be highly unusual.) +end of line, though no extended line may exceed 4096 characters in total +length. Entities and Contexts ===================== @@ -84,6 +83,7 @@ n dx dy dz set surface normal for current vertex c [id [= [template]]] get/set color context cxy x y set CIE (x,y) chromaticity for current color cspec l_min l_max v1 v2 .. set relative spectrum for current color +cct temperature set spectrum based on black body temperature cmix w1 c1 w2 c2 .. mix named colors to make current color m [id [= [template]]] get/set material context sides {1|2} set number of sides for current material @@ -92,6 +92,7 @@ td tau_d set diffuse transmittance for current mater ed epsilon_d set diffuse emittance for current material rs rho_s alpha_r set specular reflectance for current material ts tau_s alpha_t set specular transmittance for current material +ir n_real n_imag set index of refraction for current material o [name] begin/end object context f v1 v2 v3 .. polygon using current material, spec. vertices sph vc radius sphere @@ -210,18 +211,22 @@ saturation. Intensity, such as reflectance or emittan included in the other material parameters. All colors are absolute, e.g. spectral reflectance or transmittance under uniform white light. -A CIE xy chromaticity pair is the most basic color specification. -A full spectrum is the most general specification, and the starting -(i.e. minimum) and ending (i.e. maximum) wavelengths are given along -with a set of evenly spaced values. Wavelengths are given in nanometers, -and must be within the range of 380-780. The spectral values themselves -are located starting at the first wavelength and proceeding at even -increments to the ending wavelength. The values in between will be -interpolated as necessary, so there must be at least two specified points. -The color mixing entity is intended not only for the mixing of named -colors, but also for color specifications using an arbitrary set -of basis functions. The actual totals for spectral and mixing -coefficients is irrelevant, since the results will be normalized. +A CIE xy chromaticity pair is the most basic color specification. A +full spectrum is the most general specification, and the starting (i.e. +minimum) and ending (i.e. maximum) wavelengths are given along with a +set of evenly spaced values. Wavelengths are given in nanometers, and +should be within the range of 380-780. The spectral values themselves, +which can be thought of as relative power density per nanometer, start +at the first wavelength and proceed at even increments to the last +wavelength. The values in between will be interpolated as necessary, +so there must be at least two specified points. The color temperature +entity corresponds to the spectrum of a black body at the specified +temperature (in degrees Kelvin). The color mixing entity is intended +not only for the mixing of named colors, but also for color +specifications using an arbitrary set of basis functions. The mixing +coefficients are in effect relative luminances for each color +"primary." The actual total of the mixing coefficients or spectral +values is irrelevant, since the results will always be normalized. Diffuse emittance is always given in SI units of lumens/meter^2. Note that this is emittance, not exitance, and does not include light reflected or @@ -234,6 +239,17 @@ be scattered. The sum of the diffuse and specular reflectances and transmittances must be strictly less than one (with no negative values, obviously). +These values are assumed to be measured at normal incidence. If an +index of refraction is given, this may modify the balance between +diffuse and specular reflectance at other incident angles. If the +material is one-sided (see below), then it may be a dielectric interface. +In this case, the specular transmittance given is that which would be +measured at normal incidence for a pane of the material 5 mm thick. +This is important for figuring the actual transmittance for non-planar +geometries assuming a uniformly absorbing medium. If the index of +refraction has an imaginary part, then the surface is a metal and this +implies other properties according to physics. The default index of +refraction is that of a vacuum, i.e. (1,0). The object entity establishes a hierarchical context, consisting of this identifier and all those preceding. It has no real meaning except @@ -241,12 +257,12 @@ to group the following surfaces up until an empty obje under a descriptive name for improved file readability. Surfaces are two-sided unless the "sides" entity is used to set the -number of sides for a material to one. If a surfaces is one-sided, +number of sides for a material to one. If a surface is one-sided, then it appears invisible when viewed from the back side. This means that a transmitting object will affect the light coming in through the front surface and ignore the characteristics of the back surface. As -long as the characteristics are the same, the results should be -correct. If the rendering technique does not allow for one-sided +long as the transmission characteristics are the same, the results should +be correct. If the rendering technique does not allow for one-sided surfaces, an approximately correct result can be obtained for one-sided transmitting surfaces by using the square root of the given tau_s and half the given alpha_t. If a rendering technique does not permit