POV-Ray : Newsgroups : povray.general : Media singularity Server Time
30 Nov 2024 01:27:44 EST (-0500)
  Media singularity (Message 1 to 5 of 5)  
From: William Peska
Subject: Media singularity
Date: 16 Feb 2005 21:10:49
Message: <4213fd29@news.povray.org>
http://img115.exs.cx/my.php?loc=img115&image=pattern7jc.png

What is the cause of the seemingly chaotic pattern?

Thank you,
William

pattern.pov:
//POV-Ray 3.6.1.icl8.win32

global_settings {
  assumed_gamma 1
  max_trace_level 170

  radiosity {
    pretrace_start 0.08
    pretrace_end   0.04
    recursion_limit 1
    low_error_factor 0.5
    minimum_reuse 0.015
    adc_bailout 0.01/2
    media on
  }
}

camera {
   location  <6, 8, 10>
   up        <0, 1, 0>
   right     <1, 0, 0>
   look_at   <0, -1, 0>
}

sphere {
  0, 30000

  texture {
   pigment { color rgb 1 }
   finish { diffuse 0 ambient 1 }
  }
  hollow
  no_shadow
}


#declare fsqr = function(a) {a*a}

plane {
  y, -5

  hollow

  pigment { rgbf 1 }
  finish { diffuse 0
           ambient 0 }

  interior{
   media{
    intervals 20
    emission 0.01
    scattering { 4, 1 }
    density{
     function { fsqr(sin(x/4)*sin(y/4)*sin(z/4)) }
    }
   }
  }
}


Post a reply to this message

From: Mike Williams
Subject: Re: Media singularity
Date: 16 Feb 2005 23:19:16
Message: <Av74XDA6sBFCFwJ4@econym.demon.co.uk>
Wasn't it William Peska who wrote:
>http://img115.exs.cx/my.php?loc=img115&image=pattern7jc.png
>
>What is the cause of the seemingly chaotic pattern?

I'm no media expert, but I guess it's something to do with the way that
POV is calculating the position of the "exit point" of the plane, which
is then used to determine the spacing of the samples. The "exit point"
is actually an infinite distance away, but POV somehow has to convert
that into some large finite value. I guess this value varies in an odd
way from pixel to pixel.

Normally that doesn't cause a problem, but with this periodic density
function small changes in the spacing of the samples can cause resonance
effects.

If you replace the "plane {y,-5" with a box of finite thickness,
something like "box {<-1000,-1000,-1000><1000,-5,1000>" the chaotic
effect goes away.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Patrick Elliott
Subject: Re: Media singularity
Date: 17 Feb 2005 22:23:05
Message: <MPG.1c7f0d25885a1fa2989d06@news.povray.org>
In article <Av7### [at] econymdemoncouk>, 
nos### [at] econymdemoncouk says...
> If you replace the "plane {y,-5" with a box of finite thickness,
> something like "box {<-1000,-1000,-1000><1000,-5,1000>" the chaotic
> effect goes away.
> 
Though.. Technically, it isn't infinite, the plane bisects a sphere, so 
the media is actually contained in that. Reducing the size of the sphere 
to 10000 still produces the same oddities, though with some faint white 
streaks in it, like the edges of ripples. 5000 and the whole thing starts 
to get murky and darker, but the pattern never disappears and it starts 
to look like some odd thing floating inside the media. I need a faster 
computer.. lol But seriously, it doesn't seem to be a result of the 
ambient on the sphere either... This is really odd.

Hmm.. It gets less visible at a sphere size of 2000 and pretty much 
vanishes, (in the sense that it is no longer a 'sharp edged' pattern), at 
1000, though the resulting pattern is still showing complex oddities. It 
is nothing like what a box produces. This definitely seems to be 
*entirely* related to the choice of using a sphere and a plane to create 
a container for the media. Definitely interesting, but very strange.

-- 
void main () {

    call functional_code()
  else
    call crash_windows();
}


Post a reply to this message

From: Mike Williams
Subject: Re: Media singularity
Date: 17 Feb 2005 23:54:16
Message: <RgknXEA7RXFCFwLu@econym.demon.co.uk>
Wasn't it Patrick Elliott who wrote:
>In article <Av7### [at] econymdemoncouk>, 
>nos### [at] econymdemoncouk says...
>> If you replace the "plane {y,-5" with a box of finite thickness,
>> something like "box {<-1000,-1000,-1000><1000,-5,1000>" the chaotic
>> effect goes away.
>> 
>Though.. Technically, it isn't infinite, the plane bisects a sphere, so 
>the media is actually contained in that. Reducing the size of the sphere 
>to 10000 still produces the same oddities, though with some faint white 
>streaks in it, like the edges of ripples. 5000 and the whole thing starts 
>to get murky and darker, but the pattern never disappears and it starts 
>to look like some odd thing floating inside the media. I need a faster 
>computer.. lol But seriously, it doesn't seem to be a result of the 
>ambient on the sphere either... This is really odd.
>
>Hmm.. It gets less visible at a sphere size of 2000 and pretty much 
>vanishes, (in the sense that it is no longer a 'sharp edged' pattern), at 
>1000, though the resulting pattern is still showing complex oddities. It 
>is nothing like what a box produces. This definitely seems to be 
>*entirely* related to the choice of using a sphere and a plane to create 
>a container for the media. Definitely interesting, but very strange.

Yes. It's more complicated than I thought.

The effect doesn't appear when using a box, but it does appear when
using "difference {  plane {y, -5}  plane {y, -1000}" when the lower
plane is sufficiently distant. When using this difference, the sphere
can be replaced with "background {rgb 1}" and the effect remains exactly
the same.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Patrick Elliott
Subject: Re: Media singularity
Date: 18 Feb 2005 15:09:32
Message: <MPG.1c7f25bd6d3ef93b989d07@news.povray.org>
In article <Rgk### [at] econymdemoncouk>, 
nos### [at] econymdemoncouk says...
> Yes. It's more complicated than I thought.
> 
> The effect doesn't appear when using a box, but it does appear when
> using "difference {  plane {y, -5}  plane {y, -1000}" when the lower
> plane is sufficiently distant. When using this difference, the sphere
> can be replaced with "background {rgb 1}" and the effect remains exactly
> the same.
> 
Yeah.. This:

//POV-Ray 3.6.1.icl8.win32

global_settings {
  assumed_gamma 1
  max_trace_level 170

  radiosity {
    pretrace_start 0.08
    pretrace_end   0.04
    recursion_limit 1
    low_error_factor 0.5
    minimum_reuse 0.015
    adc_bailout 0.01/2
    media on
  }
}

camera {
   location  <6, 8, 10>
   up        <0, 1, 0>
   right     <1, 0, 0>
   look_at   <0, -1, 0>
}

#declare fsqr = function(a) {a*a}

plane {
  y, -5
  hollow

  pigment { rgbf 1 }
  finish { diffuse 0
           ambient 0 }

  interior{
   media{
    intervals 20
    emission 0.09
    scattering { 4, 1 }
    density{
     function { fsqr(sin(x/4)*sin(y/4)*sin(z/4)) }
    }
   }
  }
}

plane {
  y, -100
  hollow
  pigment {rgbf 1}
  inverse
} 

Probably comes a lot closer to what it 'should' look like. It still gets 
artifacts if the second place is at -200, so you may have been partly 
right, or maybe completely, I didn't let the previous 'working' version 
with the sphere finish so can't compare them. Likely the light bounces 
around so make times that anything 'thinker' than about 100 units 
generates artifacts. Probably an effect of trace level or some other 
setting, though increasing it to 'fix' the problem would slow the media 
down even more. The artifacts this produces btw are very different when 
you place the second plane at -15000, where the sphere limit would have 
been, but with some similarities, so the 'shape' does effect the 
artifacts when they do appear.

-- 
void main () {

    call functional_code()
  else
    call crash_windows();
}


Post a reply to this message

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