|
![](/i/fill.gif) |
chefboss nous apporta ses lumieres en ce 2007/08/14 12:31:
> 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/";
> }
Why don't you use the integrated animation feature of POV-Ray?
in an ini file:
+fn // set output to PNG so you don't need to convert.
+kff 9 // start an animation of 9 frames
Then, you use the internal clock variable to change the ior:
interior{ ior 1.1 + clock/2}// make the ior go from 1.1 to 1.6.
> --------------------------------------------------------------------------
>
> ------------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
//deprecated and no longer supported in future versions starting with V3.7
> 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>// default value
> right <4/3, 0.0, 0>// default value
> 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.
Normal with the caustics keyword. Working as intended.
>
> Again: see http://manganese-blue.com/index.php?main_page=page_3
> for the ready stuff.
>
> More bugs to follow ...
>
>
You are using the, more or less obsolete, caustics feature. It's OK if you have
a transparent plane with normals to simulate the caustics you find on the bottom
of a swiming pool, but not much more.
The short commings of the caustics aproach: no caustics outside the shadowed
area, independent of the distance,independent of the ior AND no reflection caustics.
To get ralistic focalisation, you need to use photons. A photons block in
global_settings, another in the object to make it interact with the photons.
--
Alain
-------------------------------------------------
You know you've been raytracing too long when you look at a matrix transform and
know instantly what it does.
John VanSickle
Post a reply to this message
|
![](/i/fill.gif) |