POV-Ray : Newsgroups : povray.bugreports : FS#17 - square blotches in transparency recurrence ? Server Time
31 Oct 2024 10:21:13 EDT (-0400)
  FS#17 - square blotches in transparency recurrence ? (Message 1 to 3 of 3)  
From: rodv92
Subject: FS#17 - square blotches in transparency recurrence ?
Date: 18 Mar 2013 19:40:01
Message: <web.5147a53e4732d1a85d50475e0@news.povray.org>
hello, i am currently having the same bug as described in :
http://bugs.povray.org/task/17
on Povray 3.7 RC7 msvc10.win64

the bug was fixed in change #4822, but in my scene it is recurring (or I may
have done something dumb, i hope so)

bug not sensitive to adc_bailout or max_trace_level
bug sensitive to +WTn

workaround is to render with +WT1 (one thread i presume)

synopsis of the scene animation :

a planet is seen from space at a quite low orbit. the orbiting camera moves to
the unlit side of the planet and the 32 pixels blotches appear in the
atmosphere. surface is made with isosurfaces, one for ground, one for water.
unrelated elements are commented.
uses LightSysIV for sun, but bug persists with standard light sources

atmosphere object uses rayleigh scattering media + density color map.

render procedure : scene use a state.dat file that stores an angle (function
describing angular velocity is not integrable, so i had to sum the angles for
rotation of the probe in a state file). because of the state you'll have to
render all frames from 1 to 40 at 320/240 or less to make it fast enough
depending on your configuration to see the bug around frames 20 to 40.
it should take less than 10 minutes.

povray.ini configuration :

initial_clock=0
final_clock=40
initial_frame=0
final_frame=40

thank you for any hints, or corrections to my code.
luckily, the render time during the unlit phases of the robit is a small portion
of the animation

Full scene for reference :

//**********************INCLUDES**********************************

#include "colors.inc"    // The include files contain
#include "stones.inc"    // pre-defined scene elements
#include "textures.inc"    // pre-defined scene elements
#include "shapes.inc"
#include "glass.inc"
#include "metals.inc"

//******************** CIE & LIGHTSYS ****************************
#include "LightSysIV\CIE.inc"
//CIE_ColorSystemWhitepoint(sRGB_ColSys,Illuminant_D50)
#include "LightSysIV\lightsys.inc"
#include "LightSysIV\rspd_jvp.inc"          // predefined material samples
#include "LightSysIV\CIE.inc"
#include "LightSysIV\CIE_tools.inc"
#include "LightSysIV\lightsys_constants.inc"
#include "LightSysIV\espd_lightsys.inc"
#include "LightSysIV\lspd_elements.inc"
#include "LightSysIV\rspd_pantone_coated.inc"
#include "LightSysIV\rspd_pantone_matte.inc"
#include "LightSysIV\rspd_aster.inc"
#include "LightSysIV\CIE_Skylight"

//********************** PERSONAL INCLUDES**********************************
//#include "heat-shield2.pov"



//********************** GLOBAL SETTINGS AND SWITCHES***********************

#declare one_frame = 0;
#declare radiosity_on = 0;

global_settings {
                    assumed_gamma 1
                    max_trace_level 20
                    ambient_light <0,0,0>
                    adc_bailout 0.002

                    #if (radiosity_on = 1)
                    radiosity {

                                 brightness 2.2
                                 count 50
                                 error_bound 0.15
                                 gray_threshold 0.0
                                 low_error_factor 0.2
                                 minimum_reuse 0.015
                                 nearest_count 10
                                 recursion_limit 3
                                 adc_bailout 0.01
                                 max_sample -1.0
                                 media off
                                 normal off
                                 always_sample 1

                                 pretrace_start 0.08
                                 pretrace_end 0.01

                            }
                    #end



                }


//********************** LIGHTS, STARS & ARTIFICIAL & SUN
*******************************
//Star field
/*
sphere {
   <0,0,0>, 100
   hollow
   pigment {
      image_map {
         png "starmap.png"
         map_type 1
         once
      }
   }
   finish {
      ambient 0
      diffuse 0
   }
   scale 10000000000000
}
*/
light_source{
            <0,20,-50>*10
            Light_Color(SunColor,1)
            adaptive 0
            jitter
            }

#declare LC3 = EmissiveSpectrum(ES_HS_Sodium_Lamp);
#declare LC4 = EmissiveSpectrum(ES_Mitsubishi_Metal_Halide);
#declare LM3 = Lm_GE_LinearR7S_500w;

//#declare probe_projector = Light_Color(LC3,LM3*10);


//-----------------------------------ALIEN MEDUSA MACRO-------------------------

#macro alien_medusa(pos,size_rel,color_base_emi,color_base_xmit,trsp)

sphere { pos, size_rel

         hollow
         interior {
                 media{
                         emission
rgb<0.2,0.1,0.8*color_base_emi>*0.02/size_rel*10*color_base_emi
                         //scattering{ 1, 0.17 exnction 0.01}
                         method 3
                         intervals 5
                         samples 1,1

                         density{
                                  spherical
                                     turbulence 0
                                     color_map {
                                                 [0 rgb
<0.2,0.1,0.8>*5/size_rel*10*color_base_emi]//border
                                                 [1 rgb
<0.5,0,0.2>*2/size_rel*10*color_base_emi]//center
                                            }

                                }
                      }

              }



         texture {
                    pigment{ crackle scale 0.1
                             color_map{[0.0 color rgbt
<0,0,0.7,1*trsp>*1.3*color_base_xmit]
                                       [0.5 color rgbt
<0.5,0,0.75,0.7*trsp>*1.15*color_base_xmit]
                                       [0.5 color rgbt
<0.2,0.5,0.8,0.3*trsp>*1.25*color_base_xmit]
                                       [1.0 color rgbt
<0.2,0,2,0.3*trsp>*1.3*color_base_xmit]

                                      }//end of color_map
                           } // end of pigment}
                    normal {
                             waves 1.5 frequency 0.5 scale 0.02
                           }

                    finish {
                             ambient 0.01 diffuse 0.5 phong 0.5 crand 2.3
reflection{ 0.6 metallic 0.85}
                            //irid { 0.2 thickness 0.1 }
                           }
                 } // end of texture

         scale<1,1,1>  rotate<0,0,0>  //translate<0,0.5,0>

       } // end of sphere
#end

     /*
     alien_medusa(<0,0,0>,2.55,1,1.2,0.5)
     alien_medusa(<0,0,4.5>,1.25,1,1.6,0.4)
     alien_medusa(<4.5,0,0>,1.25,1,1.5,0.35)
     alien_medusa(<-4.5,0,4.5>,1.25,1,1.8,0.3)
     alien_medusa(<4.5,0,-4.5>,1.25,1,2,0.3)
       */

//-----------------------------------OCEAN FUNCTIONS-------------------------

#declare fn_pattern=
                    function {
                                pattern { bozo turbulence 2 noise_generator 1.2
scale <1,1,1>*0.7 }
                             }


#declare fn_water=
                    function {
                                sqrt(pow(x,2) + pow(y,2) + pow(z,2)) -
0.04*((fn_pattern(x,y,z))) - 4.47
                             }

//-----------------------------------TERRAIN FUNCTIONS-------------------------

#declare fn_pattern2=
                    function {
                                pattern { wrinkles turbulence 4 noise_generator
2.2 scale <1,1,1>*0.7 }
                             }


#declare fn_terrain=
                    function {
                                sqrt(pow(x,2) + pow(y,2) + pow(z,2)) -
abs(0.07*((fn_pattern2(x,y,2*z)))) - 4.478
                             }


#declare ocean = isosurface {
                                function { fn_water(x, y, z) }
                                accuracy 0.05
                                max_gradient 5
                                contained_by { sphere { <0,0,0>,5.2 }}

                                texture {
                                          pigment { color rgbt <0.0,0.3,0.6,0.4>
}

                              finish {ambient 0.0 reflection 0.4
                                      //irid { 0.6 thickness 0.4 }
                                     }

                               }
                            }



#declare terrain = isosurface {
                                function { fn_terrain(x, y, z) }
                                accuracy 0.05
                                max_gradient 2.5
                                contained_by { sphere { <0,0,0>,5.25 }}

                                texture {
                                          pigment {color rgb < 0.8, 0.6, 0.15>}
                                          normal {granite 0.2 scale 0.02}
                                          normal { bumps 0.4 scale 0.02}

                                          finish {
                                                   brilliance 1.6
                                                   specular 0.3
                                                   ambient 0.0
                                                 }
                                        }
                             }


declare atmosphere = sphere {
                              <0,0,0>,1
                              hollow

                              material {
                                         texture {
                                                    pigment { rgbt <1,1,1,0.8> }
                                                    //finish {irid { 2.6
thickness 0.4 }}
                                                 }

                                         interior {
                                                    media {
                                                            method 3
                                                            intervals 1
                                                            confidence 0.0001
                                                            variance 1.0/1.0
                                                            scattering
{4,<0,0.502,1.0>}

                                                            density {
                                                                      spherical
                                                                      color_map
{

 [ 0.0 rgb <0.00,0.00,0.00>*6 ]

 [ 0.005 rgb <0.002,0.002,0.002>*6 ]

 [ 0.1 rgb 0.08*4.5 ]

 [ 0.2 rgb 0.1*3 ]

 [ 0.3 rgb 0.5*1.5 ]

 [ 1.0 rgb 0 ]

}
                                                                    }

                                                          }
                                                  }

                                        }

                              scale 4.9
                            }



 #declare CloudTexture = texture {
                                  pigment {
                                            bozo
                                            colour_map {
                                                          [0.00 colour rgbt
<0,0,0,1>]
                                                          [0.40 colour rgbt
<1,1,1,1>]
                                                          [0.60 colour rgbt
<1,1,1,0.80>]
                                                          [0.85 colour rgbt
<1,1,1,0>]
                                                          [1.00 colour rgbt
<1,1,1,0>]
                                                       }
                                            turbulence 4.0
                                            lambda 3.0
                                            omega 0.55
                                            ramp_wave
                                            scale <1,0.55,0.5>*5

                                          }
                                 }

#declare CloudTexture2 = texture {
                                  pigment {
                                            bozo
                                            colour_map {
                                                          [0.00 colour rgbt
<0,0,0,1>]
                                                          [0.55 colour rgbt
<1,1,1,1>]
                                                          [0.65 colour rgbt
<1,1,1,0.70>]
                                                          [0.80 colour rgbt
<1,1,1,0>]
                                                          [1.00 colour rgbt
<1,1,1,0>]
                                                       }
                                            turbulence 2.0
                                            lambda 3.0
                                            omega 0.55
                                            ramp_wave
                                            scale <1,0.9,0.5>*5
                                         }
                                }


#declare CloudSphere1 = sphere { <0,0,0>,4.65
                                    texture { CloudTexture }
                                    hollow
                               }

#declare Cloudsphere2 = sphere { <0,0,0>, 4.72
                                    texture { CloudTexture2 }
                                    hollow
                               }

#declare PlanetCloudSphere0 = union {
                                      object {CloudSphere1}
                                      object {Cloudsphere2}
                                    }


object {PlanetCloudSphere0}
object {terrain}
object {ocean}
object {atmosphere}


#declare max_items = 1;
#declare amt = array[1];
#declare amt2 = 1.4*exp(sin(0.025*((clock+1) - 72.2))) - 3.8;


#macro SaveState()
       #fopen file "state.dat" write
       #local i = 0;
       # while (i<max_items)
               #write ( file, amt[i])
               #local i=i+1;
       #end
       #fclose file
#end

#macro LoadState()
       #fopen rfile "state.dat" read
       #local i = 0;
       #while (i<max_items)
               #read ( rfile, amt3)
               #local i=i+1;
       #end
       #fclose file
       #declare amt[0] = amt3;
#end

#if (clock = 1)
#declare amt[0] = amt2;
SaveState()
#end

LoadState()


#declare orbit = <-0.5*exp(sin(0.025*(clock - 72.2))) + 5.87,0,0>;
#declare height = orbit.x;

#declare orbit = vrotate(orbit,<-60,0,0>); // tilt orbit up
#declare orbit = vrotate(orbit,<0,30,0>); // twist orbit a bit
#declare orbit = vrotate(orbit,<0,amt[0],0>); // rotate about origin

#declare orbit2 = <-0.5*exp(sin(0.025*(clock - 72.2))) + 5.87,0,0>;
#declare orbit2 = vrotate(orbit2,<-60,0,0>); // tilt orbit up
#declare orbit2 = vrotate(orbit2,<0,30,0>); // twist orbit a bit
#declare orbit2 = vrotate(orbit2,<0,amt[0] - 60,0>); // rotate about origin

#declare amt[0] = amt[0] + amt2;
#if (one_frame = 0)
SaveState()
#end

#declare height2 = trace(ocean,orbit,vnormalize(-orbit)*0.01);
#declare prograde = orbit2 - orbit;
#declare pro_right = vcross(orbit,prograde);
#declare orbit_v =  orbit;

//#declare Pt = <0,10,-10>;
//#declare Orig = <0,0,0>;
//#declare Axis = <0,0,1>;

#declare dstx = abs(orbit.x) - abs(height2.x);
#declare dsty = abs(orbit.y) - abs(height2.y);
#declare dstz = abs(orbit.z) - abs(height2.z);

#declare height3 = sqrt(pow(dstx,2) + pow(dsty,2) + pow(dstz,2));

#warning concat("HEIGHT3 ", str(height3.x,5,5))
#warning concat("ROT ", str(amt2,5,5))
#warning concat("ROT integral ", str(amt[0],5,5))

#warning concat("orbit_v x ", str(orbit_v.x,5,5))
#warning concat("orbit_v y ", str(orbit_v.y,5,5))
#warning concat("orbit_v z ", str(orbit_v.z,5,5))

#warning concat("height2 x ", str(height2.x,5,5))
#warning concat("height2 y ", str(height2.y,5,5))
#warning concat("height2 z ", str(height2.z,5,5))

#warning concat("orbit x ", str(orbit.x,5,5))
#warning concat("orbit y ", str(orbit.y,5,5))
#warning concat("orbit z ", str(orbit.z,5,5))

#warning concat("orbit2 x ", str(orbit2.x,5,5))
#warning concat("orbit2 y ", str(orbit2.y,5,5))
#warning concat("orbit2 z ", str(orbit2.z,5,5))

#warning concat("prograde x ", str(prograde.x,5,5))
#warning concat("prograde y ", str(prograde.y,5,5))
#warning concat("prograde z ", str(prograde.z,5,5))

//object {heat_shield rotate y*180 scale 0.0001  translate (orbit) translate
(orbit2/10000 - orbit/10000)*0.10*clock}


//********************************* PROBE CAMERA
*******************************************

camera {
         //location (Orig + vaxis_rotate(Pt - Orig, Axis, 5*clock))
           location orbit
           look_at orbit2
           sky vnormalize(orbit)
           angle 50
       }


Post a reply to this message

From: clipka
Subject: Re: FS#17 - square blotches in transparency recurrence ?
Date: 18 Mar 2013 20:27:01
Message: <5147b0d5@news.povray.org>
Am 19.03.2013 00:37, schrieb rodv92:
> hello, i am currently having the same bug as described in :
> http://bugs.povray.org/task/17
> on Povray 3.7 RC7 msvc10.win64
>
> the bug was fixed in change #4822, but in my scene it is recurring (or I may
> have done something dumb, i hope so)

Let's rephrase this: You're seeing similar symptoms. Whether it is the 
same bug is yet to be examined.

>                      radiosity {
>
>                                   brightness 2.2
>                                   count 50
>                                   error_bound 0.15
>                                   gray_threshold 0.0
>                                   low_error_factor 0.2
>                                   minimum_reuse 0.015
>                                   nearest_count 10
>                                   recursion_limit 3
>                                   adc_bailout 0.01
>                                   max_sample -1.0
>                                   media off
>                                   normal off
>                                   always_sample 1
>
>                                   pretrace_start 0.08
>                                   pretrace_end 0.01
>
>                              }

32x32 block artifacts may also appear when a significant number of 
radiosity samples is taken during the main render rather than the 
pretrace. This is why "always_sample" now defaults to off, and it is 
highly recommended to leave it at this setting. (I can't think of any 
scenario where "always_sample on" would make any sense; if it wasn't for 
backward compatibility, I'd have kicked it out of 3.7 in no time flat.)

Can you please try again with "always_sample off", and let us know 
whether this fixes the block artifacts?

("brightness 2.2" is also not recommended - it should be left at the 
default of 1.0 unless you know what you're doing - but that's a 
different story and has nothing to do with the issues you're reporting.)


Post a reply to this message

From: rodv92
Subject: Re: FS#17 - square blotches in transparency recurrence ?
Date: 19 Mar 2013 08:30:01
Message: <web.51485a3b4eb1e5845d50475e0@news.povray.org>
hello!
My bad, i didn't thought that always_sample would be taken into account inside a
radiosity block under a if block evaluated to false, but still it was my mistake
to not have tried first to change the value.

so yes, it works now thanks to you.

i will perform a little ritual with an offering to the POV-Ray Gods to calm
their wrath :)

thanks !


clipka <ano### [at] anonymousorg> wrote:
> Am 19.03.2013 00:37, schrieb rodv92:
> > hello, i am currently having the same bug as described in :
> > http://bugs.povray.org/task/17
> > on Povray 3.7 RC7 msvc10.win64
> >
> > the bug was fixed in change #4822, but in my scene it is recurring (or I may
> > have done something dumb, i hope so)
>
> Let's rephrase this: You're seeing similar symptoms. Whether it is the
> same bug is yet to be examined.
>
> >                      radiosity {
> >
> >                                   brightness 2.2
> >                                   count 50
> >                                   error_bound 0.15
> >                                   gray_threshold 0.0
> >                                   low_error_factor 0.2
> >                                   minimum_reuse 0.015
> >                                   nearest_count 10
> >                                   recursion_limit 3
> >                                   adc_bailout 0.01
> >                                   max_sample -1.0
> >                                   media off
> >                                   normal off
> >                                   always_sample 1
> >
> >                                   pretrace_start 0.08
> >                                   pretrace_end 0.01
> >
> >                              }
>
> 32x32 block artifacts may also appear when a significant number of
> radiosity samples is taken during the main render rather than the
> pretrace. This is why "always_sample" now defaults to off, and it is
> highly recommended to leave it at this setting. (I can't think of any
> scenario where "always_sample on" would make any sense; if it wasn't for
> backward compatibility, I'd have kicked it out of 3.7 in no time flat.)
>
> Can you please try again with "always_sample off", and let us know
> whether this fixes the block artifacts?
>
> ("brightness 2.2" is also not recommended - it should be left at the
> default of 1.0 unless you know what you're doing - but that's a
> different story and has nothing to do with the issues you're reporting.)


Post a reply to this message

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