Looking to improve on the starfield on my back cover, I went in search of new methods. The Starfield1 texture found in stars.inc in POV-Ray is based on simple random noise, with a down side being that it will show swirly patterns if you scale it too high. However since I'm rendering an image at 300dpi, I want each star to be bigger than just a single pixel, and I'd like less "patternness" to the field.
I found one page that had an excellent suggestion, without saying how to implement it: use the crackle pattern. Knowing that pattern well, it wasn't hard to figure out what was needed: use form <1,0,0> and dab in a speck of white for maybe a radius of 0.05 at most, and then fade to black over another 0.05. Then I wanted to change the stars' colors and apparent brightness, so I built a layered texture.
To suit the resolution I'm working with, I increased the ambient value of the texture from 2 (my original choice) to 10, which in this image gives me stars that are about 2-3 pixels across with occasional fainter stars of maybe 1-2 pixels. Colors get a little washed out with the high ambient value, but I don't think it's bad. The final texture is here:
texture { pigment { crackle form x color_map {[0.05 color rgb 1][0.1 color rgb 0]} } finish {diffuse 0 ambient 10} } texture { pigment { crackle solid color_map { [0.4 color rgbf 1] [0.5 color rgbf <0.8,0.8,0.4,1>] [0.75 color rgbf <0.4,0.1,0.1,1>] [0.8 color rgbf <0.25,0,0,1>] [0.8 color rgbf 1] [1 color rgbf <.4,.4,.8,1>] } } } texture { pigment { crackle solid frequency 100 color_map { [0.00 color rgbf 3] [0.2 color rgbf 1] [0.6 color rgbf 1] [1 color rgbf <0.3,0.3,0.3,1>] } } }