POV-Ray : Newsgroups : povray.pov4.discussion.general : Possible v4.0 finish changes (povr). amplify, intensity_max. : Possible v4.0 finish changes (povr). amplify, intensity_max. Server Time
6 Dec 2021 12:23:34 EST (-0500)
  Possible v4.0 finish changes (povr). amplify, intensity_max.  
From: William F Pokorny
Date: 25 Oct 2021 09:45:28
Message: <6176b4f8@news.povray.org>
Using this time an environmental HDRI from:


in a scene to demonstrate other povr changes made - or still in progress 
- for the past 4-5 months. The pertinent code for the attached image is:

  #macro ImageMap00(_HF)
   #if (_HF=0)
     image_map { getenv("HDRI")
   #if (_HF=0)
      map_type 1
      interpolate 2
#declare PigSkySph = pigment { ImageMap00(0) }
#declare SkySphere00 = sky_sphere {
     pigment { PigSkySph }
     amplify rgb <1,1,1>

#declare Fin00 = finish {
     amplify 0
     reflection { 0.7 0.9 fresnel amplify 1 metallic 1 }
     intensity_max 1

#declare Sph00 = sphere {
     0, 0.7
     texture {
         pigment { rgb <0.81,0.74,0.11> }
         finish { Fin00 }
         normal { bevy 0.03125 type 9 } // inbuilt micro normal
     interior { ior 1.5 }

//--- scene ---
     sky_sphere { SkySphere00 }
     camera { Camera00 }
     object { Sph00 }
     object { Sph00
         finish {Fin00 intensity_max  0}
         translate <-0.9,+0.9,-0.7>
     object { Sph00
         finish {Fin00 intensity_max -1}
         translate <+0.9,-0.9,+0.7>

The finish items which are new (or changed) are amplify, intensity_max 
and that reflection no longer supports the old, non-block / non-brace 
bound form.

The amplify concept partially exists today, but under different keyword 
names - sky_spheres like background always emit so 'emission' is a color 
vector multiplier. With interior fade the old 'refraction' keyword was 
the multiplier. In povr many of these have been changed to 'amplify' and 
'amplify' has been added to more - but not yet all - functional blocks.

The intensity_max keyword is mostly new(1) and again has been added to 
many - but not all - blocks / trace operations. Primarily, what 
intensity_max does is shown in the attached image. With the upper left 
sphere intensity_max is 0 and so off. With the middle sphere it's 1.0 
and color vectors are not clamped, but rather constrained to a [0..1] 
range. In the lower right it's -1, where - when if finds color channel 
values generated outside the 0-1 range - it attempts to mangle the 
colors returned in way to indicate render regions where the color vector 
will get clipped on conversion to most output image formats(2).

The thinking is amplify and intensity_max would be used together to 
better isolate and control the components of any given ray color result.

(1) - Radiosity max_sample exists and I've not (yet?) renamed it.

(2) - Tricky! It's perhaps not possible to do in ways always easily 
visible. I've tried many approaches and I'm using a couple of those 
currently depending on what information the local code has in hand.

The scene file uses a couple of other new-ish features in getenv("HDRI") 
and the micro normal bevy pattern 9. The latter still to be changed to a 
named normal only pattern called, I guess, 'micro' - or something? Its 
aim is to implement the inbuilt micro normal stuff folks have been 
hacking in some fashion for many years. An aim was coding it in a way 
which leads AA to help achieve a blurred result. It's just noise where 
the magnitude of the overall micro 'blur' is controlled by the bump_size.

Bill P.

Post a reply to this message

Download 'micronreflection.jpg' (294 KB)

Preview of image 'micronreflection.jpg'


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