POV-Ray : Newsgroups : povray.binaries.images : Behavior change in #default reflection Server Time
25 Dec 2024 21:08:18 EST (-0500)
  Behavior change in #default reflection (Message 1 to 1 of 1)  
From: Cousin Ricky
Subject: Behavior change in #default reflection
Date: 12 Apr 2019 21:35:32
Message: <5cb13ce4@news.povray.org>
This is *not* a bug report, but a heads up.  In POV-Ray 3.7, if you set 
reflection and Fresnel on in a #default statement, then later reset the 
#default reflection to zero, you could get away with not turning off 
Fresnel.  POV-Ray 3.8 won't forgive you for that.

The following scene illustrates such a situation.  Image 
reflection38-by37.jpg was rendered with POV 3.7.0 and 
reflection38-by38.jpg was rendered with POV 3.8.0-alpha.10064268.  In 
each image, the sphere on the left was instantiated after just 
reflection { 0 }, and the sphere on the right was instantiated after 
reflection { 0 fresnel off }.

--------------------[BEGIN CODE]--------------------
#version 3.7;

global_settings { assumed_gamma 1 max_trace_level 10 }

camera
{ location <0, 1.5, -10>
   look_at y
   angle 30
}

light_source
{ <-1, 2, -1> * 10000, rgb <1.2, 1.0, 0.9>
   parallel point_at 0
}

sky_sphere
{ pigment
   { gradient y
     color_map { [0 rgb <0.15, 0.3, 0.6>] [1 rgb <0.05, 0.1, 0.2>] }
   }
}

#default // for wood texture only
{ finish
   { reflection { 0 0.2 fresnel } conserve_energy
     ambient rgb <0.1, 0.2, 0.4>
   }
}
#include "colors.inc"
#include "woods.inc"

plane
{ y, 0
   texture { T_Wood12 }
   interior { ior 1.47 }
}

#macro GoldSphere()
   sphere
   { y, 1
     pigment { rgb <0.97, 0.74, 0.33> }
     finish
     { reflection { 1 metallic }
       diffuse 0
       ambient 0
       specular albedo 1 metallic
       roughness 0.0001
     }
   }
#end

// Reset the default reflection (sufficient for POV 3.7):
#default { finish { reflection { 0 } } }
object { GoldSphere() translate -1.2 * x }

// Reset the default reflection (necessary for POV 3.8):
#default { finish { reflection { 0 fresnel off } } }
object { GoldSphere() translate 1.2 * x }
---------------------[END CODE]---------------------

OS: openSUSE Leap 15.0 (GNU/Linux)


Post a reply to this message


Attachments:
Download 'reflection38-by37.jpg' (29 KB) Download 'reflection38-by38.jpg' (27 KB)

Preview of image 'reflection38-by37.jpg'
reflection38-by37.jpg

Preview of image 'reflection38-by38.jpg'
reflection38-by38.jpg


 

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