POV-Ray : Newsgroups : povray.general : Crackle problem Server Time
6 Nov 2024 02:23:49 EST (-0500)
  Crackle problem (Message 1 to 5 of 5)  
From: Skip Talbot
Subject: Crackle problem
Date: 15 Sep 2004 02:35:40
Message: <4147e2bc@news.povray.org>
I'd like to get an even distribution of red green and blue cells in my
crackle pigment but have found that the pattern favors the center of the
color_map.  For example:

   pigment {
      crackle
      color_map {
         [0.00 rgb <1,0,0>]
         [0.33 rgb <1,0,0>]
         [0.33 rgb <0,1,0>]
         [0.66 rgb <0,1,0>]
         [0.66 rgb <0,0,1>]
         [1.00 rgb <0,0,1>]
         }
      metric 1
      solid
   }

This produces mostly green cells.  What am I overlooking, and can anyone
provide a solution?  Thanks!

Skip Talbot


Post a reply to this message

From: Slime
Subject: Re: Crackle problem
Date: 15 Sep 2004 07:23:33
Message: <41482635$1@news.povray.org>
> I'd like to get an even distribution of red green and blue cells in my
> crackle pigment but have found that the pattern favors the center of the
> color_map.  For example:

Interesting. Making an image of a large area of the solid crackle pattern,
and bringing it into photoshop and doing a histogram on it, I get what looks
like a normal distribution with mean 128.48 (should probably be 127.5) and
standard deviation 32.27. Above 218 or below 40 there are hardly any pixels
of those colors.

Using this information and the applet at
http://davidmlane.com/hyperstat/z_table.html , you can see that replacing
0.33 with 113.6/255 and 0.67 with 141.4/255 will provide the distribution
that you're looking for.

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


Post a reply to this message

From: Slime
Subject: Re: Crackle problem
Date: 15 Sep 2004 11:52:01
Message: <41486521$1@news.povray.org>
> mean 128.48 (should probably be 127.5)

Strangely enough, after doing a 10000x10000 image (100 million pixels), I'm
still getting a mean of 128.57, median 129 and standard deviation 31.81. It
seems strange that the mean isn't 255/2 = 127.5. I wonder if anyone could
explain this? I don't believe gamma correction or anything like that is a
factor.

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


Post a reply to this message

From: Samuel Benge
Subject: Re: Crackle problem
Date: 15 Sep 2004 12:45:47
Message: <414871A6.3000701@hotmail.com>
Skip Talbot wrote:

> I'd like to get an even distribution of red green and blue cells in my
> crackle pigment but have found that the pattern favors the center of the
> color_map.  For example:
> 
>    pigment {
>       crackle
>       color_map {
>          [0.00 rgb <1,0,0>]
>          [0.33 rgb <1,0,0>]
>          [0.33 rgb <0,1,0>]
>          [0.66 rgb <0,1,0>]
>          [0.66 rgb <0,0,1>]
>          [1.00 rgb <0,0,1>]
>          }
>       metric 1
>       solid
>    }
> 
> This produces mostly green cells.  What am I overlooking, and can anyone
> provide a solution?  Thanks!

> 

Hi Skip!

Here's an actual working solution, until a more reasonable one can be 
achieved. What I did, was run the crackle pattern through two cubic_wave 
spline modifiers, which gives more play to the outer values in the 
color_map.

Here, look:

  pigment {
   pigment_pattern{
    crackle
    metric 1 solid
    cubic_wave
   }
   cubic_wave
   color_map {
    [0.00 rgb <1,0,0>]
    [0.33 rgb <1,0,0>]
    [0.33 rgb <0,1,0>]
    [0.66 rgb <0,1,0>]
    [0.66 rgb <0,0,1>]
    [1.00 rgb <0,0,1>]
   }
  }

If the middle values still dominate too much, the pigment can be run 
through as many pigment_pattern{} blocks as needed. An additional 
cubic_wave modifier will need to be added to each one.

Happy Raytracing~

-Sam


Post a reply to this message

From: Skip Talbot
Subject: Re: Crackle problem
Date: 17 Sep 2004 01:08:32
Message: <414a7150$1@news.povray.org>
Thanks for the solutions guys.

Skip


Post a reply to this message

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