|
|
Hi,
I would like to draw laser rays. In my project, they are always in a given
plane, so I try to add a thin invisible object around this plane, with an
interior defining scattering. I can visualize the laser rays, and of course, as
expected, if an object comes in front of it, the ray is stopped by the object.
But my problem is that I don't find any way for thsi object to be invisible. A
small piece of code allowing to reproduce my problem is the following. Does
someone know how I could modify it to make the plane invisible while still
seeing the rays ?
#include "colors.inc"
global_settings {
ambient_light rgb < 1 , 1 , 1 >
max_trace_level 15
photons {
count 100000
autostop 0
jitter .4
media 100
}
}
camera {
perspective
up < 0 , 0 , 1 >
right y * image_width / image_height
location < 0 , -20 , 2.5 >
look_at < 0 , 0 , 0.8 >
angle 40 // horizontal FOV angle
}
background { Quartz }
// a laser ray
#declare ray_radius = 0.01 ;
light_source {
< 0 , 0 , 0 >
color rgb 100 * < 1 , 0 , 0 >
cylinder
point_at < 1 , 0 , 0 >
radius ray_radius
falloff ray_radius
tightness 0
}
// virtual plane needed to observe the laser rays
#declare dx = 13 ;
#declare dy = 6 ;
box {
< - dx / 2 , - dy / 2 , - ray_radius > < dx / 2 , dy / 2 , ray_radius >
material {
texture {
pigment { Clear }
}
interior {
media {
scattering {
1 /* isotropic */ , rgb 5 * < 1 , 1 , 1 >
}
}
}
}
photons { pass_through }
hollow
}
Post a reply to this message
|
|