ID:19088
 

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>]
            }
        }
    }
what language is that?
Looks like CSS.
that is not CSS I think it is java.
Good gads, people. What part of "POV-Ray" didn't you understand? Even if you don't know the program, you could at least infer that the code goes with it. Furthermore you could infer that it's used for some kind of rendering program just based on what it says. It is clearly not Java. CSS is only a marginally better guess in that it is describing presentation, but it is clearly not CSS either.
what is it?
Code from POV-Ray. >:|
I feel sorry for Lummox...
Lummox should pay me so I can make some pretty star fields for him.
me too, 60/40
Lummox, once you read these latest comments, I just want to say: please don't hurt anyone. =)
No, no...hurt them all >.<
What, no pretty pictures? :-) I really can't be bothered to install POV-Ray just to render one image...

Nice use of the blue LED image on that code window, by the way. That could look nifty in the comments textarea!