POV-Ray : Newsgroups : povray.general : Object-reflection-only Plane : Re: Object-reflection-only Plane Server Time
29 Jul 2024 06:21:40 EDT (-0400)
  Re: Object-reflection-only Plane  
From: Seansbox
Date: 26 Nov 2012 17:10:00
Message: <web.50b3e872a48f0600eaa7de440@news.povray.org>
You just blew my mind. I am researching pigment_maps and texture_maps...

It didn't seem to work using exactly what you sent. I assume I need to modify it
some, but I need to research more to be smart enough to do that. ;-)

Here is what I have now:

/* ---------- MACRO TO CONVERT HEX STRING TO RGB VALUES ---------- */

#macro hex2rgb(hexString)
  #macro hex2dec (theHexValue)
    (asc(theHexValue)>64?asc(theHexValue)-55:asc(theHexValue)-48)
  #end

  <16*hex2dec(substr(hexString,1,1))+hex2dec(substr(hexString,2,1)),
  16*hex2dec(substr(hexString,3,1))+hex2dec(substr(hexString,4,1)),
  16*hex2dec(substr(hexString,5,1))+hex2dec(substr(hexString,6,1))>/255
#end

/* ---------- SCENE ---------- */

camera {
  location <0,0,-40>
  look_at <0,0,0>
}

light_source {
  <-25, 25, -50>
  color hex2rgb("E6E8FA")
}

/* ---------- OBJECTS ---------- */

sphere {
  <0,0,0> 5
  pigment { rgb<1,1,1> }
}

plane {
  <0, 1, 0>, -6
  //pigment { color hex2rgb("E6E8FA") }
  //finish { ambient .9 diffuse 0 brilliance 0 reflection .1 }
  material{
     texture{
       pigment_pattern{
         spherical color_map{
           [0.0 rgbft <1.0, 1.0, 1.0, 0.0, 0.0>]
           [0.3 rgbft <1.0, 1.0, 1.0, 0.0, 0.0>]
           [0.7 rgbft <0.0, 0.0, 0.0, 0.0, 0.0>]
           [1.0 rgbft <0.0, 0.0, 0.0, 0.0, 0.0>]
         }
       }
       texture_map{
         [0.0
           pigment{ color rgbt <0.0, 0.0, 0.0, 1.0> }
           finish{
             ambient 0
             reflection{
               1.0, 1.0
               fresnel off
               falloff 1.0
               exponent 1.0
               metallic 0.0
             }
           }
         ]
         [1.0
           pigment{ color rgbt <0.0, 0.0, 0.0, 1.0> }
           finish{
             ambient 0
             reflection{
               0.0, 0.0
               fresnel off
               falloff 1.0
               exponent 1.0
               metallic 0.0
             }
           }
         ]
       }
     }
  }
}

background { hex2rgb("E6E8FA") }


Post a reply to this message

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