POV-Ray : Newsgroups : povray.newusers : Creating soft shadows : Re: Creating soft shadows Server Time
17 Aug 2022 04:02:20 EDT (-0400)
  Re: Creating soft shadows  
From: Kenneth
Date: 2 Dec 2021 03:35:00
Message: <web.61a8841fc6a4be144cef624e6e066e29@news.povray.org>
"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
}


Post a reply to this message


Attachments:
Download 'parallel_area_light_shadow_exp.jpg' (60 KB)

Preview of image 'parallel_area_light_shadow_exp.jpg'
parallel_area_light_shadow_exp.jpg


 

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