POV-Ray : Newsgroups : povray.general : How to? light_source shining through a wall : Re: How to? light_source shining through a wall Server Time
30 Jun 2025 23:55:56 EDT (-0400)
  Re: How to? light_source shining through a wall  
From: Kenneth
Date: 9 Nov 2017 00:55:00
Message: <web.5a03ecdbfad04db289df8d30@news.povray.org>
>
> I first thought of a light_group {} with object and light_source in it,
> but the wall still blocks the light.

You almost had it: Light_group of object and light_source, ALONG WITH no_shadow
for the wall.

Here's a small test scene, with two cameras to test that it works, and an extra
front-light to show that the sphere object still casts its own shadow on the
wall.
------------
#version 3.71;
global_settings{assumed_gamma 1.0 max_trace_level 5}

camera {
  perspective
  location  <.5, .5, -5>
  look_at   <.5, .5,  0>
  right     x*image_width/image_height
  angle 67
}

/*
camera {
  perspective
  location  <30, 30, -5>
  look_at   <.5, .5,  0>
  right     x*image_width/image_height
  angle 80
}
*/

// wall behind object
box{0,1
no_shadow
translate <-.5,-.5,0>
scale 30*<1,1,.1>
pigment{rgb .7}
translate 1.5*z
}

light_group{
light_source {
  0*x
  color rgb <1,1,1>
  looks_like{sphere{0,1 pigment{srgb <1,.5,0>}finish{emission 1}}}
  translate <-15, 15, 20>
}

// object
sphere{0,1
pigment{rgb <0,1,0>}finish{ambient .05 emission 0 diffuse .8}
}
}

// extra DIRECTION POINTER between light and object
cylinder{<-15, 15, 20>,<0,0,0> .1
no_shadow
pigment{rgb <0,.5,1>}finish{emission 1}
}

// extra front-light for object and wall
light_source {
  0*x
  color rgb .4
  translate <20, 5, -20>
}


Post a reply to this message

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