POV-Ray : Newsgroups : povray.binaries.images : Averaged normals vs. averaged textures : Averaged normals vs. averaged textures Server Time
30 Jul 2024 14:28:25 EDT (-0400)
  Averaged normals vs. averaged textures  
From: Cousin Ricky
Date: 9 Aug 2011 14:05:01
Message: <web.4e4175bb14a73acc85de7b680@news.povray.org>
I was trying to create a stand-alone normal for blurred reflections.  The sphere
on the left uses an averaged texture, as illustrated in the Knowledgebase.  The
sphere on the right uses an averaged normal applied to a base texture.
_____________________________________________________________

#version 3.7;

global_settings
{  assumed_gamma 1
   max_trace_level 10
}

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

sky_sphere
{  pigment
   {  gradient y color_map
      {  [0 rgb <0.7, 0.8, 0.9>]
         [1 rgb <0.2, 0.3, 0.6>]
      }
   }
}

light_source
{  <-1, 2, 0> * 1000 rgb 1
   parallel point_at 0
}

plane { y, 0 pigment { checker rgb 0.05 rgb 1 } }

#declare t_Brass = texture
{  pigment { rgb <0.80, 0.57, 0.23> }
   finish
   {  reflection { 0.5 metallic }
      diffuse 0.4 ambient 0.05
      specular 1 metallic 0.95 roughness 0.015
      brilliance 6.75
   }
}

#declare S = seed (0);

sphere
{  y, 1
   texture
   {  average texture_map
      {  #declare I = 0;
         #while (I < 10)
            [1 t_Brass
               normal
               {  bumps
                  translate <rand(S), rand(S), rand(S)> * 100
                  scale 1000
               }
            ]
            #declare I = I + 1;
         #end
      }
   }
   translate <-1, 0, 1>
}

#declare S = seed (0);

sphere
{  y, 1
   texture
   {  t_Brass
      normal
      {  average normal_map
         {  #declare I = 0;
            #while (I < 10)
               [1 bumps
                  translate <rand(S), rand(S), rand(S)> * 100
                  scale 1000
               ]
               #declare I = I + 1;
            #end
         }
      }
   }
   translate <1, 0, -1>
}
_____________________________________________________________

By my understanding of SDL, the two spheres should be identical.  Obviously, my
understanding is wrong, but I cannot figure out where the difference is.  Why
are the two spheres different?

I am using version 3.7RC3.


Post a reply to this message


Attachments:
Download 'averagendemo.jpg' (51 KB)

Preview of image 'averagendemo.jpg'
averagendemo.jpg


 

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