POV-Ray : Newsgroups : povray.general : Scattering media and photons : Re: Scattering media and photons Server Time
3 Aug 2024 16:20:07 EDT (-0400)
  Re: Scattering media and photons  
From: Phil Cook
Date: 18 Mar 2004 10:37:09
Message: <opr42dq2m2p4ukzs@news.povray.org>
Just to see if anyone else can see what's going on here's a rework of the 
full code I'm using; just switch CameraView , I've obviously fiddled with 
the settings declared with no success at getting a reflected beam, 
although I can see that light is being calculated.

--
Phil

//code
#declare GlobalRadiosity=off; //just to check if radiosity makes a 
difference
#declare GlobalPhotons=on; //turn the displayed beams on and off
#declare GlobalMedia=on;  //control

//control the settings for each object
#declare LightSourcePhotons=on;
#declare LightSourcePhotonsReflection=on;
#declare LightSourcePhotonsRefraction=off;
#declare LightReflectorPhotons=on;
#declare LightReflectorPhotonsReflection=on;
#declare LightReflectorPhotonsRefraction=off;
#declare LightReflectorReflection=on;
#declare BoxReflection=on;
#declare RedSphere=on; //in prime light path
#declare BlueSphere=on;  //outside of light paths (control)
#declare GreenSphere=on; //in reflected light path

#declare CameraView=3;
/*
1 view from reflected beams POV
2 overhead shot
3 directly perpendicular to the beam on line with reflected beam showing 
everything
4 shows beam and all three spheres + reflected light beam
*/

global_settings {

#if(GlobalRadiosity)
radiosity{
error_bound 1.2
recursion_limit 5
low_error_factor .5
minimum_reuse 0.015
adc_bailout 0.01/2
normal on
media on
}#end

#if(GlobalPhotons)
photons{
count 20000
media 200
autostop 0
jitter .4
}
}#end

#if(GlobalMedia)
media{scattering{1,rgb 0.01}
}#end

light_source{<0,0,50>, rgb 100 cylinder point_at<0,0,-10>
tightness 0.5
#if(LightSourcePhotons)
photons{
#if(LightSourcePhotonsReflection)
reflection on
#end
#if(LightSourcePhotonsRefraction)
refraction on
#end
}#end
media_attenuation on
media_interaction on
}

camera{
location<0,0,9.99>
look_at 0
#switch(CameraView)
#case(1)
rotate y*-90
#break
#case(2)
rotate <0,-90,-90>
#break
#case(3)
rotate <0,90,30>
#break
#case(4)
rotate <0,45,45>
#end
}

#declare LightReflector=
prism{0,6,4
<3,0>,<3,-3>,<0,-3><3,0>}

object{LightReflector hollow
#if(LightReflectorPhotons)
photons{
target
#if(LightReflectorPhotonsReflection)
reflection on
#end
#if(LightReflectorPhotonsRefraction)
refraction on
#end
}#end

pigment{rgb 0.85}
finish{
#if(LightReflectorReflection)
reflection {1.0}
#end
ambient 0 diffuse 1}
translate <-1.5,-3,1.5>
}

#if(RedSphere)
sphere{0,0.2 pigment{rgb <0.8,0,0>} finish{ambient 0} translate <0,0,5>}
#end
#if(GreenSphere)
sphere{0,0.2 pigment{rgb <0,0.8,0>} finish{ambient 0} translate<0,-0.5,5> 
rotate y*-90}
#end
#if(BlueSphere)
sphere{0,0.2 pigment{rgb <0,0,0.8>} finish{ambient 1} translate<0,1.5,5>}
#end

box{0,10 translate <-5,-3,10> rotate y*-90 pigment {rgb 0.85}
finish{
#if(BoxReflection)
reflection {1.0}
#end
ambient 0 diffuse 1}
}

plane{y,-3.0001 pigment{rgb 1} finish{ambient 0}}
//end code
-- 
All thoughts and comments are my own unless otherwise stated and I am 
happy to be proven wrong.


Post a reply to this message

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