POV-Ray : Newsgroups : povray.general : Suppress attenuation of particular light source Server Time
31 Oct 2024 06:14:58 EDT (-0400)
  Suppress attenuation of particular light source (Message 1 to 2 of 2)  
From: radmac
Subject: Suppress attenuation of particular light source
Date: 6 Apr 2023 08:20:00
Message: <web.642eb7ba10fec59ffdaa0703735dc13b@news.povray.org>
In following scene, the light beam is attenuated as it propagates through the
glass-like object. Is there a way how to suppress this attenuation? The reason
for this is the pigment{} block, however by changing it, one also changes the
look of the cube in ambient light.

#include "colors.inc"

global_settings {
 ambient_light rgb 1
 max_trace_level 10
 photons {
  count 100000
  media 100, 2
 }
}

camera {
 location <-1, 2, -3>
 look_at 0
}

light_source { // ambient lighting
 <-10, 10, -10>
 color rgb 0.1
 photons {
  reflection off
  reflection off
 }
 media_interaction off
}

box { // glass-like object
 0 1
 pigment {color rgbf <0.35, 0.42, 0.85, 0.9>}
 finish {
  ambient    0.1
  diffuse    0.1
  reflection 0.1
  specular   0.8
  roughness  0.2
 }
 hollow
 interior {
  ior           1
  fade_distance 0
  fade_power    0
  media {
   absorption 0
   emission   0
   scattering {
    1, 1
    extinction 0 // (0: off, -X: ampl.)
   }
   samples 100
  }
 }
 translate -0.5
}

box { // scattering media outside the cube
 0, <4, 0.4, 0.4>
 pigment {rgbf 1}
 hollow
 interior {
  ior           1
  fade_distance 0
  fade_power    0
  media {
   absorption 0
   emission   0
   scattering {
    1, 1
    extinction 0 // (0: off, -X: ampl.)
   }
   samples 100
  }
 }
 photons {pass_through}
 translate -1*<2, 0.2, 0.2>
}

light_source { // light beam
 0
 color rgb x
 cylinder
 radius 0.1
 falloff 0.1
 point_at x
 photons {
  reflection on
  refraction on
 }
 translate -2*x
}


Post a reply to this message


Attachments:
Download 'scatter_object.png' (18 KB)

Preview of image 'scatter_object.png'
scatter_object.png


 

From: jr
Subject: Re: Suppress attenuation of particular light source
Date: 6 Apr 2023 12:50:00
Message: <web.642ef7a7fed00b4301edef6cde94f1@news.povray.org>
hi,

"radmac" <nomail@nomail> wrote:
> In following scene, the light beam is attenuated as it propagates through the
> glass-like object. Is there a way how to suppress this attenuation? The reason
> for this is the pigment{} block, however by changing it, one also changes the
> look of the cube in ambient light.
> ...

not sure if simulation matters, the "obvious cheat" is to place the first box in
a merge with a cylinder:

cylinder {
  <-.5,0,0>, <.5,0,0>, .125
  open
  pigment {color srgbt 1}
}


see attached.


regards, jr.


Post a reply to this message


Attachments:
Download 'radmac.png' (40 KB)

Preview of image 'radmac.png'
radmac.png


 

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