POV-Ray : Newsgroups : povray.general : [bug] Discontinuous pigment Server Time
5 Nov 2024 13:23:14 EST (-0500)
  [bug] Discontinuous pigment (Message 1 to 8 of 8)  
From: William Peska
Subject: [bug] Discontinuous pigment
Date: 27 Jan 2007 09:42:20
Message: <45bb64cc$1@news.povray.org>
global_settings {
   assumed_gamma 1
   radiosity { }
}

camera{
  location <5, 9, 11>
  up       <0, 1, 0>
  right    <1, 0, 0>
  look_at  <0, 0, 0>
}

plane{
  -y, -20

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

#local f = function(a, b) { min(1, (a*a + b*b) / 100) }

plane{
  y, 0

  pigment{
   function { f(x, z) }
   pigment_map{
    [0 rgb 0]
    [1 rgb 1]
   }
  }

  finish { ambient 0 diffuse 1 }
}


then the pigment is continuous:

  texture{
   function { f(x, z) }
   texture_map{
    [0 pigment {rgb 0} finish { ambient 0 diffuse 1 }]
    [1 pigment {rgb 1} finish { ambient 0 diffuse 1 }]
   }
  }

William


Post a reply to this message

From: Slime
Subject: Re: [bug] Discontinuous pigment
Date: 27 Jan 2007 16:12:54
Message: <45bbc056$1@news.povray.org>
> global_settings {
>    assumed_gamma 1
>    radiosity { }
> }
>
> camera{
>   location <5, 9, 11>
>   up       <0, 1, 0>
>   right    <1, 0, 0>
>   look_at  <0, 0, 0>
> }
>
> plane{
>   -y, -20
>
>   pigment { rgb 1 }
>   finish { ambient 1 diffuse 0 }
> }
>
> #local f = function(a, b) { min(1, (a*a + b*b) / 100) }
>
> plane{
>   y, 0
>
>   pigment{
>    function { f(x, z) }
>    pigment_map{
>     [0 rgb 0]
>     [1 rgb 1]
>    }
>   }
>
>   finish { ambient 0 diffuse 1 }
> }

This has no discontinuities in 3.6.1a for me.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

From: William Peska
Subject: Re: [bug] Discontinuous pigment
Date: 27 Jan 2007 19:30:09
Message: <45bbee91@news.povray.org>
Slime wrote:
>> global_settings {
>>    assumed_gamma 1
>>    radiosity { }
>> }
>>
>> camera{
>>   location <5, 9, 11>
>>   up       <0, 1, 0>
>>   right    <1, 0, 0>
>>   look_at  <0, 0, 0>
>> }
>>
>> plane{
>>   -y, -20
>>
>>   pigment { rgb 1 }
>>   finish { ambient 1 diffuse 0 }
>> }
>>
>> #local f = function(a, b) { min(1, (a*a + b*b) / 100) }
>>
>> plane{
>>   y, 0
>>
>>   pigment{
>>    function { f(x, z) }
>>    pigment_map{
>>     [0 rgb 0]
>>     [1 rgb 1]
>>    }
>>   }
>>
>>   finish { ambient 0 diffuse 1 }
>> }
> 
> This has no discontinuities in 3.6.1a for me.
> 
>  - Slime
>  [ http://www.slimeland.com/ ]

Here is a result from POV-Ray v3.6.1.icl8.win32 rendering of the above 
code (1000x1000, no AA), performed on P4 machine: 
http://img262.imageshack.us/img262/5146/bug2bh9.png

William


Post a reply to this message

From: Charles C
Subject: Re: [bug] Discontinuous pigment
Date: 27 Jan 2007 20:35:01
Message: <web.45bbfd1124ec2419356f54f0@news.povray.org>
Hmm, I got the same results with a custom 3.6.0 but it went away when
turning off radiosity and either adding a light source or adding ambience.
Charles


Post a reply to this message

From: William Peska
Subject: Re: [bug] Discontinuous pigment
Date: 27 Jan 2007 21:45:41
Message: <45bc0e55$1@news.povray.org>
William Peska wrote:
> Slime wrote:
>>> global_settings {
>>>    assumed_gamma 1
>>>    radiosity { }
>>> }
>>>
>>> camera{
>>>   location <5, 9, 11>
>>>   up       <0, 1, 0>
>>>   right    <1, 0, 0>
>>>   look_at  <0, 0, 0>
>>> }
>>>
>>> plane{
>>>   -y, -20
>>>
>>>   pigment { rgb 1 }
>>>   finish { ambient 1 diffuse 0 }
>>> }
>>>
>>> #local f = function(a, b) { min(1, (a*a + b*b) / 100) }
>>>
>>> plane{
>>>   y, 0
>>>
>>>   pigment{
>>>    function { f(x, z) }
>>>    pigment_map{
>>>     [0 rgb 0]
>>>     [1 rgb 1]
>>>    }
>>>   }
>>>
>>>   finish { ambient 0 diffuse 1 }
>>> }
>>
>> This has no discontinuities in 3.6.1a for me.
>>
>>  - Slime
>>  [ http://www.slimeland.com/ ]
> 
> Here is a result from POV-Ray v3.6.1.icl8.win32 rendering of the above 
> code (1000x1000, no AA), performed on P4 machine: 
> http://img262.imageshack.us/img262/5146/bug2bh9.png

POV-Ray v3.6.1c.icl8.win32 generates the same image on my machine.

William


Post a reply to this message

From: Tim Attwood
Subject: Re: [bug] Discontinuous pigment
Date: 27 Jan 2007 23:18:10
Message: <45bc2402$1@news.povray.org>
With no assumed_gamma, or with
assumed_gamma 2.2 (which matches
my monitor) the render looks
a bit darker, but has no seams.
With assumed_gamma 1 the effect
is visible.

Gamma correction is non-linear...
http://en.wikipedia.org/wiki/Gamma_correction


Post a reply to this message

From: Slime
Subject: Re: [bug] Discontinuous pigment
Date: 28 Jan 2007 02:42:10
Message: <45bc53d2@news.povray.org>
> Here is a result from POV-Ray v3.6.1.icl8.win32 rendering of the above
> code (1000x1000, no AA), performed on P4 machine:
> http://img262.imageshack.us/img262/5146/bug2bh9.png

Ah, my gamma settings didn't show any visible difference in the dark areas.
When I change my gamma settings, I get the same result you do.

If I set adc_bailout 0 in my global_settings, I don't get the problem. I
think it's just that the pre-gamma-corrected color is within the default
adc_bailout of pure black, so it rounds down (as an optimization?). Post
gamma correction, this doesn't look so good.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

From: William Peska
Subject: Re: [bug] Discontinuous pigment
Date: 28 Jan 2007 09:46:25
Message: <45bcb741$1@news.povray.org>
Tim Attwood wrote:
> With no assumed_gamma, or with
> assumed_gamma 2.2 (which matches
> my monitor) the render looks
> a bit darker, but has no seams.
> With assumed_gamma 1 the effect
> is visible.
> 
> Gamma correction is non-linear...

For gamma = 1 it is the linear function f(x) = x.

William


Post a reply to this message

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