POV-Ray : Newsgroups : povray.general : Ambient 1.0 with shadows Server Time
6 Nov 2024 02:23:49 EST (-0500)
  Ambient 1.0 with shadows (Message 1 to 4 of 4)  
From: Lazarus Plath
Subject: Ambient 1.0 with shadows
Date: 2 Oct 2004 22:53:37
Message: <qqazxxsw-2B051D.21531702102004@news.povray.org>
Hi,
I'm trying to render shapes sitting on a plane and I want the shape to 
cast shadows onto the plane but i want the plane to be a solid color, 
namely white.

Depending on the light and camera position the plane will have gradients 
as expected. I tried setting ambient to 1.0 for the plane but then no 
shadows appear on it. I've also tried setting diffuse to greater than 
1.0 to blow it out but it begins to alias at the edges of the shape and 
it's not always applicable. I also tried rendering two images, with and 
without the shape then using photoshop to remove those pixels that are 
the same but this isn't working out either, extra pixels along edges.

You can see what I'm trying to do here...
<http://homepage.mac.com/lazarusp/media/media.html>
It was very tricky to make that and I was very limited in light and 
camera positions, plus I ultimately had to do some work in photoshop. 

So, is there a way to have a texture that is a solid color, like ambient 
1.0, yet still have shadows cast on it?

-Lazarus


Post a reply to this message

From: PoD
Subject: Re: Ambient 1.0 with shadows
Date: 3 Oct 2004 00:45:13
Message: <pan.2004.10.03.04.45.10.198364@internode.on.net>
On Sat, 02 Oct 2004 21:53:18 -0500, Lazarus Plath wrote:

> Hi,
> I'm trying to render shapes sitting on a plane and I want the shape to 
> cast shadows onto the plane but i want the plane to be a solid color, 
> namely white.
> 
> Depending on the light and camera position the plane will have gradients 
> as expected. I tried setting ambient to 1.0 for the plane but then no 
> shadows appear on it. I've also tried setting diffuse to greater than 
> 1.0 to blow it out but it begins to alias at the edges of the shape and 
> it's not always applicable. I also tried rendering two images, with and 
> without the shape then using photoshop to remove those pixels that are 
> the same but this isn't working out either, extra pixels along edges.
> 
> You can see what I'm trying to do here...
> <http://homepage.mac.com/lazarusp/media/media.html>
> It was very tricky to make that and I was very limited in light and 
> camera positions, plus I ultimately had to do some work in photoshop. 
> 
> So, is there a way to have a texture that is a solid color, like ambient 
> 1.0, yet still have shadows cast on it?
> 
> -Lazarus

Try setting brilliance to 0
This will cause the rendered colour to be constant
regardless of angle between the surface and light source.


Post a reply to this message

From: Mike Williams
Subject: Re: Ambient 1.0 with shadows
Date: 3 Oct 2004 02:31:49
Message: <teiI4BAqs5XBFwT0@econym.demon.co.uk>
Wasn't it Lazarus Plath who wrote:
>Hi,
>I'm trying to render shapes sitting on a plane and I want the shape to 
>cast shadows onto the plane but i want the plane to be a solid color, 
>namely white.
>
>Depending on the light and camera position the plane will have gradients 
>as expected. I tried setting ambient to 1.0 for the plane but then no 
>shadows appear on it. I've also tried setting diffuse to greater than 
>1.0 to blow it out but it begins to alias at the edges of the shape and 
>it's not always applicable. I also tried rendering two images, with and 
>without the shape then using photoshop to remove those pixels that are 
>the same but this isn't working out either, extra pixels along edges.
>
>You can see what I'm trying to do here...
><http://homepage.mac.com/lazarusp/media/media.html>
>It was very tricky to make that and I was very limited in light and 
>camera positions, plus I ultimately had to do some work in photoshop. 
>
>So, is there a way to have a texture that is a solid color, like ambient 
>1.0, yet still have shadows cast on it?

Set the diffuse to a value greater than 1.

Since you actually want pure white, you can set the diffuse to a a
ridiculously high value and the result will be clipped back to pure
white.

"finish {diffuse 100 ambient 0}" will give a pure white plain with pure
black shadows if you have a single light source.

"finish {diffuse 100 ambient -100}" will give a pure white plane with
all shadows pure black if you have two light sources.

In general, the diffuse value controls the brightness of the parts that
are illuminated and the ambient value controls the brightness of the
parts that are in shadow. (Which seems to be the opposite way round from
how you were trying to use them). They can take values below zero and
greater than one.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Lazarus Plath
Subject: Re: Ambient 1.0 with shadows
Date: 3 Oct 2004 18:34:43
Message: <qqazxxsw-4789CC.17344103102004@news.povray.org>
In article <pan### [at] internodeonnet>,
 PoD <pod### [at] internodeonnet> wrote:

> Try setting brilliance to 0
> This will cause the rendered colour to be constant
> regardless of angle between the surface and light source.

Perfect, that's what I was looking for.

The problem with setting diffuse higher is that shape edges begin to 
alias, I guess it's giving more weight to the plane with diffuse 100. 
But it's good to know better (sic?!) how ambient/diffuse works.

Now I can litter webpages with little 3d objects seemlessly :)
Thanks all
-Lazarus


Post a reply to this message

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