POV-Ray : Newsgroups : povray.text.scene-files : Normal/Reflect bug code Server Time
27 Dec 2024 04:05:29 EST (-0500)
  Normal/Reflect bug code (Message 1 to 2 of 2)  
From: Nathan Kopp
Subject: Normal/Reflect bug code
Date: 30 Nov 1998 21:52:35
Message: <366358C7.543EDEEB@Kopp.com>
Here's a scene that demonstrates a reflection bug in POV (goes along with an
image posted in povray.images).

-Nathan


Post a reply to this message


Attachments:
Download 'temp.pov.txt' (1 KB)

From: =Bob
Subject: Re: Normal/Reflect bug code
Date: 2 Dec 1998 14:00:21
Message: <36658e45.0@news.povray.org>
Tsk! tsk! Nathan....
I had to cancel my previous post concerning a revamped test file I put 
together (binary upload), so here it is now in "text" form:

// surface-normal test scene for POV-Ray 3.1
// note: transparency, reflection, refraction, and inverse surface-normal
// are all changeable to see effect each has. Try each and every different
// combination to see varying results.
// 98.91

/* vary amounts here [0,1,2] */

//0 = no transparency, 1 = half, 2 = full (most control over reflection?)
#declare FT = 1;
//0 = no reflection, 1 = half, 2 = full (does not have complete control)
#declare RN = 1;
//0 = reflection_exponent 0, 1 = 0.5, 2 = 1.0 (makes big difference)
#declare RE = 1;

/* turn things on or off here [0,1] */

//0 = no refraction, >0 = ior 1.3 (obvious change)
#declare IR = 1;
//0 = no inverse, >0 = inverse (with this used render speeds up)
#declare IN = 1;


/* test scene below */

//transparency used (both filter and transmit)
#switch (FT)
#case (2)
     #declare FT=1;
#break
#case (1)
     #declare FT=.5;
#break
#case (0)
     #declare FT=0;
#break
#end


camera { location <0,25,-60> angle 67 look_at 0 }

light_source {
  <10,50,-25>
  color rgb 1
}

// green to red
#declare GradientX =
 pigment { gradient x
  color_map {
    [0  rgb<0,1,0>]
    [1  rgb<1,0,0>]
  } scale 2
  translate -x
}
// sky sphere is green at left and red at right, gray at top
sky_sphere {
  pigment { GradientX }
  pigment{ gradient y
   pigment_map {
    [0  GradientX]
    [1  color rgb .5]
  }}
}

// hexagon textured plane 10 units below zero plane
plane{
  y,-10
  texture {
    pigment {
      hexagon
        color rgb<1,1,0>
        color rgb<0,1,1>
        color rgb<1,0,1>
      }
    scale 10
  }
  finish { ambient .5 }
}

// test plane 1 unit above zero plane
plane {
  y, 1
  texture {
    pigment { color rgbft<.5,.5,.5,FT,FT> }
    normal { wrinkles .5 scale 1 triangle_wave }
    finish { ambient .1 diffuse .6 phong .5 phong_size 100 specular 1 
roughness .01
#switch (RN)
#case (2)
     reflection 1
#break
#case (1)
     reflection .5
#break
#case (0)
     reflection 0
#break
#end
#switch (RE)
#case (2)
     reflection_exponent 1
#break
#case (1)
     reflection_exponent .5
#break
#case (0)
     reflection_exponent 0
#break
#end
     }
  }
#if (IR>0)
  interior {ior 1.3 }
#end
#if (IN>0)
 inverse //surface normal flip
#end
 scale 10
}

union {
sphere {0,2
  texture {
    pigment { color rgbft<.5,.5,.5,FT,FT> }
    normal { wrinkles .5 scale .5 triangle_wave }
    finish { ambient .1 diffuse .6 phong .5 phong_size 100 specular 1 
roughness .01
#switch (RN)
#case (2)
     reflection 1
#break
#case (1)
     reflection .5
#break
#case (0)
     reflection 0
#break
#end
#switch (RE)
#case (2)
     reflection_exponent 1
#break
#case (1)
     reflection_exponent .5
#break
#case (0)
     reflection_exponent 0
#break
#end
     }
  }
#if (IR>0)
  interior {ior 1.3 }
#end
#if (IN>0)
 inverse //surface normal flip
#end
}
sphere {0,1.5
  texture {
    pigment {
      hexagon
        color rgb<1,1,0>
        color rgb<0,1,1>
        color rgb<1,0,1>
      }
    scale .5
  }
  finish { ambient .5 }
}
 scale 7.5 translate <-12.5,10,-5>
}

union {
cone {-2*y,2,2*y,0
  texture {
    pigment { color rgbft<.5,.5,.5,FT,FT> }
    normal { wrinkles .5 scale .5 triangle_wave }
    finish { ambient .1 diffuse .6 phong .5 phong_size 100 specular 1 
roughness .01
#switch (RN)
#case (2)
     reflection 1
#break
#case (1)
     reflection .5
#break
#case (0)
     reflection 0
#break
#end
#switch (RE)
#case (2)
     reflection_exponent 1
#break
#case (1)
     reflection_exponent .5
#break
#case (0)
     reflection_exponent 0
#break
#end
     }
  }
#if (IR>0)
  interior {ior 1.3 }
#end
#if (IN>0)
 inverse //surface normal flip
#end
}
cone {-1.5*y,1.5,1.5*y,0
  texture {
    pigment {
      hexagon
        color rgb<1,1,0>
        color rgb<0,1,1>
        color rgb<1,0,1>
      }
    scale .5
  }
  finish { ambient .5 }
}
 scale 7.5 translate <12.5,10,-5>
}

//END

Message <366358C7.543EDEEB@Kopp.com>, Nathan Kopp  typed...
>
>
>Here's a scene that demonstrates a reflection bug in POV (goes along with an
>image posted in povray.images).
>
>-Nathan

-- 
 omniVERSE: beyond the universe
  http://members.aol.com/inversez/POVring.html
=Bob


Post a reply to this message

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