|
![](/i/fill.gif) |
When rendering one of the test-scenes with (Version 3.6.1 (g++ 3.4.1 @
i686-pc-linux-gnu) there is an obviously non-realistic behaviour:
Light, transmitted by a glass of given refraction, does not behave correctly
when projected onto a plane behind the sphere. The refracted light gives
ever the same pattern, independently of the given "ior".
I posted this to the bug-report-site, but the last previous post there is
from 2006, so here again: for the effect to be seen, either use the
following two files and run them yourself, or just download them from
http://manganese-blue.com/index.php?main_page=page_3,
where you also can examine the readily-rendered images.
> following 2 files to be saved into files and run on any standard linux
----------------------------------save as eg. "driving.pl"------------------
--------then chmod 755, then run, but save file below first----------------
--------nothing magic happens: just put values for "ior" into the scenefile-
--------and post-processing of the generated images----------------
#!/usr/bin/perl
$=$/;
system "mkdir anim";
system "rm anim/*";
for($i=1;$i<=1.9;$i+=0.1){
print $i;
system "cat reftest.pov | sed 's/xiorx/$i/g' > actual.pov";
system "povray +Q9 actual.pov";
$istr='"'.'index of refraction (ior): '.$i.'"';
system "convert actual.png -fill white -draw 'text 10,10 $istr'
actual$i.png";
system "mv actual$i.png anim/";
}
--------------------------------------------------------------------------
------------scene-file (name it "reftest.pov", so that the above script---
--------------can find and manipulate/execute it several times -----------
global_settings {
assumed_gamma 2.2
max_trace_level 25
}
#include "colors.inc"
#include "shapes.inc"
#include "textures.inc"
#include "glass.inc"
#include "stones.inc"
camera {
location <0.75, 3.5, -3.5>
direction <0.0, 0.0, 0.5> // "wide-angle" view
up <0.0, 1.0, 0>
right <4/3, 0.0, 0>
look_at <0, 0, -1>}
// Light sources, two to the front, right, on from the left, rear.
//light_source {<-30, 11, 20> color White}
//light_source {< 31, 12, -20> color White}
light_source {< 32, 11, -20> color LightGray}
light_source {< 32, 11, -20> color LightGray}
light_source {< 32, 11, -20> color LightGray}
light_source {< 32, 11, -20> color LightGray}
light_source {< 32, 11, -20> color LightGray}
union {
// A green glass ball inside of a box-shaped frame
sphere { <0, 0, 0>, 1.75
interior{
caustics 1.0
ior xiorx
}
texture {
// T_Glass1
Glass2
// White_Marble
pigment {color green 0.90 filter 0.85}
finish {
phong 1 phong_size 300 // Very tight highlights
reflection 0.15 // Needs a little reflection
added
// reflection xiorx // Needs a little reflection
added
}
}
}
plane { y, -1.5
texture {
// T_Stone1
White_Marble
pigment {
octaves 3
rotate 90*z
}
finish { reflection 0.10 }
}
}
--------------------------------------------------------------------------
Upon examination of the generated pics it's clear that the focal-length of
the sphere-lens does not vary as it should with the ior.
Again: see http://manganese-blue.com/index.php?main_page=page_3
for the ready stuff.
More bugs to follow ...
Post a reply to this message
|
![](/i/fill.gif) |