|
|
Hello I know this must sound an obvious question but i have taken the optics
demo apart to ray trace a scene which reflects a directional photon beam with a
mirror. The problem is that the beam stops at the mirror. I have tried to set
the max_trace_level to higher numbers and still can't figure out why this
doesn't work.
If somebody can give me a hand i would be grateful. Thanks in advance
Paulo Neves
#version 3.7;
#include "colors.inc"
global_settings {
max_trace_level 5
photons {
count 150000
max_trace_level 9
media 500, 2
}
}
#declare CamPos = < 0, 18, 0>;
camera {
location CamPos
look_at < 0, 0, 0>
angle 35
}
light_source {CamPos, color Gray25
photons {refraction off reflection off}
media_interaction on
}
light_source {<-150, 0.5, 0>, color rgb < 1.2, 1, 1.5>
spotlight radius 0.3 falloff 0.35 point_at < 0, 0.5, 0>
photons {refraction on reflection on}
}
#macro Block(From, To)
union {
cylinder {From, To*(x+z), 0.1 scale < 1, 10*To.y, 1>
texture {
pigment {checker color Gray90, color Gray70
scale 0.1
}
finish {brilliance 0.5}
}
}
cylinder {From, To*(x+z), 0.025
translate y*To
texture {
pigment {color rgb < 1, 0.7, 0.2>}
finish {ambient 0.8}
}
}
}
#end
box {<-100,-1,-100>, < 100, 0, 100>
texture {
pigment {checker color Gray90, color rgb < 0.2, 0, 0.4>}
finish {brilliance 0.25}
}
}
box {<-7,-0.1,-3>, < 6, 1, 4> hollow
texture {pigment {color rgbf 1}}
interior {
media {
scattering {0.5, color White extinction 0}
// emission color White*0.2
method 3
intervals 1 samples 4
}
}
photons {target}
}
union {
difference {
object {Block(<-4, 0,-3>, <-4, 1.5, 3>)}
box {<-5, 0.25,-0.5>, < -3, 0.75, 0.5>}
}
cylinder {<-4, 0, 0>, <-4, 1.5, 0>, 0.1 translate z*0.15}
cylinder {<-4, 0, 0>, <-4, 1.5, 0>, 0.1 translate -z*0.15}
texture {pigment {color rgb 1}}
}
#declare MirrorTex1 =
texture {
pigment {color White}
finish {ambient 0 diffuse 0 reflection 1 ambient 1}
}
#macro PhotonTarget(Reflect, Refract, IgnorePhotons)
photons {
target
reflection Reflect
refraction Refract
collect off
}
#end
#macro Mirror(Pos, Ang, Width, Height, Tex)
box {<-0.1,-0.1,-Width/2>, < 0, Height, Width/2>
texture {Tex}
PhotonTarget(yes, yes, yes)
rotate -y*Ang
translate Pos
}
#end
object {Mirror(<-3, 0, 0>, 3*45, 2, 1, MirrorTex1)}
Post a reply to this message
|
|