POV-Ray : Newsgroups : povray.general : Light Source in Union Server Time
23 Dec 2024 03:53:54 EST (-0500)
  Light Source in Union (Message 1 to 4 of 4)  
From: Steve Anger
Subject: Light Source in Union
Date: 23 Aug 2019 14:25:00
Message: <web.5d602e60e511277f8bed1fa0@news.povray.org>
I'm using the following declaration to create a red spot light with a visible
beam and then using the declaration in multiple place. The object appears
multiple times in the rendered scene but only one instance appears to have a
light source. Can you duplicate light source in this way?

#declare MySpotLight =
union {
 light_source {
  <0,-0.35, 0>
  color Red*2
  spotlight
  radius 25
  falloff 30
  point_at <0, 0.3095, 0>
 }

 cone {
  <0,-0.5, 0>, 0.0
  <0, +0.3,0>, 0.4
  pigment { rgbt<1,1,1,1> }
  finish { ambient 0.0 diffuse 0 }
  hollow
  no_shadow
  photons { pass_through }
  interior {
   media {
    scattering {3, Red*0.7 extinction 1.0 }
    samples 1,1
   }
  }
 }
}


Post a reply to this message

From: Leroy
Subject: Re: Light Source in Union
Date: 24 Aug 2019 00:30:01
Message: <web.5d60bc62688801defe622ca40@news.povray.org>
"Steve Anger" <nomail@nomail> wrote:
> I'm using the following declaration to create a red spot light with a visible
> beam and then using the declaration in multiple place. The object appears
> multiple times in the rendered scene but only one instance appears to have a
> light source. Can you duplicate light source in this way?

It work's for me on POV-Ray 3.7!
I use object{MySpotLight translate some where}

have fun!


Post a reply to this message

From: Alain
Subject: Re: Light Source in Union
Date: 24 Aug 2019 10:58:05
Message: <5d61507d$1@news.povray.org>
Le 19-08-23 à 14:20, Steve Anger a écrit :
> I'm using the following declaration to create a red spot light with a visible
> beam and then using the declaration in multiple place. The object appears
> multiple times in the rendered scene but only one instance appears to have a
> light source. Can you duplicate light source in this way?
> 
> #declare MySpotLight =
> union {
>   light_source {
>    <0,-0.35, 0>
>    color Red*2
>    spotlight
>    radius 25
>    falloff 30
>    point_at <0, 0.3095, 0>
>   }
> 
>   cone {
>    <0,-0.5, 0>, 0.0
>    <0, +0.3,0>, 0.4
>    pigment { rgbt<1,1,1,1> }
>    finish { ambient 0.0 diffuse 0 }
>    hollow
>    no_shadow
>    photons { pass_through }
>    interior {
>     media {
>      scattering {3, Red*0.7 extinction 1.0 }
>      samples 1,1
>     }
>    }
>   }
> }
> 
> 
> 
For your media, you should use only a single parameter for samples, and 
it should be larger than 2.

The syntax that you use is intended for sampling method 1 and 2, not the 
default method 3.


Post a reply to this message

From: Steve Anger
Subject: Re: Light Source in Union
Date: 26 Aug 2019 15:25:01
Message: <web.5d643143688801de8bed1fa0@news.povray.org>
"Steve Anger" <nomail@nomail> wrote:
> I'm using the following declaration to create a red spot light with a visible
> beam and then using the declaration in multiple place. The object appears
> multiple times in the rendered scene but only one instance appears to have a
> light source. Can you duplicate light source in this way?
>
> #declare MySpotLight =
> union {
>  light_source {
>   <0,-0.35, 0>
>   color Red*2
>   spotlight
>   radius 25
>   falloff 30
>   point_at <0, 0.3095, 0>
>  }
>
>  cone {
>   <0,-0.5, 0>, 0.0
>   <0, +0.3,0>, 0.4
>   pigment { rgbt<1,1,1,1> }
>   finish { ambient 0.0 diffuse 0 }
>   hollow
>   no_shadow
>   photons { pass_through }
>   interior {
>    media {
>     scattering {3, Red*0.7 extinction 1.0 }
>     samples 1,1
>    }
>   }
>  }
> }

The reason I wasn't seeing the other light sources was due to the scattering
method which is viewer angle dependent.


Post a reply to this message

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