|
|
Am 04.01.2014 17:48, schrieb clipka:
> 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
Maybe this is what it was supposed to be:
#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 {
#if (SpectralMode)
Reflectance * C_Metal_(N,K), Reflectance fresnel on
#else
Reflectance metallic
#end
}
conserve_energy
brilliance EXT_Metal(N, K)
metallic
}
}
interior { IOR_Metal(N, K) }
}
#end
(where C_Metal_(N,K) is identical to C_Metal(N,K) except that it omits
the "rgb" keyword)
Post a reply to this message
|
|