POV-Ray : Newsgroups : povray.newusers : shadows/sunlight : Re: shadows/sunlight Server Time
19 Apr 2024 05:13:07 EDT (-0400)
  Re: shadows/sunlight  
From: Alain Martel
Date: 6 Dec 2020 16:34:32
Message: <5fcd4e68$1@news.povray.org>
Le 2020-12-05 à 12:02, Julia a écrit :
> Hi,
> there is another problem that i have been trying to figure out for the past
> week, but i'm just starting to give up.
> The problem is that there arent any shadows. Not only on the other side of the
> sphere but also when its in front of another nothing happens.
> Also when i dont put "ambiet" the spheres just get dark on both sides, still no
> shadow.
> here is the code:
> 
> #include "colors.inc"
> 
> camera {
>          location <5,10,-60>
>          look_at <0,0,0>
>          angle 25
>          }
> 
> light_source {
>          <0,0,0>
> 
> 
>                 }
> 
> 
> // słońce
>   sphere {
>       <0,0,0>, 10
>     pigment {
>          bozo
>                  turbulence 5
>           color_map {
>          [0.0 color <1,0,0>]
>          [0.25 color <1,1,0>]
>          [1.0 color <1,0.65,0>]
>          }
>       scale 3
>     }
>     normal {bumps 1.0}
>     finish {ambient 1}
> 
>   scale 1/6
> 
> 
> 
>    rotate <0,380*clock,0> //obrót
> }
> 

That sphere blocks all the light from your light source.
You have two solutions :
1) Add «no_shadow» to the sphere.
2) Bind it to the light using the looks_like
Ex.:
light_source{LightLocation rgb 1
   looks_like{
     sphere{0 1 pigment{rgb 1}finish{emission 1}}
   }
}

The origin for that sphere is the location of the light, so, it need to 
be build around <0,0,0> no mater where the light is located.


Post a reply to this message

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