POV-Ray : Newsgroups : povray.newusers : why no shadow? Server Time
26 Nov 2024 14:59:02 EST (-0500)
  why no shadow? (Message 1 to 3 of 3)  
From: Ian Gilmour
Subject: why no shadow?
Date: 3 Apr 2004 04:41:29
Message: <406e86c9@news.povray.org>
Why don't I get a shadow cast on the ground from the flags in the following
scene?
I just see a shadow from the pole and the edge of the flag?

cheers,

Ian

#version 3.5;
global_settings {  assumed_gamma 1.0 }
//--------------------------------------------------------------------------
#include "textures.inc"
#include "shapes.inc"
#include "shapes2.inc"
#include "functions.inc"
#include "math.inc"
#include "transforms.inc"
//--------------------------------------------------------------------------
// camera ------------------------------------------------------------------
#declare Camera_0 = camera {ultra_wide_angle angle 75          // front view
                            location  <0.0 , 7.0 ,-13.0>
                            right     x*image_width/image_height
                            look_at   <0.0 , 1.0 , 0.0>}
camera{Camera_0}
// sun ---------------------------------------------------------------------
light_source{< 1500,2500,-2500> color <1,1,1>}
// sky ---------------------------------------------------------------------
sky_sphere { pigment { gradient <0,1,0>
                       color_map { [0.00 rgb <1.0,1.0,1.0>]
                                   [0.30 rgb <0.0,0.1,1.0>]
                                   [0.70 rgb <0.0,0.1,1.0>]
                                   [1.00 rgb <1.0,1.0,1.0>]
                                 }
                       scale 2
                     } // end of pigment
           } //end of skysphere
// fog ---------------------------------------------------------------------
fog{fog_type   2
    distance   50
    color      <1,1,1>
    fog_offset 0.1
    fog_alt    2.0
    turbulence 0.8}
// ground ------------------------------------------------------------------
plane{ <0,1,0>, 0
       texture{ pigment {color rgb <0,1,0>}
                finish  {ambient 0.1 diffuse 0.8 }
              } // end of texture
     } // end of plane

#macro flag (xscalar,yshear)
#declare radii = .1;
union {
 union {
   difference {
        isosurface { function { y - sin(x*xscalar*pi)*0.1}
                threshold 0
                contained_by {box {<-1,-0.5,-1>, < 1, 1, 1>}}
                scale .5
        } // end of isosurface -----------------------------------------
        isosurface { function { y - sin(x*xscalar*pi)*0.1 }
                threshold 0
                contained_by {box {<-1,-0.5,-1>, < 1, 1, 1>}}
                translate < 0, -.05, 0>
                scale <.501,.5,.501>
        } // end of isosurface -----------------------------------------
        rotate <-90, 0, 0>
        scale 2
        translate < -1, 5, 0>
        texture{ pigment {rgb <1,1,1> }
               finish {ambient 0.4 diffuse 0.8 phong 1 reflection 0.2}
               } // end of texture
        matrix<1, yshear, 0, // shearing in y
            0,   1, 0,
            0,   0, 1,
            0,   0, 0>
    }
    object{ Round_Cylinder (<0,4,0> <0,6.01,0> radii+.001 radii/2 1 )
       texture{ pigment {rgb <1,1,1>}
               finish {ambient 0.1 diffuse 0.8 phong 1 reflection 0.2}
               } // end of texture
    }
  }
  object{ Round_Cylinder (<0,-1,0> <0,6,0> radii radii/2 1 )
          texture{ pigment {rgb <1,0,0>}
               finish {ambient 0.1 diffuse 0.8 phong 1 reflection 0.2}
          }
  }
}
#end
object { flag(1.2,.4) scale 1 rotate <0,45,0> translate <5,0,5>}
object { flag(1.2,.3) scale 1 rotate <0,-45,0> translate <5,0,0>}
object { flag(1.2,.6) scale 1 rotate <0,0,0> translate <0,0,10>}
object { flag(1.1,.45) scale 1 rotate <-3,0,-6> translate <-5,0,0>}
object { flag(1.5,.7) scale 1 rotate <3,5,4> translate <-5,0,5>}
object { flag(1.3,.4) scale 1 rotate <-1,10,4> translate <-5,0,10>}
object { flag(1.5,.65) scale 1 rotate <3,6,-2> translate <0,0,0>}
object { flag(.75,.45) scale 1 rotate <3,3,3> translate <0,0,2.5>}
object { flag(.7,.8) scale 1 rotate <1,7,3> translate <2.5,0,0>}


Post a reply to this message

From: Christoph Hormann
Subject: Re: why no shadow?
Date: 3 Apr 2004 05:00:01
Message: <c4m1op$2rn$1@chho.imagico.de>
Ian Gilmour wrote:
> Why don't I get a shadow cast on the ground from the flags in the following
> scene?
> I just see a shadow from the pole and the edge of the flag?
> 
> [...]

Without actually testing your scene - it might be related to the use of 
isosurfaces in CSG, see the docs for what's written about isosurfaces in 
CSG and max_trace at the end of section 6.5.4.1:

http://www.povray.org/documentation/view/169/

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 21 Mar. 2004 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Ian Gilmour
Subject: Re: why no shadow?
Date: 3 Apr 2004 06:53:17
Message: <406ea5ad@news.povray.org>
That got it.

Many thanks.

cheers,

Ian

"Christoph Hormann" <chr### [at] gmxde> wrote in message
news:c4m1op$2rn$1@chho.imagico.de...
> Ian Gilmour wrote:
> > Why don't I get a shadow cast on the ground from the flags in the
following
> > scene?
> > I just see a shadow from the pole and the edge of the flag?
> >
> > [...]
>
> Without actually testing your scene - it might be related to the use of
> isosurfaces in CSG, see the docs for what's written about isosurfaces in
> CSG and max_trace at the end of section 6.5.4.1:
>
> http://www.povray.org/documentation/view/169/
>
> Christoph
>
> -- 
> POV-Ray tutorials, include files, Sim-POV,
> HCR-Edit and more: http://www.tu-bs.de/~y0013390/
> Last updated 21 Mar. 2004 _____./\/^>_*_<^\/\.______
>


Post a reply to this message

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