POV-Ray : Newsgroups : povray.general : black dots appear on high ior, translucent egg crate patterned box Server Time
27 Nov 2024 12:39:23 EST (-0500)
  black dots appear on high ior, translucent egg crate patterned box (Message 1 to 4 of 4)  
From: Mike
Subject: black dots appear on high ior, translucent egg crate patterned box
Date: 15 Oct 2008 16:10:01
Message: <web.48f64c974af29eecc9b9f9f00@news.povray.org>
I have been trying to get a section basically a cube where the top and bottom
surfaces are an egg crate pattern.  The inner material is a liquid with a high
ior.  I managed to get the pattern to work with isosurfaces getting help
already from this forum.  It seems that black dots are appearing though.
Actually, I notice that if I lower the refractive index of my material the
black dots go away, so it definitely is a total internal reflection thing.  I
guess the light reflects back and forth so many times it either blows out the
max_trace_level or the adc_bailout. It seems that by turning off adc_bailout
(seting equal to 0 ) and messing with the max_trace_level I can make less black
dots appear, but only if I turn adc_bailout off. However, I have yet to be
able to make max_trace_level equal to 255 with adc_bailout off because it takes
too long to render.  Maybe I do not fully understand how adc_bailout works, it
seems if I make it really small I get no change from if I have it not there at
all (the default value).  Any ideas?

Also, I have added a patch to the source code from:
http://www.triplespark.net/render/povray/patches/isoacc-patch/
This does not get rid of the dots, but seems to speed up the processing a bit; I
guess it uses a better root finding algorithm in isosurface.cpp then the one
built into povray.

I have attached my code below if anyone wants to check it out.
Thanks,
Mike

#include "colors.inc"
#include "textures.inc"

global_settings{
    //ambient_light rgb<1, 1, 1>
    //assumed_gamma 1
    max_trace_level 20
  //photons {
   //    count 300000
    //  autostop 0
     //  jitter .4
  // }
    //adc_bailout 0.0020
  adc_bailout 0
}

camera {
    location  <-4, 8, 10>
    look_at   <0, 4, 0>
    angle 20
  }
#declare MixedRegion =
material {
   texture {
     pigment {
        color rgbf<0.3, 0.5, .5,1>
      }

 finish {
        ambient 0.0
        diffuse 0.0
         reflection {
          0.0, 1.0
          fresnel on
        }
        conserve_energy
        specular 0.0
        roughness 0.0
 }
  }
  }


#declare F = function { ( y-0 - .1*sin(3*6.2832*x)*sin(3*6.2832*z) )  }

#declare Mixingregion2=
isosurface{
function {abs(F(x,y,z)  ) -.5}
     max_gradient 2.3
     //max_trace 500
     all_intersections
     accuracy .0001
 contained_by { box { <-1.8999, -.6, -1.8999>, <1.8999, .6, 1.8999> } }
material { MixedRegion }
     //media{
      //intervals 10
      //samples 10
     //}
     interior {
    ior 1.5
    //media{
      //intervals 100
      //samples 100
     //}

}
 photons{
                target
                refraction on
               reflection on
  }
 //rotate 180*z
translate 3*y
//translate 2*x
}


object{Mixingregion2}

  light_source {
    <20, 20, 20>
    color White
    photons{

                refraction on
                reflection on
  }
  }
plane{y,0 texture{pigment{White}finish{ambient 0 diffuse 1}}}


Post a reply to this message

From: Trevor G Quayle
Subject: Re: black dots appear on high ior, translucent egg crate patterned box
Date: 15 Oct 2008 17:05:00
Message: <web.48f65a236b7733581c811d20@news.povray.org>
"Mike" <win### [at] hotmailcom> wrote:
> I have been trying to get a section basically a cube where the top and bottom
> surfaces are an egg crate pattern.  The inner material is a liquid with a high
> ior.  I managed to get the pattern to work with isosurfaces getting help
> already from this forum.  It seems that black dots are appearing though.
> Actually, I notice that if I lower the refractive index of my material the
> black dots go away, so it definitely is a total internal reflection thing.  I
> guess the light reflects back and forth so many times it either blows out the
> max_trace_level or the adc_bailout. It seems that by turning off adc_bailout
> (seting equal to 0 ) and messing with the max_trace_level I can make less black
> dots appear, but only if I turn adc_bailout off. However, I have yet to be
> able to make max_trace_level equal to 255 with adc_bailout off because it takes
> too long to render.  Maybe I do not fully understand how adc_bailout works, it
> seems if I make it really small I get no change from if I have it not there at
> all (the default value).  Any ideas?

As I said in my previous post, try HF instead:

This produces an object similar to what you have, I didn't play with the numbers
too much to try to get exact.

This renders fairly quickly and you can bump the max_trace up if you want.

There are still some black dots.  This is a result of the reflection/refraction
of the material.  A lot of it is actually reflection of the background which is
black by default (try putting background{rgb 1} in to see the difference.  Some
of this will get minimized with AA, but it can never disappear completely.

-tgq


//START
#declare f_1= function (x,y){( 0.8-0.2*sin(3*6.2832*x)*sin(3*6.2832*y))}

#declare RES=500;
#local HF1=
  height_field{
    function RES,RES {pattern{ function {
      f_1 ((x-1/2)*1.9*2,(y-1/2)*1.9*2)
    }
   }
  }
  smooth
  translate <-1/2,0,-1/2>
  scale <2.01,1,2.01>
}

#declare Mixingregion2=
intersection{
  object{HF1}
  //object{HF1 rotate 180*z}
  box{-1,1}
  scale <1.9,0.6,1.9>
  translate 3*y
  material {MixedRegion}
}
//END


Post a reply to this message

From: Kenneth
Subject: Re: black dots appear on high ior, translucent egg crate patterned box
Date: 16 Oct 2008 03:25:01
Message: <web.48f6e8b96b7733578dcad930@news.povray.org>
"Trevor G Quayle" <Tin### [at] hotmailcom> wrote:
>
> There are still some black dots.  This is a result of the
> reflection/refraction of the material.  A lot of it is actually reflection of
> the background which is black by default (try putting background{rgb 1} in to
> see the difference.  Some of this will get minimized with AA, but it can never
> disappear completely.

Yes, with high reflectance/transparency and high IOR for an object, the
surroundings of the scene can have a major (and sometimes misleading) effect on
the look of it.

Hi, Mike--

Concerning adc_bailout: Setting it to zero disables it, and the total rays shot
are completely dependent on the max_trace_level setting. Since your object has
a min,max reflection of 0,1 (the 1 being important here), and since your
object's texture has filtration of 1 (again, the max), POV-Ray will probably
continue shooting rays practically *forever* if you set max_trace_level to 255.
Have you taken a look at messages when running your scene with max_trace_level
at 20?  I imagine it maxes out--so there would still probably be black spots.
(Even THAT is a long render, as I discovered!) I generally avoid using max
reflection and max transparency in the same object--in some instances, it can
cause the render to slow almost to a stop, depending on max_trace_level. I've
even had the program crash on me.

I see that you're using conserve_energy with your variable reflection, which
*should* take care of some of these problems; but I don't know enough about
that feature to say yes or no.

Setting adc_bailout to some relatively high, crude value--like .1--will not
usually create dark spots.  Instead, it just makes the object look 'bland' and
darker overall. Not something you'd want to do, of course. :-)

You might also want to take a look at 3.3.3.7 in the documentation. It says,
"...a perfect mirror or perfectly clear surface will not be optimizable by
ADC." That may have some relevance to your scene.

Ken W.


Post a reply to this message

From: Mike
Subject: Re: black dots appear on high ior, translucent egg crate patterned box
Date: 16 Oct 2008 16:55:00
Message: <web.48f7a8b56b77335c9b9f9f00@news.povray.org>
"Kenneth" <kdw### [at] earthlinknet> wrote:
> "Trevor G Quayle" <Tin### [at] hotmailcom> wrote:
> >
> > There are still some black dots.  This is a result of the
> > reflection/refraction of the material.  A lot of it is actually reflection of
> > the background which is black by default (try putting background{rgb 1} in to
> > see the difference.  Some of this will get minimized with AA, but it can never
> > disappear completely.
>
> Yes, with high reflectance/transparency and high IOR for an object, the
> surroundings of the scene can have a major (and sometimes misleading) effect on
> the look of it.
>
> Hi, Mike--
>
> Concerning adc_bailout: Setting it to zero disables it, and the total rays shot
> are completely dependent on the max_trace_level setting. Since your object has
> a min,max reflection of 0,1 (the 1 being important here), and since your
> object's texture has filtration of 1 (again, the max), POV-Ray will probably
> continue shooting rays practically *forever* if you set max_trace_level to 255.
> Have you taken a look at messages when running your scene with max_trace_level
> at 20?  I imagine it maxes out--so there would still probably be black spots.
> (Even THAT is a long render, as I discovered!) I generally avoid using max
> reflection and max transparency in the same object--in some instances, it can
> cause the render to slow almost to a stop, depending on max_trace_level. I've
> even had the program crash on me.
>
> I see that you're using conserve_energy with your variable reflection, which
> *should* take care of some of these problems; but I don't know enough about
> that feature to say yes or no.
>
> Setting adc_bailout to some relatively high, crude value--like .1--will not
> usually create dark spots.  Instead, it just makes the object look 'bland' and
> darker overall. Not something you'd want to do, of course. :-)
>
> You might also want to take a look at 3.3.3.7 in the documentation. It says,
> "...a perfect mirror or perfectly clear surface will not be optimizable by
> ADC." That may have some relevance to your scene.
>
> Ken W.

Thanks for all the info.  I have trouble looking at the messages on the
statistics screen because I am running megapov on a mac and it does not seem to
give all the same information.  Setting the filter variable to 0.8 seems to have
made things speed up a bit.  Still I only get significant results if I turn
adc_bailout off and pump up the max_trace_level.  My goal for all this was to
create a very scientifically accurate scene (hence the conserve energy and
fresnel on).  I did see the thing you were talking about, with the perfect
mirrors and adc_bailout, 2.3.3.7 actually, and it might explain things.

Oh, I had a post in the new user section where it started off as how to make the
egg crate pattern and it has evolved, so I reposted it. Sorry for the chaos this
might have caused.

-Mike


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.