POV-Ray : Newsgroups : povray.general : Object-reflection-only Plane Server Time
27 Dec 2024 14:43:37 EST (-0500)
  Object-reflection-only Plane (Message 1 to 4 of 4)  
From: Seansbox
Subject: Object-reflection-only Plane
Date: 26 Nov 2012 10:50:00
Message: <web.50b38e8b578313767d9aed390@news.povray.org>
I have a very plain design:
- a bluish background color
- a red sphere
- a bluish plane sitting beneath the sphere (same color as the background)

All I want is for the plane to reflect the ball, but not any other light: a
simple "reflection plane" that is otherwise invisible. The following plane
works, except that the reflection doesn't fade out--it's just a solid
reflection.

How do I make the plane fade-out the reflection over distance?

plane {
  <0, 1, 0>, -5
  pigment { color hex2rgb("E6E8FA") }
  finish { ambient .9 diffuse 0 brilliance 0 reflection .1 }
}

Thanks in advance for any ideas! This is probably a newb question. :-(


Post a reply to this message

From: Tim Cook
Subject: Re: Object-reflection-only Plane
Date: 26 Nov 2012 16:47:48
Message: <50b3e384$1@news.povray.org>
On 2012-11-26 09:45, Seansbox wrote:
> How do I make the plane fade-out the reflection over distance?
>
> plane {
>    <0, 1, 0>, -5
>    pigment { color hex2rgb("E6E8FA") }
>    finish { ambient .9 diffuse 0 brilliance 0 reflection .1 }
> }

Try a material map?

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
           }
         }
       ]
     }
   }
}

--
Tim Cook
http://empyrean.sjcook.com


Post a reply to this message

From: Seansbox
Subject: Re: Object-reflection-only Plane
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

From: Tim Cook
Subject: Re: Object-reflection-only Plane
Date: 26 Nov 2012 18:28:46
Message: <50b3fb2e$1@news.povray.org>
On 2012-11-26 16:08, Seansbox wrote:
> 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. ;-)

Yeah for some reason it was behaving flakily when I was trouncing it 
through Moray's material editor to get something usable.  It'd work some 
of the time, but not always...but the gist of the thing is there.

--
Tim Cook
http://empyrean.sjcook.com


Post a reply to this message

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