POV-Ray : Newsgroups : povray.binaries.images : Fresnel reflection { 0 } vs. Lambertian : Fresnel reflection { 0 } vs. Lambertian Server Time: 8 Mar 2021 13:30:30 GMT
  Fresnel reflection { 0 } vs. Lambertian  
From: Cousin Ricky
Date: 28 Mar 2020 00:52:53
I was modeling a floor with varying levels of glossiness, and just as a 
sanity check, I compared a floor of Fresnel reflection 0 to a floor with 
no Fresnel reflection.  To my surprise, the former was darker than the 
latter.  Is this correct?  It seems to me that they should look the same.

The first attached image has only diffuse reflection.  The second has 
finish level Fresnel with reflection { 0 }.  The last, for sake of 
completeness, has full gloss with finish level Fresnel and reflection { 
1 }.  These images were rendered with radiosity, but rendering with 
ambient yields similar results.

(I haven't seen clipka lately.  Wasn't he working on this?)

------------[BEGIN CODE]------------
// +KFF3
#version 3.8;

#ifndef (Rad) #declare Rad = off; #end

#include "screen.inc"

global_settings
{ assumed_gamma 1
   #if (Rad)
     #declare Pixel = 1 / max (image_width, image_height);
     radiosity
     { count 200
       error_bound 0.5
       pretrace_start 32 * Pixel
       pretrace_end 2 * Pixel
       recursion_limit 2
     }
   #end
}

#default { finish { ambient 0.1 diffuse 1.0 emission 0 } }

Set_Camera (<0, 2, -5>, <0, 1, 0>, 30 * image_width / image_height)

//--------------------- ENVIRONMENT ------------------------

#declare RBULB = 0.1;
#declare DIST = 5;
#declare Surface = pow (DIST / RBULB, 2);
light_source
{ <0, 2.5, 5>, rgb (1 + Surface) / 2
   fade_power 2 fade_distance RBULB
   spotlight point_at <0, 1, 0> radius 45 falloff 90
   looks_like
   { sphere
     { 0, RBULB
       pigment { rgb 1 }
       finish { ambient 0 diffuse 0 emission Surface }
       no_radiosity
     }
   }
}

box
{ -1, 1 scale <6, 8, 6>
   hollow
   pigment { rgb 0.6 }
}

//----- things to reflect -------
#declare Sculpture = union
{ cylinder { 0, 1.5 * y, 0.5 }
   sphere { 1.5 * y, 0.5 }
}
object { Sculpture pigment { blue 0.5 } translate <0.6, 0, 5.5> }
object { Sculpture pigment { green 0.5 } translate <1.8, 0, 5.5> }
object { Sculpture pigment { red 0.5 } translate <3.0, 0, 5.5> }

//---------------------- GLOSS TEST ------------------------

plane
{ y, 0
   pigment { checker rgb 0.03 rgb 0.6 }
   #switch (frame_number)
     #case (2)
       #declare s_Case = "fresnel reflection { 0 }"
       finish
       { fresnel
         reflection { 0 }
         conserve_energy
       }
       interior { ior 1.5 }
       #break
     #case (3)
       #declare s_Case = "fresnel reflection { 1 }"
       finish
       { fresnel
         reflection { 1 }
         conserve_energy
       }
       interior { ior 1.5 }
       #break
     #else
       #declare s_Case = "no specular reflection"
   #end
}

//---------------------- ANNOTATION ------------------------

Screen_Object
( union
   { text { ttf "cyrvetic" s_Case 0.001, 0 translate y }
     text
     { ttf "cyrvetic"
       concat ("Radiosity is ", #if (Rad) "on." #else "off." #end)
       0.001, 0
     }
     pigment { rgb 0.7 }
     finish { ambient 0 diffuse 0 emission 1 }
     scale 0.065
   },
   <0, 0.8>, <0.02, 0.02>, yes, 1
)
-------------[END CODE]-------------


Post a reply to this message


Attachments:
Download 'glossy_floor-pbi-rad1.jpg' (16 KB)
Download 'glossy_floor-pbi-rad2.jpg' (15 KB)
Download 'glossy_floor-pbi-rad3.jpg' (16 KB)

Preview of image 'glossy_floor-pbi-rad1.jpg'
glossy_floor-pbi-rad1.jpg

Preview of image 'glossy_floor-pbi-rad2.jpg'
glossy_floor-pbi-rad2.jpg

Preview of image 'glossy_floor-pbi-rad3.jpg'
glossy_floor-pbi-rad3.jpg


 

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