POV-Ray : Newsgroups : povray.newusers : Block light from entering cavity : Re: Block light from entering cavity Server Time
15 May 2024 13:22:04 EDT (-0400)
  Re: Block light from entering cavity  
From: John Greenwood
Date: 20 Feb 2014 05:00:01
Message: <web.5305d1755a3abd55a7cafab50@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> On 19-2-2014 13:48, John Greenwood wrote:
> > I want to show a scene in which part is in an underground cavity, as in the
> > scene below.
> >
> > The cavity is to be lit from local lights and light coming down the two holes in
> > the y plane but no light should come through the cross-section z plane. How do I
> > block this off?
> >
> > // Persistence of Vision Ray Tracer Scene Description File
> > // File: Cavity_below_ground.pov
> > // Vers: 3.7
> >
> >
> > #include "colors.inc"
> > #include "stones1.inc"
> >    camera {
> >      location <3, 10, -40>
> >      look_at <0,3 , 0>
> >      angle 20
> >    }
> >    background { color rgb<0.2, 0.4, 0.8>  }
> >    light_source { <100, 100, -100> color rgb 1 }
> >    global_settings {assumed_gamma 1.0 }
> >
> >
> > difference {
> >    #intersection  {
> >      plane {y,6 texture { T_Grnt1}}
> >      plane {z,-4 inverse  texture {T_Stone14}}
> >                    }
> >    #union {
> >      box {<-20,2,.9>,<20,0,-1> }
> >      box {<-6,10,1>,<-2,1,-1> }
> >      box {<6,10,1>,<2,1,-1> }
> >      box {<-5.5,5,-.5>,<5.5,.1,-100> }
> >      texture {T_Stone15}     }  }
>
> add at the end of the code the following line:
>
> box {<-10, -10, -5>,<10, 6, -4> no_image}
>
> This closes the front of the cavity, and no_image enables the viewer to
> look inside.
>
> Thomas

That does the trick!

Thanks
John


Post a reply to this message

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