|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I'm having a little trouble getting the refraction of a glass pane right.
The refraction seems to be much to high given the ior value of the
material. A ior of 1.5 is normal for glass, but for me a value of 1.05
looks more like glass...
As an example I use what is supposed to be a glass pane with a thickness of
a few mm. Such a glass plane should not distort much. Maybe a little
paralell offset of the light (no more than the thickness of the glass).
But as you can see with my example, it distorts a "little more".
My assumption is that a solid glass pane can be modelled as two parallel
surfaces with opposite normal vectors. As the light refraction is
calculated when the light goes through each surface, this would act as a
solid object.
Am I wrong about this?
Please look at the example below. It it a little long, because it's
generated with a CAD program exporting to a .pov file. I've tried to take
away as much as possible:
(BTW: I'm using POV-Ray 3.5)
THE EXAMPLE:
============
global_settings
{
assumed_gamma 2.2
max_trace_level 8
ambient_light 1
}
background { color rgb <1.0, 1.0, 1.0> }
camera
{
location <5048.52, 2283.89, -5964.82>
angle 28.34
right <1.28,0,0>
look_at <2503.84, 280.51, -2575.62>
}
#declare T1 = texture
{
uv_mapping
pigment {checker color <0,0,0> color <1,1,1> scale 1}
finish { ambient 0.70 diffuse 0.70 phong 0.70 phong_size 176 reflection
0.07 }
}
mesh2
{
vertex_vectors
{
4,
<1000.0,0.0,-1000.0>,
<3600.0,0.0,-1000.0>,
<3600.0,0.0,-3200.0>,
<1000.0,0.0,-3200.0>
}
normal_vectors
{
1,
<0.000,1.000,0.000>
}
uv_vectors
{
4,
<0.000,0.000>,
<0.000,8.667>,
<7.333,8.667>,
<7.333,0.000> }
face_indices
{
2,
<2,1,0>,
<3,2,0>
}
normal_indices
{
2,
<0,0,0>,
<0,0,0>
}
uv_indices
{
2,
<2,1,0>,
<3,2,0>
}
texture
{
T1
}
}
#declare T3 = texture
{
pigment { rgbt <1.00, 1.00, 1.00, 0.93> }
finish { ambient 0.70 diffuse 0.70 phong 0.10 phong_size 25 refraction 1
ior 1.5 }
}
mesh2
{
vertex_vectors
{
4,
<3300.0,0.0,-2880.0>,
<3300.0,1000.0,-2880.0>,
<2300.0,1000.0,-2880.0>,
<2300.0,0.0,-2880.0>
}
normal_vectors
{
1,
<0.000,0.000,1.000>
}
face_indices
{
2,
<2,1,0>,
<3,2,0>
}
normal_indices
{
2,
<0,0,0>,
<0,0,0>
}
texture
{
T3
}
}
mesh2
{
vertex_vectors
{
4,
<2300.0,0.0,-2900.0>,
<2300.0,1000.0,-2900.0>,
<3300.0,1000.0,-2900.0>,
<3300.0,0.0,-2900.0>
}
normal_vectors
{
1,
<0.000,0.000,-1.000>
}
face_indices
{
2,
<2,1,0>,
<3,2,0>
}
normal_indices
{
2,
<0,0,0>,
<0,0,0>
}
texture
{
T3
}
}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
There seems to be some strange peculiarity with meshes in this regard.
I tried making one single mesh from the two "glass" meshes and then it
works just ok. Seemingly there's some problem in having your glass object
consisting of two separate meshes...
global_settings
{
assumed_gamma 2.2
max_trace_level 8
ambient_light 1
}
background { color rgb <1.0, 1.0, 1.0> }
camera
{
location <5048.52, 2283.89, -5964.82>
angle 28.34
right <1.28,0,0>
look_at <2503.84, 280.51, -2575.62>
}
#declare T1 = texture
{
uv_mapping
pigment {checker color <0,0,0> color <1,1,1> scale 1}
finish { ambient 0.70 diffuse 0.70 phong 0.70 phong_size 176 reflection
0.07 }
}
mesh2
{
vertex_vectors
{
4,
<1000.0,0.0,-1000.0>,
<3600.0,0.0,-1000.0>,
<3600.0,0.0,-3200.0>,
<1000.0,0.0,-3200.0>
}
normal_vectors
{
1,
<0.000,1.000,0.000>
}
uv_vectors
{
4,
<0.000,0.000>,
<0.000,8.667>,
<7.333,8.667>,
<7.333,0.000> }
face_indices
{
2,
<2,1,0>,
<3,2,0>
}
normal_indices
{
2,
<0,0,0>,
<0,0,0>
}
uv_indices
{
2,
<2,1,0>,
<3,2,0>
}
texture
{
T1
}
}
#declare T3 = texture
{
pigment { rgbt <1.00, 1.00, 1.00, 0.93> }
finish { ambient 0.70 diffuse 0.70 phong 0.10 phong_size 25 //refraction 1 ior 1.5
}
}
mesh2
{
vertex_vectors
{
8,
<3300.0,0.0,-2880.0>,
<3300.0,1000.0,-2880.0>,
<2300.0,1000.0,-2880.0>,
<2300.0,0.0,-2880.0>,
<2300.0,0.0,-2900.0>,
<2300.0,1000.0,-2900.0>,
<3300.0,1000.0,-2900.0>,
<3300.0,0.0,-2900.0>
}
normal_vectors
{
2,
<0.000,0.000,1.000>,
<0.000,0.000,-1.000>
}
face_indices
{
4,
<3,2,0>,
<2,1,0>
<6,4,5>,
<7,4,6>
}
normal_indices
{ 4,
<0,0,0>,
<0,0,0>,
<1,1,1>,
<1,1,1>
}
texture
{
T3
}
interior { ior 1.5 }
}
--
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Warp <war### [at] tagpovrayorg> wrote:
> There seems to be some strange peculiarity with meshes in this regard.
> I tried making one single mesh from the two "glass" meshes and then it
> works just ok. Seemingly there's some problem in having your glass object
> consisting of two separate meshes...
>
> global_settings
> {
> assumed_gamma 2.2
> max_trace_level 8
> ambient_light 1
> }
> background { color rgb <1.0, 1.0, 1.0> }
> camera
> {
> location <5048.52, 2283.89, -5964.82>
> angle 28.34
> right <1.28,0,0>
> look_at <2503.84, 280.51, -2575.62>
> }
>
> #declare T1 = texture
> {
> uv_mapping
> pigment {checker color <0,0,0> color <1,1,1> scale 1}
> finish { ambient 0.70 diffuse 0.70 phong 0.70 phong_size 176 reflection
> 0.07 }
> }
>
> mesh2
> {
> vertex_vectors
> {
> 4,
> <1000.0,0.0,-1000.0>,
> <3600.0,0.0,-1000.0>,
> <3600.0,0.0,-3200.0>,
> <1000.0,0.0,-3200.0>
> }
>
> normal_vectors
> {
> 1,
> <0.000,1.000,0.000>
> }
>
> uv_vectors
> {
> 4,
> <0.000,0.000>,
> <0.000,8.667>,
> <7.333,8.667>,
> <7.333,0.000> }
>
> face_indices
> {
> 2,
> <2,1,0>,
> <3,2,0>
> }
>
> normal_indices
> {
> 2,
> <0,0,0>,
> <0,0,0>
> }
>
> uv_indices
> {
> 2,
> <2,1,0>,
> <3,2,0>
> }
>
> texture
> {
> T1
> }
> }
>
>
> #declare T3 = texture
> {
> pigment { rgbt <1.00, 1.00, 1.00, 0.93> }
> finish { ambient 0.70 diffuse 0.70 phong 0.10 phong_size 25 //refraction 1 ior 1.5
> }
> }
> mesh2
> {
> vertex_vectors
> {
> 8,
> <3300.0,0.0,-2880.0>,
> <3300.0,1000.0,-2880.0>,
> <2300.0,1000.0,-2880.0>,
> <2300.0,0.0,-2880.0>,
> <2300.0,0.0,-2900.0>,
> <2300.0,1000.0,-2900.0>,
> <3300.0,1000.0,-2900.0>,
> <3300.0,0.0,-2900.0>
> }
>
> normal_vectors
> {
> 2,
> <0.000,0.000,1.000>,
> <0.000,0.000,-1.000>
> }
>
> face_indices
> {
> 4,
> <3,2,0>,
> <2,1,0>
> <6,4,5>,
> <7,4,6>
> }
>
> normal_indices
> { 4,
> <0,0,0>,
> <0,0,0>,
> <1,1,1>,
> <1,1,1>
> }
>
> texture
> {
> T3
> }
> interior { ior 1.5 }
> }
>
>
> --
> #macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
> [1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
> -1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -
Thanks! This did the trick!
-Rune
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|