--- ray/doc/ray.1 2023/12/13 23:26:16 1.46 +++ ray/doc/ray.1 2025/05/29 16:42:28 1.48 @@ -1,8 +1,8 @@ -.\" RCSid "$Id: ray.1,v 1.46 2023/12/13 23:26:16 greg Exp $" +.\" RCSid "$Id: ray.1,v 1.48 2025/05/29 16:42:28 greg Exp $" .\" Print using the -ms macro package -.DA 11/13/2023 +.DA 12/09/2024 .LP -.tl """Copyright \(co 2023 Regents, University of California +.tl """Copyright \(co 2024 Regents, University of California .sp 2 .TL The @@ -422,6 +422,23 @@ mod mirror id 0 3 red green blue .DE +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. +.PP +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. .LP .UL Prism1 .PP @@ -638,6 +655,64 @@ mod ashik2 id 0 8 dred dgrn dblu sred sgrn sblu u-power v-power .DE +.LP +.UL WGMDfunc +.PP +WGMDfunc is a more programmable version of trans2, +with separate modifier paths and variables to control each component. +(WGMD stands for Ward-Geisler-Moroder-Duer, which is the basis for +this empirical model, similar to the previous ones beside Ashik2.)\0 +The specification of this material is given below. +.DS +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 .. +.DE +The sum of specular reflectance ( +.I rs +), specular transmittance ( +.I ts +), diffuse reflectance ( +.I "rfdif gfdif bfdif" +for front and +.I "rbdif gbdif bbdif" +for back) +and diffuse transmittance ( +.I "rtdif gtdif btdif" +) should be less than 1 for each +channel. +.PP +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 +.I rs_mod +modifier is used for specular reflectance. +If "void" is given for +.I 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 +.I ts_mod, +which has its own independent roughness expressions. +Finally, the diffuse transmittance modifier is given as +.I 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). +.PP +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. .LP .UL Dielectric .PP