POV-Ray : Newsgroups : povray.newusers : Creating soft shadows : Re: Creating soft shadows Server Time
24 Apr 2024 14:12:13 EDT (-0400)
  Re: Creating soft shadows  
From: Alain Martel
Date: 2 Dec 2021 10:13:57
Message: <61a8e2b5$1@news.povray.org>
Le 2021-12-02 à 03:30, Kenneth a écrit :
> "TheRealMorris" <nomail@nomail> wrote:
>>
>> I've been playing around with some top-down scenes using an orthographic
>> camera and one of the things I've tried to achieve, are what I would
>> call "soft shadows"...
> 
> I arrived at something that looks like your example by using a "parallel linear
> area_light", which I had never tried before. I used a cylinder for the object,
> half-buried in the main plane (specifically so that there are no 'shadowed
> undercuts' between cylinder and plane-- which seems to improve the effect.) My
> renders are top-down too, using an orthographic camera.
> 
> I have not done a detailed analysis of *how* the area_light actually works in
> this situation-- but I think it is basically horizontal, hovering over the
> object, and only 'one-dimensional' in z (the 'linear' aspect of the light, like
> a long tube). The light's 'area' appears to be split more or less evenly behind
> the object and in front of it (-z and +z)-- but I'm not sure. In any case, that
> seems to be the key to getting this shadow effect.
> 
> The various values I used in the light are kind of extreme, but make the shadow
> smooth and with a smooth gradation. Play around with the light's z-dimension
> (and its z-translation) to see what happens; the thing to watch out for is the
> light casting a partial shadow of the cylinder in the opposite direction-- which
> should be avoided, of course!
> 
> I also tried this exact same set-up with a text{...} object-- which did not work
> very well. I suspect that the light's z-dimension and translation need to be
> changed, maybe radically.
> 
> -------
> #version 3.8; // or whatever
> global_settings{assumed_gamma 1.0}
> 
> camera {
>    orthographic
>    location  <.5, 5, .15>
>    look_at   <.5, 0, .151>
>    right     x*image_width/image_height
>    direction z
>    angle 17
> }
> 
> light_source {
>    <0,0,0>  // light's position (translated below)
>    color rgb 6.0
>    area_light
>    <0, 0, 0> <0, 0, 30> // lights spread out across this distance (x * z)
>    1, 33  // total number of lights in grid-- a 'linear' light
>    adaptive 2 // ?
>    jitter
>   // circular // No!
>   // orient // No!
>    translate <0, .75, -12.5>
>    parallel
>    point_at -y // <0,-1,0>; or +z?  (<0,0,1>) ?
> }
> 
> plane{y,0
> texture{
>   pigment{rgb 1}
>   finish{ambient 0 emission 0 diffuse .8}
>   }
> }
> 
> cylinder{0,1*x,.03  // half-buried in plane
> // OR...
> /*
> text{
>      ttf "timrom.ttf" "POV-Ray"
>      .2, 0
>      scale .2*<1,.17,1>
>      translate <0,0,0>
> */
> texture{
>   pigment{rgb .4*<0,1,1>}
>   finish{ambient 1 emission 0 diffuse 0}
>   }
> //rotate 30*y
> }
> 
For the two cylinders, adaptive 1, or maybe even adaptive 0, would 
probably have been enough.
For the text object, it's not. You probably need to use adaptive 3 or 
even 4 to get a correct result.


Post a reply to this message

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