POV-Ray : Newsgroups : povray.general : Reflection : Re: Reflection Server Time
10 Aug 2024 13:17:12 EDT (-0400)
  Re: Reflection  
From: smellenbergh
Date: 8 Dec 1999 16:24:05
Message: <1e2idyh.1pf5olb1ynn57iN%smellenbergh@skynet.be>
Eric <Eri### [at] u-clermont1fr> wrote:

> Hello,
> 
> is it possible to have an object that we only see when it is reflected ?
> for example i have a mirror sphere and a sky_sphere with a gradient to
> create a nice reflection on the sphere, but i want to keep a black
> background. Any ideas ?
> 

Well, it is quite easy when using the no_image patch currently available
in the Mac Unofficial MultiPatch.
For a windows version you will have to wait a little while when Nathan
releases his next update.

smellenbergh

//Here is a demo scene doing exactly what you ask for :-)
camera {
    location <0.0, 0.0, -5.5>
    angle 60
    look_at <0.0, 0.0, 0.0>
}

background { rgb  0 }
sphere {
    <0.0, 0.0, 0.0>, 5000
    texture {
        pigment {
            gradient <0.0, 1.0, 0.0>
            color_map {
                [ 0.000 rgbft <1.0, 0.5, 1.0, 0.0, 0.0> ]   //violet 1
                [ 0.100 rgbft <1.0, 0.5, 1.0, 0.0, 0.0> ]   //violet 2
                [ 0.214 rgbft <0.5, 0.5, 1.0, 0.0, 0.0> ]   //indigo
                [ 0.328 rgbft <0.2, 0.2, 1.0, 0.0, 0.0> ]   //blue
                [ 0.442 rgbft <0.2, 1.0, 1.0, 0.0, 0.0> ]   //cyan
                [ 0.556 rgbft <0.2, 1.0, 0.2, 0.0, 0.0> ]   //green
                [ 0.670 rgbft <1.0, 1.0, 0.2, 0.0, 0.0> ]   //yellow
                [ 0.784 rgbft <1.0, 0.5, 0.2, 0.0, 0.0> ]   //orange
                [ 0.900 rgbft <1.0, 0.2, 0.2, 0.0, 0.0> ]   //red1
                [ 1.000 rgbft <1.0, 0.2, 0.2, 0.0, 0.0> ]   //red2
            }
            scale <5000, 5000, 5000>
        }
        finish {
            ambient rgb <1.0, 1.0, 1.0>
        }
    }
    no_image    //comment this to show the reflected sky
    hollow
}
sphere {
    <0.0, 0.0, 0.0>, 2
    texture {
        pigment {
            rgb <1.0, 1.0, 1.0>
        }
        finish {
            reflection rgb <1.0, 1.0, 1.0>
            diffuse 0.0
        }
    }
}

 

-- 
e-mail:sme### [at] skynetbe

http://users.skynet.be/smellenbergh


Post a reply to this message

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