POV-Ray : Newsgroups : povray.general : Alpha transparency and shadows Server Time
30 Jul 2024 16:25:45 EDT (-0400)
  Alpha transparency and shadows (Message 1 to 4 of 4)  
From: SharkD
Subject: Alpha transparency and shadows
Date: 24 Nov 2008 23:00:00
Message: <web.492b775ec1d6f3dd1894f2ae0@news.povray.org>
I've created an object that lies above a transparent plane. I would like the
object to cast a shadow over the plane and for the shadow to be visible. Also,
the strength of the shadow should be translated into the alpha channel. How do
I accomplish this?

-Mike


Post a reply to this message

From: Mike Williams
Subject: Re: Alpha transparency and shadows
Date: 24 Nov 2008 23:29:03
Message: <jPBnUtA433KJFwar@econym.demon.co.uk>
Wasn't it SharkD who wrote:
>I've created an object that lies above a transparent plane. I would like the
>object to cast a shadow over the plane and for the shadow to be visible. Also,
>the strength of the shadow should be translated into the alpha channel. How do
>I accomplish this?

Does this help?

        http://www.econym.demon.co.uk/shadowtut/

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: SharkD
Subject: Re: Alpha transparency and shadows
Date: 26 Nov 2008 02:10:00
Message: <web.492cf546d56e3a4a353952be0@news.povray.org>
Mike Williams <nos### [at] econymdemoncouk> wrote:
> Does this help?
>
>         http://www.econym.demon.co.uk/shadowtut/
>
> --
> Mike Williams
> Gentleman of Leisure

Thanks! That helps. I can see how it might work when using parallel lights, but
I'm not convinced of the accuracy when using other types of lights, especially
when you're fiddling with them in the "first pass".

-Mike


Post a reply to this message

From: clipka
Subject: Re: Alpha transparency and shadows
Date: 29 Nov 2008 06:30:01
Message: <web.493126b1d56e3a4a4dea3830@news.povray.org>
"SharkD" <nomail@nomail> wrote:
> Mike Williams <nos### [at] econymdemoncouk> wrote:
> > Does this help?
> >
> >         http://www.econym.demon.co.uk/shadowtut/
> >
> > --
> > Mike Williams
> > Gentleman of Leisure
>
> Thanks! That helps. I can see how it might work when using parallel lights, but
> I'm not convinced of the accuracy when using other types of lights, especially
> when you're fiddling with them in the "first pass".
>
> -Mike

I had a quick glance at the tutorial; it will work with any type of lighting,
even exotic stuff, multiple light sources, and what-have-you.

It will run into real problems though if the shadows extend far into the
distance. You'd need to render an awfully high resolution image in the first
pass then.

I guess a better approach would be to shoot the first pass from the final camera
perspective as well (but otherwise as described); then, in the second pass,
don't bother about the result of the first one, but simply make the whole plane
transparent and render it with alpha channel output. Merge the two shots
together with your favourite image processing software, using the first shot as
a transparency mask for an all-black background layer, and place the second shot
in another layer on top of it.

Note that this approach also has the benefit of not being limited to shadows
cast onto flat planes.


Post a reply to this message

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