POV-Ray : Newsgroups : povray.general : selective transparency of objects Server Time
31 Jul 2024 00:33:17 EDT (-0400)
  selective transparency of objects (Message 1 to 10 of 10)  
From: kike
Subject: selective transparency of objects
Date: 30 Apr 2008 05:30:00
Message: <web.48183bc4aed456fcbe7bfb550@news.povray.org>
I'm nearly sure the answer to this question is a big NO but anyway:

Is it possible to have an object which is transparent for the whole scene but
opaque for another single object. The idea is to reach the effect (in an
animation) of objects dissappearing behind apparently non-existing objects.

So my first guess is to define an object this way:

object{target}
object{<x,y,z> does not interact with nothing but with object{target} }

or

object{target}
object{<x,y,z> completly transparent but for object{target} }

I know it sounds stupid but DON'T SHOOT ME I'M ONLY THE PIANO PLAYER

thanks in advance


Post a reply to this message

From: Chris B
Subject: Re: selective transparency of objects
Date: 30 Apr 2008 06:07:24
Message: <481844dc$1@news.povray.org>
"kike" <dry### [at] hotmailcom> wrote in message 
news:web.48183bc4aed456fcbe7bfb550@news.povray.org...
>
> I'm nearly sure the answer to this question is a big NO but anyway:
>
> Is it possible to have an object which is transparent for the whole scene 
> but
> opaque for another single object. The idea is to reach the effect (in an
> animation) of objects dissappearing behind apparently non-existing 
> objects.
>

Hi,

You could fairly simply achieve something pretty similar if you can define 
the shape of your 'transparent' object as a prism with the outline of the 
shape as it would appear from the camera position.

Here's my thinking:
1. Define a prism object with a conic_sweep that starts back beyond the 
object you wish to dissappear and that converges to a single point at the 
camera position.
2. This object won't appear in the scene, but you can use it in a CSG 
operation to cut away the part of the dissappearing object that would be 
'concealed' by the 'transparent' object.

Clearly shadows and mirrored reflections could interfere with this effect, 
but the complexity of dealing with/faking those depends on the details of 
the scene/animation you're trying to build.

Regards,
Chris B.


Post a reply to this message

From: Chris B
Subject: Re: selective transparency of objects
Date: 30 Apr 2008 06:16:04
Message: <481846e4$1@news.povray.org>
"Chris B" <nom### [at] nomailcom> wrote in message 
news:481844dc$1@news.povray.org...
>
> You could fairly simply achieve something pretty similar if you can define 
> the shape of your 'transparent' object as a prism with the outline of the 
> shape as it would appear from the camera position.

BTW. You can define a prism with the outline of more or less any shape you 
can define in POV-Ray by rendering an image of it with sufficient contrast, 
loading the bitmap image into Inkscape, using 'Path', 'Trace Bitmap' and 
saving as a POV-Ray prism object.

Regards,
Chris B.


Post a reply to this message

From: kike
Subject: Re: selective transparency of objects
Date: 30 Apr 2008 06:45:00
Message: <web.48184cb7890aaf24be7bfb550@news.povray.org>
"Chris B" <nom### [at] nomailcom> wrote:
> "Chris B" <nom### [at] nomailcom> wrote in message
> news:481844dc$1@news.povray.org...
> >
> > You could fairly simply achieve something pretty similar if you can define
> > the shape of your 'transparent' object as a prism with the outline of the
> > shape as it would appear from the camera position.
>
> BTW. You can define a prism with the outline of more or less any shape you
> can define in POV-Ray by rendering an image of it with sufficient contrast,
> loading the bitmap image into Inkscape, using 'Path', 'Trace Bitmap' and
> saving as a POV-Ray prism object.
>
> Regards,
> Chris B.

Thanks Chris, you gave me the clue. It was simpler than I thought, the answer
for my particular problem is to use CGS (difference). As simpler than that.
Actually now I see it is a quite stupid question, jajaja, look at this
www.enriquesahagun.es/cgsperiment.avi

thanks again!!!


Post a reply to this message

From: John VanSickle
Subject: Re: selective transparency of objects
Date: 30 Apr 2008 08:42:29
Message: <48186935@news.povray.org>
kike wrote:
> I'm nearly sure the answer to this question is a big NO but anyway:
> 
> Is it possible to have an object which is transparent for the whole scene but
> opaque for another single object. The idea is to reach the effect (in an
> animation) of objects dissappearing behind apparently non-existing objects.

The way I'd do it:

1: Render one version of the scene, with the object that you want to vanish.

2: Render another version, without the object.

3: Render a mask version, which contains the "blocking" object as solid 
full-ambient white, and everything else as black.

Ensure that the camera is positioned in the same way for all three renders.

4: Render a fourth scene:

#declare pigMask=pigment { image_map { png "mask.png" } }
#declare pigWith=pigment { image_map { png "with.png" } }
#declare pigWithout=pigment { image_map { png "without.png" } }

plane { -z,0
   pigment { pigment_pattern { pigMask }
     pigment_map {
       [0 pigWith]
       [1 pigWithout]
     }
     translate -.5
   }
   finish { ambient 1 diffuse 0 }
}

camera { orthographic
   right x
   up y
   direction z
   location -z
}

Hope this helps,
John


Post a reply to this message

From: Bryan Valencia
Subject: Re: selective transparency of objects
Date: 30 Apr 2008 11:25:56
Message: <48188f84@news.povray.org>
kike wrote:
> www.enriquesahagun.es/cgsperiment.avi


Post a reply to this message


Attachments:
Download 'cantplay.jpg' (15 KB)

Preview of image 'cantplay.jpg'
cantplay.jpg


 

From: Chris B
Subject: Re: selective transparency of objects
Date: 30 Apr 2008 13:52:29
Message: <4818b1dd@news.povray.org>
"Bryan Valencia" <no### [at] waycom> wrote in message 
news:48188f84@news.povray.org...
> kike wrote:
>> www.enriquesahagun.es/cgsperiment.avi
>

I couldn't play it either.


Post a reply to this message

From: Alain
Subject: Re: selective transparency of objects
Date: 30 Apr 2008 14:12:07
Message: <4818b677$1@news.povray.org>
Chris B nous illumina en ce 2008/04/30 13:52 -->
> "Bryan Valencia" <no### [at] waycom> wrote in message 
> news:48188f84@news.povray.org...
>> kike wrote:
>>> www.enriquesahagun.es/cgsperiment.avi
> 
> I couldn't play it either. 
> 
> 
Play just good with IrfanView.

-- 
Alain
-------------------------------------------------
Never underestimate the power of stupid people in large groups.


Post a reply to this message

From: kike
Subject: Re: selective transparency of objects
Date: 30 Apr 2008 15:00:00
Message: <web.4818c108890aaf24be7bfb550@news.povray.org>
Bryan Valencia <no### [at] waycom> wrote:
> kike wrote:
> > www.enriquesahagun.es/cgsperiment.avi

SORRY, dont know why the codec I used doesnt work, I'll try with another codec.
But anyway, it was just this:

difference{
sphere{...  translate clock*x}
cylinder
}

this way you can see the sphere while is not in contact with the cylinder (the
cylinder, this way is not visible). Once the sphere is in contact with the
cylinder, the sphere disappears as well. So you reach the effect that there is
something invisible avoiding the visibility of the sphere.


Post a reply to this message

From: Bryan Valencia
Subject: Re: selective transparency of objects
Date: 3 May 2008 02:48:18
Message: <481c0ab2$1@news.povray.org>
As it turns out, if I save it to my desktop and play it from there it works fine.

kike wrote:
> Bryan Valencia <no### [at] waycom> wrote:
>> kike wrote:
>>> www.enriquesahagun.es/cgsperiment.avi
> 
> SORRY, dont know why the codec I used doesnt work, I'll try with another codec.
> But anyway, it was just this:
> 
> difference{
> sphere{...  translate clock*x}
> cylinder
> }
> 
> this way you can see the sphere while is not in contact with the cylinder (the
> cylinder, this way is not visible). Once the sphere is in contact with the
> cylinder, the sphere disappears as well. So you reach the effect that there is
> something invisible avoiding the visibility of the sphere.
> 
>


Post a reply to this message

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