POV-Ray : Newsgroups : povray.general : Suppress attenuation of particular light source : Suppress attenuation of particular light source Server Time
10 Oct 2024 03:40:50 EDT (-0400)
  Suppress attenuation of particular light source  
From: radmac
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


 

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