POV-Ray : Newsgroups : povray.pov4.discussion.general : Suggest v4.0 better handle value modifiers in normal{} blocks Server Time
21 Dec 2024 11:40:55 EST (-0500)
  Suggest v4.0 better handle value modifiers in normal{} blocks (Message 1 to 1 of 1)  
From: William F Pokorny
Subject: Suggest v4.0 better handle value modifiers in normal{} blocks
Date: 27 Nov 2024 07:31:34
Message: <67471126$1@news.povray.org>
In posting some slope_map{} images over in the pbi forum:

http://news.povray.org/povray.binaries.images/thread/%3C6746f73c%241%40news.povray.org%3E/

I had the thought I've not mentioned an older change in the yuqk fork 
which makes general wave modifiers, like sine_wave, illegal in the 
normal{} block context.

normal {
   wood
   sine_wave  // The yuqk parser flags this as illegal!
}

The reasons are the results are unstable in current official releases of 
POV-Ray. Some examples:

---

normal {
   bumps          // normal perturbation is used over bumps value pattern
   triangle_wave  // So, this does nothing at all. No parse errors
}

---

normal {
   facets       // There is only a normal perturbation
   frequency 2  // This does nothing at all. No parse errors
}

-- 

normal {
   wood
   sine_wave  // sine_wave replaces wood's triangle_wave default
}

normal {
   pigment_pattern {
     wood
     color_map {  // This the default map for all value patterns in yuqk
       [0 rgb 0]  // Official POV-Ray need
       [1 rgb 1]
     }
   }
   // sine_wave below is chained after the wood's default triangle_wave
   sine_wave
}

---

The yuqk fork in making the normal context illegal for the general value 
pattern modifiers, forces the creation of pigment_pattern{} or 
function{pattern {}} wrap contexts where the behavior is stable.

Aside: A pattern{} usable within normal{}, pigment{}, etc blocks with 
direct access to the pattern's value in additional to the 
pigment_pattern{} would be good to have too. The next release of the 
yuqk fork changes pavement's 'pattern' keyword to 'ip_pattern' removing 
one obstacle to a more general pattern{} capability. Maybe I'm dreaming 
and pattern{} functionality cannot be extended for other reasons - I've 
not gotten to actually trying to do it...

Bill P.


Post a reply to this message

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