POV-Ray : Newsgroups : povray.advanced-users : special effect: glass-sphere with alpha-background Server Time
27 Dec 2024 17:04:12 EST (-0500)
  special effect: glass-sphere with alpha-background (Message 1 to 5 of 5)  
From: Kaeru Gaman
Subject: special effect: glass-sphere with alpha-background
Date: 26 Jan 2005 20:40:00
Message: <web.41f84623db5f32c5e7ac3cd10@news.povray.org>
I want to render a glass-sphere that refracts a detailed background.
however, this glass-sphere should be the only object visible,
the surrounding should be background-color that would be calculated
into full alpha transparency...
do you understand my problem?

for better understanding... the background should be a collection of
objects,
all in all about 2000 units wide and high... at least...
the glass-sphere is in front of this, with a radius of, let's say, 64
units...

i can put a box-with-a-hole around it, but this would only reder a specific
background-color, not the alpha-shading as if it was really background...

it is all about the AntiAlias I want to give it...

any idea?

brgds
Kaeru


Post a reply to this message

From: Mike Williams
Subject: Re: special effect: glass-sphere with alpha-background
Date: 27 Jan 2005 00:39:32
Message: <4g6t3DAu5H+BFwaQ@econym.demon.co.uk>
Wasn't it Kaeru Gaman who wrote:
>I want to render a glass-sphere that refracts a detailed background.
>however, this glass-sphere should be the only object visible,
>the surrounding should be background-color that would be calculated
>into full alpha transparency...
>do you understand my problem?

Could you do it with reflections?

For example, place a circular mirror right through the centre of your
glass sphere so that it faces the camera. The camera will then see the
front half of the sphere and its reflection will look like the back half
of the sphere.

Then you can make all the other objects in the scene be no_image, so
they won't be seen directly but will be seen in the refracted
reflection. You can also scale them by -1 in the camera direction to
recover the original positioning and orientation.

A (probably unwanted) side effect of this technique is that the
reflected background colour seen through the glass sphere becomes
opaque, whereas refracted background colour would be transparent.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Leonardo
Subject: Re: special effect: glass-sphere with alpha-background
Date: 27 Jan 2005 09:00:00
Message: <web.41f8f3c416f0c4ed27bbadf50@news.povray.org>
I answered your question, but somehow it started another thread, <no
subject> :S

Here it is:
<web.41f8d477c23a6d927bbadf50@news.povray.org>


Post a reply to this message

From: Kaeru Gaman
Subject: Re: special effect: glass-sphere with alpha-background
Date: 27 Jan 2005 17:30:00
Message: <web.41f96b4e16f0c4ed2184c5800@news.povray.org>
> Then you can make all the other objects in the scene be no_image, so
> they won't be seen directly but will be seen in the refracted
> reflection.

i dint discover the no_image command yet.

will it also work for only refracted rays? that would made it possible, to
just not chenge the scene, only add the no_image flag to the background
objects...

anyways, thnx for your help..


Post a reply to this message

From: Mike Williams
Subject: Re: special effect: glass-sphere with alpha-background
Date: 27 Jan 2005 20:41:51
Message: <feLEoDAoeZ+BFwcK@econym.demon.co.uk>
Wasn't it Kaeru Gaman who wrote:
>> Then you can make all the other objects in the scene be no_image, so
>> they won't be seen directly but will be seen in the refracted
>> reflection.
>
>i dint discover the no_image command yet.
>
>will it also work for only refracted rays? that would made it possible, to
>just not chenge the scene, only add the no_image flag to the background
>objects...

No. Objects with no_image are not visible when refracted, only when
reflected.


#declare MIRROR=1;      // toggles the mirror
camera {location  <0,0,-10> look_at <0,0,0> angle 30}
light_source {<-30, 100, -30> color rgb 1}
background{rgb 1}
// glass ball
sphere {0,1 
  pigment {rgbt <1,1,1,0.9>}
  interior {ior 1.2}
}
#if (MIRROR)            // add the mirror
  disc{0,-z,1 finish{reflection 1}}
#end
// a background object
text {ttf "crystal.ttf","POV-Ray",0.1,0
  pigment {rgb x}
  translate <-1.5,-0.1,4>
  #if (MIRROR)
    scale <1,1,-1>      // reposition it
    no_image            // make invisible
  #end
}


-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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