POV-Ray : Newsgroups : povray.advanced-users : Transparent plane with non-transparent shadows? Server Time
25 Nov 2024 23:34:21 EST (-0500)
  Transparent plane with non-transparent shadows? (Message 1 to 10 of 15)  
Goto Latest 10 Messages Next 5 Messages >>>
From: Anders K 
Subject: Transparent plane with non-transparent shadows?
Date: 6 Dec 2001 21:12:34
Message: <3c102592@news.povray.org>
Is it possible to create a plane that is transparent in the light but
becomes slightly non-transparent in shadow? I know this isn't physically
accurate, but I'm basically trying to create a transparent image that casts
a shadow on its background. I'm using version 3.5 beta.

Anders


Post a reply to this message

From: bob h
Subject: Re: Transparent plane with non-transparent shadows?
Date: 7 Dec 2001 01:24:35
Message: <3c1060a3@news.povray.org>
Maybe  no_image  is all you need to put in the plane.  I did that for a
drop-shadow of my desktop icons and used the result for wallpaper.  I think
I did anyhow, either that or it was light_group


"Anders K." <and### [at] f2scom> wrote in message
news:3c102592@news.povray.org...
> Is it possible to create a plane that is transparent in the light but
> becomes slightly non-transparent in shadow? I know this isn't physically
> accurate, but I'm basically trying to create a transparent image that
casts
> a shadow on its background. I'm using version 3.5 beta.


Post a reply to this message

From: Warp
Subject: Re: Transparent plane with non-transparent shadows?
Date: 7 Dec 2001 07:24:55
Message: <3c10b516@news.povray.org>
bob h <omn### [at] charternet> wrote:
: Maybe  no_image  is all you need to put in the plane.

  If you don't see the plane, you don't see the shadow cast onto it either...

-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

From: Anders K 
Subject: Re: Transparent plane with non-transparent shadows?
Date: 7 Dec 2001 09:02:42
Message: <3c10cc02@news.povray.org>
> Maybe  no_image  is all you need to put in the plane.  I did that for a
> drop-shadow of my desktop icons and used the result for wallpaper.

No_image on the plane didn't work. I think what you're thinking of is making
the *object* have no_image so all you can see is its shadow. I'm looking for
something slightly different; I want both the object and the shadow to show
up, but the rest of the plane to be transparent.

Any other ideas, anyone?

Anders


Post a reply to this message

From: Warp
Subject: Re: Transparent plane with non-transparent shadows?
Date: 7 Dec 2001 11:02:29
Message: <3c10e814@news.povray.org>
Anders K. <and### [at] f2scom> wrote:
: Any other ideas, anyone?

  Thinking about how the raytracing/lighting algorithms used in povray work,
I have the feeling that it's not possible.
  A shadow is just a non-lit part of the pigment of a surface. This means that
the light source does not contribute to lightening up that part of the surface
pigment. That is, the pigment just gets darker.
  If there's no pigment to show, there can't be a darkening of this pigment
either.

  It might be possible using other methods than lighting calculations. It may
be possible to make a copy of the object and apply a proper semi-transparent
black pigment to it. Then this object is skewed and scaled properly so that
it looks like projected onto the plane. This way you would have an actual
object which looks like the shadow of the original object.
  I'm not sure yet of the exact transformations needed for this "shadow"
object.

-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

From: Mick Hazelgrove
Subject: Re: Transparent plane with non-transparent shadows?
Date: 7 Dec 2001 11:25:23
Message: <3c10ed73@news.povray.org>
Just an untried suggestion that will need some tweaking. Render the pic with
a white plane so the shadow is cast and use this as a material map,
pigment_pattern,  or image_pattern making the white part transparent and the
black whatever you want.

Mick


 "Warp" <war### [at] tagpovrayorg> wrote in message
news:3c10e814@news.povray.org...
> Anders K. <and### [at] f2scom> wrote:
> : Any other ideas, anyone?
>
>   Thinking about how the raytracing/lighting algorithms used in povray
work,
> I have the feeling that it's not possible.
>   A shadow is just a non-lit part of the pigment of a surface. This means
that
> the light source does not contribute to lightening up that part of the
surface
> pigment. That is, the pigment just gets darker.
>   If there's no pigment to show, there can't be a darkening of this
pigment
> either.
>
>   It might be possible using other methods than lighting calculations. It
may
> be possible to make a copy of the object and apply a proper
semi-transparent
> black pigment to it. Then this object is skewed and scaled properly so
that
> it looks like projected onto the plane. This way you would have an actual
> object which looks like the shadow of the original object.
>   I'm not sure yet of the exact transformations needed for this "shadow"
> object.
>
> --
> #macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
> rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
> ],13),8)-3,10>#end blob{N(array[6]{11117333955,
> 7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

From: bob h
Subject: Re: Transparent plane with non-transparent shadows?
Date: 7 Dec 2001 11:54:01
Message: <3c10f429@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message
news:3c10b516@news.povray.org...
> bob h <omn### [at] charternet> wrote:
> : Maybe  no_image  is all you need to put in the plane.
>
>   If you don't see the plane, you don't see the shadow cast onto it
either...

You might have misunderstood the idea, or maybe I did.  If it's about using
a transparent object to cast a shadow onto a nontransparent object then the
following should do okay.

camera {
  location  -100*z
        orthographic
  right x*image_width/image_height
  look_at   0
}

box {
  -<image_width,image_height,0>/2,<image_width,image_height,50>/2
  pigment {rgb <0,1,0>}
  finish {ambient .25 diffuse .75}
}

#declare Icons=
box {
  -<image_width,image_height,0>/2,<image_width,image_height,0>/2
  pigment {image_map {"shadows" map_type 0 once transmit 24, 1}
        translate <-.5,-.5,0> scale <image_width,image_height,1>
  }
  finish {ambient 1 diffuse 0}
  translate <0,0,-2>
}

//union {
light_source {
  0,
  1.5
  area_light <150,0,0>,<0,150,0>,4,4 jitter
  translate -1000*z
  rotate <45,45,0>
}

object {Icons no_image}

This is how I made the drop-shadow for my desktop icons which were imaged by
screen capture first then the solid background color made transparent.
I was also thinking this could be done with the "tiny scaled and near light"
trick to leave the actual object out of view.
The other way the concept could be interpreted is for the object where the
shadow falls across to be transparent yet still show that shadow on it.
Thinking maybe this is what got conveyed but having read the original
message again it sounds more like what I first thought.
--
text{ttf"arial","bob h",.1,0pigment{rgb 9}translate<-1,-.2,3>}


Post a reply to this message

From: Trevor Quayle
Subject: Re: Transparent plane with non-transparent shadows?
Date: 7 Dec 2001 12:03:30
Message: <3c10f662$1@news.povray.org>
"bob h" <omn### [at] charternet> wrote in message
news:3c10f429@news.povray.org...
> "Warp" <war### [at] tagpovrayorg> wrote in message
> news:3c10b516@news.povray.org...
> > bob h <omn### [at] charternet> wrote:
> > : Maybe  no_image  is all you need to put in the plane.
> >
> >   If you don't see the plane, you don't see the shadow cast onto it
> either...
>
> You might have misunderstood the idea, or maybe I did.  If it's about
using
> a transparent object to cast a shadow onto a nontransparent object then
the
> following should do okay.

No, I think he wants a plane (say in mid air) upon which shadows are cast
and are visible, but where there is no shdow, is completely transparent.

-tgq


Post a reply to this message

From: bob h
Subject: Re: Transparent plane with non-transparent shadows?
Date: 7 Dec 2001 12:10:16
Message: <3c10f7f8@news.povray.org>
Ooops.  Yes, having now read the other message by Anders I see how he's
wanting it to be.  Sorry.
--
text{ttf"arial","bob h",.1,0pigment{rgb 9}translate<-1,-.2,3>}

"Trevor Quayle" <Tin### [at] hotmailcom> wrote in message
news:3c10f662$1@news.povray.org...
>
> No, I think he wants a plane (say in mid air) upon which shadows are cast
> and are visible, but where there is no shdow, is completely transparent.


Post a reply to this message

From: Anders K 
Subject: Re: Transparent plane with non-transparent shadows?
Date: 7 Dec 2001 19:01:19
Message: <3c11584f$1@news.povray.org>
>   Thinking about how the raytracing/lighting algorithms used in povray
work,
> I have the feeling that it's not possible.

Yeah, I was afraid that would be the case...

Although I realized it might be possible if transmit/filter could be
included in a light's color, not just rgb. Then you could "shine" the
transparency onto the plane. Of course, this makes no sense physically, but
it could still be useful.

>   It might be possible using other methods than lighting calculations. It
may
> be possible to make a copy of the object and apply a proper
semi-transparent
> black pigment to it. Then this object is skewed and scaled properly so
that
> it looks like projected onto the plane. This way you would have an actual
> object which looks like the shadow of the original object.

This is an interesting idea -- I'll try it. Do you think that by making
several semi-transparent copies scaled in the right way, you could simulate
an area light?


Post a reply to this message

Goto Latest 10 Messages Next 5 Messages >>>

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