|
|
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
|
|
|
|
> 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
|
|
|
|
> 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
|
|
|
|
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
|
|