|
|
Am 03.01.2014 16:54, schrieb Cousin Ricky:
> clipka <ano### [at] anonymousorg> wrote:
>> I wouldn't expect "classic" materials (i.e. defined in terms of an RGB
>> colour) to work "out of the box" with SpectralRender. There are
>> infinitely many spectra that match any given RGB triplet, and
>> SpectralRender needs to resort to wild guessing in order to pick one of
>> them.
>
> That's not what I'm doing. I'm using the spectral definitions of the metals
> that are bundled with SpectralRender. (The only RGB colors in the example are
> for the plain gray floor and walls, which I didn't see the need to jump through
> hoops just to get a flat spectral curve, and which turned out as expected
> anyway.)
I see...
Looking at the M_Spectral_Metal macro, I find that it looks bogus to me.
For starters, instead of "#if (WavelengthIndex < 0)" the tests should be
"#if (!SpectralMode)"; the "fresnel on" should only be used in spectral
mode (if at all); and in non-spectral mode there should only be one
parameter to reflection, as the "metallic" keyword already takes care of
all variable effects applicable to metals.
I get good results with the following:
#macro M_Spectral_Metal (N, K, Reflectance)
material {
texture {
pigment { C_Metal(N, K) }
finish {
ambient 0 emission 0 diffuse (0.5 - Reflectance*0.45)
reflection { Reflectance metallic }
conserve_energy
brilliance EXT_Metal(N, K)
metallic
}
}
}
#end
I concede that this is probably not 100% exact regarding the variable
reflection effects, but it's certainly better than what the current
macro gives us ;-)
Post a reply to this message
|
|