POV-Ray : Newsgroups : povray.general : Highlights Syntax : Re: Highlights Syntax Server Time
30 Jul 2024 06:20:41 EDT (-0400)
  Re: Highlights Syntax  
From: clipka
Date: 27 Aug 2009 19:16:35
Message: <4a9713d3$1@news.povray.org>
Zeger Knaepen schrieb:
> "clipka" <ano### [at] anonymousorg> wrote in message 
> news:4a968920@news.povray.org...
>> Zeger Knaepen schrieb:
>>> and what if, for whatever reason, you want the effect of both models 
>>> combined?
>> Name one.
> 
> You're missing the point.  It's not because you or I can't think of a 
> reason, no one can. Your idea takes functionality away, just because you 
> believe there's no reason for that functionality to exist. (Or better: your 
> idea makes it a lot harder to do the same thing).

No, I think it's you who is missing the point:

* As long as there's no reason to use both at the same time, the 
functionality /is/ redundant.

I notice that you do give a scene that uses both at the same time - but 
you fail to name a reason why it does so.

* In case there are /exceptional/ reasons to use both at the same time, 
if there's a reasonably simple way around it the functionality can still 
be considered redundant.

I notice that the scene you give can be fairly easy done using layered 
textures (see below).

I also note that your scene appears not to be relying particularly on 
the ability to use both phong and specular simultaneously, but on the 
general ability to overlay multiple highlights of different spread; if 
you would want to carry this further to mix 3 instead of 2 such 
highlights, then you'd be screwed anyway.

* For scenes that do use both features in the same texture - for 
whatever reason - there would be a transitory time (well, transitory 
versions actually) that would still support the old syntax, including 
the ability to use both types of highlights at the same time.

* Removing redundant functionality has been done before in POV-Ray (e.g. 
Halo, which was superseded by media even though that probably made it 
more complicated to achieve the simpler use cases covered by halo).


> But, if you really want an example: try this:
> ...
> 
> Possibly this could also be done with averaged textures, but the code would 
> be a lot more complicated.

Try layered textures - doesn't appear a /lot/ more complicated to me; I 
think it's actually a quite straightforward recipe (which also happens 
to work for cases where you'd want to combine 3 or more differntly-sized 
highlights):

-----------
camera {
  angle 160
  location 0
  look_at z
  translate x
}
light_source {
  <-1,0,0>
  rgb 1
}

#declare Tx1 = texture {
   pigment {blue 1}
   finish {
    ambient 0 diffuse 0
    phong .5 phong_size 15
    metallic .5
   }
}
texture {
   pigment {blue 1 transmit 1}
   finish {
    ambient 0 diffuse 0
    reflection 1
    specular 1 roughness .001
    metallic .5
   }
}

#declare Tx2 = texture {
   pigment {red 1}
   finish {
    ambient 0 diffuse 0 brilliance 10
    phong .5 phong_size 15
    metallic .5
   }
}
texture {
   pigment {red 1 transmit 1}
   finish {
    ambient 0 diffuse 0 brilliance 10
    reflection 1
    specular 1 roughness .001
    metallic .5
   }
}

torus {
  1,.5
  texture {
   pigment_pattern {bumps scale .2}
   texture_map {
    [0 Tx1]
    [1 Tx2]
   }
  }
}
------------


Post a reply to this message

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