|
|
I would like to build an image that a laser beam penetrates and
focused into a piece of glass. I tried to express the laser beam
as a transparent object with emission. The following is a source
code for that. Please try #declare GLASS=1 and GLASS=0 and compare
the images. The result has two problems:
1. Laser beam is hardly visible inside the glass, even if the part
of laser beam of the glass is cut using CSG.
2. The usage of CSG gives a distinct outline of the beam, which looks
strange.
Could you please tell me how to solve the problem?
#declare GLASS = 1;
camera{ location <15,20,-40> look_at <0,0,0> }
light_source{ <-50,200,-200> rgb<1,1,1> }
background{rgb 0.1}
#if (GLASS)
difference{
box{<-10,-5,-20>,<10,5,20>}
cone{<0,50,0>,10.0001,<0,0,0>,0.0001}
sphere{<0,0,0>,1 scale<4,8,4>}
material{
texture{
pigment{color rgbt<.98, .98, .98, .9>}
finish{ ambient 0.1 diffuse 0.1 reflection 0.2 specular 0.8 roughness
0.01 phong 1 phong_size 400}
}
interior{ior 1.03}
}
}
#end
union{
cone{<0,50,0>,10,<0,0,0>,0
pigment{color rgbf<1,1,1,1>}
interior{media{ emission rgb<.2, .1, 0> }}
hollow
}
sphere { <0,0,0>, 1
pigment {color rgbf<1,1,1,1>}
interior{media{ emission rgb<.2, .2, .2> density{spherical color_map{[0 rgb
0][0.5 rgb 1][1 rgb 3]}} }}
hollow
scale <4,8,4>
}
}
Post a reply to this message
|
|
|
|
Tomohiro wrote:
> 1. Laser beam is hardly visible inside the glass, even if the part
> of laser beam of the glass is cut using CSG.
This is caused by coincident surfaces of the cutout geometry
and the media containers. POV-Ray can't handle the case very
well when the scene contains two surfaces which exactly match,
even if that would best represent the real world geometry. So
you have to make the hole slightly larger (scale by 1.001).
Or do not cut out any hole at all, the reason you don't get
effect in that case is that you forgot to make the glass box
itself "hollow".
Some suggestions for the glass
o I'd use a fully clear pigment (rgbt 1) for the glass
and remove ambient, diffuse from the finish.
o Also remove phong since you already use specular.
o Consider adding conserve_energy to the finish
o The ior is much too low for glass, it should be
somewhere around 1.5. Although it may then no longer
produce the type of image your looking for.
o You may need to increase max_trace_level, to do so
add something like global_settings {max_trace_level 20}
at the beginning of your scene file.
> 2. The usage of CSG gives a distinct outline of the beam, which looks
> strange.
The problem is that there is no simple "conical" pattern which would
fall off in the way you need. You would need to define your own density
function based on the cone geometry. Alternatively, consider that a
laser should have a cylindrical shape anyway then you can use the
cylindrical pattern.
Post a reply to this message
|
|