POV-Ray : Newsgroups : povray.general : Highlights Syntax : Re: Highlights Syntax Server Time
30 Jul 2024 06:18:48 EDT (-0400)
  Re: Highlights Syntax  
From: Zeger Knaepen
Date: 28 Aug 2009 11:43:53
Message: <4a97fb39@news.povray.org>
"Jellby" <me### [at] privacynet> wrote in message 
news:l42### [at] badulaqueunexes...
> Among other things, Zeger Knaepen saw fit to write:
>
>> and what if, for whatever reason, you want the effect of both models
>> combined?
>
> Why not allow multiple highlights{} blocks in finish{}?
>
> You could have:
>
> finish {
>  highlights {
>    specular
>    0.3
>    roughness 0.01
>  }
>  highlights {
>    phong
>    0.2
>    roughness 0.1
>  }
> }

I was thinking about that too, but it's inconsistent with current behaviour: 
normally, specifying a value overwrites the previous value, which is a good 
thing and imho must be kept.

I'm not sure about the highlights-block.. If that gets through, I believe 
there should also be a diffuse-block.

And to be honest, I actually like Reactor's idea of allowing a color_map.

Something like this:

finish {
    highlights {
        specular        //model of highlight, specular or phong
        1               //main brightness of highlight
        roughness .01   //spread of the highlight, lower values give 
narrower spread
        color_map {
            [0 rgb 0]   //from where the highlight would have no effect, up 
to where
            [.8 red .8] //it has 80% effect, only use the red-component of 
the light_source
            [1 rgb 1]   //from there, gradually use the full color of the 
light_source
        }
        metallic .1     //shift the highlight-hue slightly toward the 
surface-hue
    }
    diffuse {
        lambert         //model of diffuse reflection
        1               //main brightness of diffuse reflection
        brilliance 2    //falloff-power of diffuse reflection
        crand .001      //does anyone even use this?
        color_map {
            [0 rgb 1]   //some fancy special effect lighting: everything 
that should
            [1 rgb 0]   //be shaded is lit, and vice versa
        }
    }
}

color_maps would allow for a whole range of special effects, including 
simulating the effects of combined highlights.

cu!
-- 
#macro G(b,e)b+(e-b)*C/50#end#macro _(b,e,k,l)#local C=0;#while(C<50)
sphere{G(b,e)+3*z.1pigment{rgb G(k,l)}finish{ambient 1}}#local C=C+1;
#end#end _(y-x,y,x,x+y)_(y,-x-y,x+y,y)_(-x-y,-y,y,y+z)_(-y,y,y+z,x+y)
_(0x+y.5+y/2x)_(0x-y.5+y/2x)            // ZK http://www.povplace.com


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.