POV-Ray : Newsgroups : povray.general : Ambient 1.0 with shadows : Re: Ambient 1.0 with shadows Server Time
2 Aug 2024 14:18:52 EDT (-0400)
  Re: Ambient 1.0 with shadows  
From: Mike Williams
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

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