--- ray/doc/ray.html 2023/11/16 21:57:39 1.34 +++ ray/doc/ray.html 2024/12/09 19:21:38 1.39 @@ -1,5 +1,5 @@ - +
+ mod WGMDfunc id + 13+ rs_mod rs rs_urough rs_vrough + ts_mod ts ts_urough ts_vrough + td_mod + ux uy uz funcfile transform + 0 + 9+ rfdif gfdif bfdif + rbdif gbdif bbdif + rtdif gtdif btdif + 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 +channel. + +
+ +Unique to this material, separate modifier channels are +provided for each component. +The main modifier is used on the diffuse reflectance, both +front and back. +The rs_mod modifier is used for specular reflectance. +If "void" is given for rs_mod, +then the specular reflection color will be white. +The special "inherit" keyword may also be given, in which case +specular reflectance will share the main modifier. +This behavior is replicated for the specular transmittance modifier +ts_mod, which also has its own independent roughness expressions. +Finally, the diffuse transmittance modifier is given as +td_mod, which may also be "void" or "inherit". +Note that any spectra or color for specular components must be +carried by the named modifier(s). + +
+ +The main advantage to this material over +BRTDfunc and +other programmable types described below is that the specular sampling is +well-defined, so that all components are fully computed. + +
+ +
- The first two real arguments indicate the limits of the covered + The first two real arguments indicate the extrema of the spectral range in nanometers. - Subsequent real values correspond to multipliers in each wavelength band, - where the first band goes from nmA to nmA+(nmB-nmA)/N, and N is the - number of bands (i.e., the number of real arguments minus 2). + Subsequent real values correspond to multipliers at each wavelength. The nmA wavelength may be greater or less than nmB, but they may not be equal, and their ordering matches the order of the spectral values. @@ -1542,7 +1596,7 @@ or:
mod specfunc id
- 2+ sval funcfile transform
+ 2+ sfunc funcfile transform
0
2+ nmA nmB A3 ..
@@ -1550,10 +1604,65 @@ or:
Like the spectrum primitive, the wavelength range is specified in the first two real arguments, and additional real values are - accessible to the sval function. + set in the evaluation context. This function is fed a wavelenth sample between nmA and nmB as its only argument, and it returns the corresponding spectral intensity. + +
+ mod specdata id + 3+n+ + func datafile + funcfile x1 x2 .. xn transform + 0 + m A1 A2 .. Am ++ +
+ The data file must have one more dimension than the coordinate + variable count, as this final dimension corresponds to the covered + spectrum. + The starting and ending wavelengths are specified in "datafile" + as well as the number of spectral samples. + The function "func" will be called with two parameters, the + interpolated spectral value for the current coordinate and the + associated wavelength. + If the spectrum is broken into 12 components, then 12 calls + will be made to "func" for the relevant ray evaluation. + +
+ mod specpict id + 5+ + func specfile + funcfile u v transform + 0 + m A1 A2 .. Am ++ +
+ The function "func" is called with the interpolated pixel value + and the wavelength sample in nanometers, the same as specdata, + with as many calls made as there are components in "specfile".