POV-Ray : Newsgroups : povray.general : alpha transparency help Server Time
6 Aug 2024 12:28:14 EDT (-0400)
  alpha transparency help (Message 1 to 8 of 8)  
From: Corey Woodworth
Subject: alpha transparency help
Date: 4 Apr 2002 14:27:23
Message: <3caca91b@news.povray.org>
Ok I made a pic with an all white background by making the actual background
white. I also added an infinte plane that is white with an ambient of .4 as
a floor. I did this because I wanted the objects I placed in the scene to
have shadows on a floor but still have the floor indistinguishable from the
sky. My first problem is that ambient .4 really lightens up the shadows but
if I lower the ambient the horizon becomes visible. My other problem is I
want to make this pic alpha transparent. When I do so the white background
becomes transparent but the floor doesn't. Is there a way I can give the
floor a no_image tag or something similar but still let shadows be cast on
it.

Thanks
Corey


Post a reply to this message

From: Christopher James Huff
Subject: Re: alpha transparency help
Date: 4 Apr 2002 15:08:17
Message: <chrishuff-1C5ADB.15093504042002@netplex.aussie.org>
In article <3caca91b@news.povray.org>,
 "Corey Woodworth" <cdw### [at] mpinetnet> wrote:

> Ok I made a pic with an all white background by making the actual background
> white. I also added an infinte plane that is white with an ambient of .4 as
> a floor. I did this because I wanted the objects I placed in the scene to
> have shadows on a floor but still have the floor indistinguishable from the
> sky. My first problem is that ambient .4 really lightens up the shadows but
> if I lower the ambient the horizon becomes visible. My other problem is I
> want to make this pic alpha transparent. When I do so the white background
> becomes transparent but the floor doesn't. Is there a way I can give the
> floor a no_image tag or something similar but still let shadows be cast on
> it.

That would be meaningless, of course...you can't have shadows on nothing.
There are several simple ways to solve this, the easiest would be: Just 
don't use an infinite plane. Use a box or something just large enough 
for the shadows, but not big enough for light fading to make a 
difference. Using a diffuse slightly larger than 1 would help make the 
edge invisible.

-- 
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/


Post a reply to this message

From: Warp
Subject: Re: alpha transparency help
Date: 4 Apr 2002 15:19:58
Message: <3cacb56e@news.povray.org>
AFAIK no-one has yet invented a feasible trick which would work always
so that you could get semi-transparent dark shadows without anything else.

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From:
Subject: Re: alpha transparency help
Date: 4 Apr 2002 15:50:00
Message: <64epau09jm2je8i8bofek3tcrsg536lu8q@4ax.com>
On Thu, 4 Apr 2002 14:32:26 -0500, "Corey Woodworth" <cdw### [at] mpinetnet> wrote:
> Is there a way I can give the
> floor a no_image tag or something similar but still let shadows be cast on
> it.

Try this:

1. Create plane/background as object in variable.
2. Create your model as object in variable.
3. Trace grid of rays:
  - resolution of grid (grid_res) is small becouse makes smoothness/accuracy
    of edges in shadow
  - whole grid contains all vertices of bounding box of your model
  - everyt ray start from light_source and goes along grid
  - test intersection of ray with model
4. For every succesful intersection in point 3 test intersection of the same
    ray with your background object
5. For every succesful intersection in point 4 create disc with
  - center at intersection point
  - normal at intersection point
  - radius = grid_res / sqrt(2)
  - material as in background object

Tell me if it works, I never tested.

ABX


Post a reply to this message

From: Hugo
Subject: Re: alpha transparency help
Date: 4 Apr 2002 15:56:15
Message: <3cacbdef@news.povray.org>
> Try this:

Oh ... ;o)  that looks complex compared to my idea: Leave ambient and
instead set an extremely high specular or phong reflection. At some point
it's all gonna be white, except the shadows will still be shadows!

Best wishes,
Hugo


Post a reply to this message

From: Christopher James Huff
Subject: Re: alpha transparency help
Date: 4 Apr 2002 16:31:06
Message: <chrishuff-3ABE17.16322304042002@netplex.aussie.org>
In article <3cacbdef@news.povray.org>, "Hugo" <hua### [at] post3teledk> 
wrote:

> Oh ... ;o)  that looks complex compared to my idea: Leave ambient and
> instead set an extremely high specular or phong reflection. At some point
> it's all gonna be white, except the shadows will still be shadows!

Just set brilliance to 0, and there won't be any shading done at all, so 
no more horizon problems. Or just don't use an infinite plane...no 
horizon at all.

-- 
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/


Post a reply to this message

From: Peter Hertel
Subject: Re: alpha transparency help
Date: 4 Apr 2002 17:48:56
Message: <3cacd858@news.povray.org>
It just came to me..
white plane
no_image objects
orthographic camera above the scene
save the image and image_map it onto a box, make white transparent
remove plane, no_image and move camera to original position.
Now the image_map would be the shadows right?
Haven't tried it out, but I imagine it could do the trick?
If not, the white box is the way..

--
Peter
http://hertel.no/peter

> Ok I made a pic with an all white background by making the actual
background
> white. I also added an infinte plane that is white with an ambient of .4
as
> a floor. I did this because I wanted the objects I placed in the scene to
> have shadows on a floor but still have the floor indistinguishable from
the
> sky. My first problem is that ambient .4 really lightens up the shadows
but
> if I lower the ambient the horizon becomes visible. My other problem is I
> want to make this pic alpha transparent. When I do so the white background
> becomes transparent but the floor doesn't. Is there a way I can give the
> floor a no_image tag or something similar but still let shadows be cast on
> it.
>
> Thanks
> Corey
>
>


Post a reply to this message

From: Corey Woodworth
Subject: Re: alpha transparency help
Date: 5 Apr 2002 16:31:32
Message: <3cae17b4$1@news.povray.org>
I figured out a way to do it but it is all post processing. First I make a
pic with no plane and then a 2nd one with the plane. I combine the
transparent section of the first pic with the rest of the 2nd pic to make an
alpha channel. Works nice but I gotta render twice.

Corey


Post a reply to this message

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