POV-Ray : Newsgroups : povray.general : Distorted sinusoidal fringe projection : Re: Distorted sinusoidal fringe projection Server Time
31 Jul 2024 20:12:45 EDT (-0400)
  Re: Distorted sinusoidal fringe projection  
From: Tim Attwood
Date: 2 Sep 2006 03:27:38
Message: <44f9326a$1@news.povray.org>
>... Is it any solution to
> produce the shadow of a texture ?

A hollow plane is still conceptually solid for CSG,
a intersection of a plane and a box results in a box...
By texturing the box with Clear on 5 sides you just
see into the hollow box, if the box happens to be
sitting with a clear bottom that is coincident to
some other object (like the default checkered
plane) then you see thru that as well. Since you
only really want the textured side, use clipped_by.

And since you are trying to "fake" shadows, you
probably don't want to see the texture itself.
I might be OK just to make your texture mimic
the shadow color, then place it near a flat surface,
or use the object pattern to place it as a partially
transparent layer on something.

#declare H = 2;
#declare W = 2;
#declare nb_periods = 3;
#declare length_period = H / nb_periods;
#declare SinePig = pigment {
   gradient x scale H/nb_periods
   sine_wave
   color_map {
      [0 color <0,0,0> transmit 0.2]
      [1 color <0,0,0> transmit 1]
   }
};
// as a "sticker"
plane { y, 0
   pigment { SinePig }
   clipped_by {
     box {
        <-H/2,-1,-W/2>,
        <H/2,1,W/2>
     }
  }
  translate <0,-0.999,0>
}

// as an object pattern
plane {y,-1
   texture {
      pigment{checker White Wheat}
   }
   texture {
      pigment {
         object {
            sphere {<0,-1,2>,1}
            pigment {Clear}
            pigment {SinePig}
         }
      }
   }
}


Post a reply to this message

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