|
|
> On 16/10/2010 1:48 AM, Florin Andrei wrote:
>> Well, no, each frame the stars are painted again, randomly.:(
>>
>> How do I make the starfield completely static for all frames when the
>> camera is
>> moving?
>>
>
> Instead of your moving box, why not use a sky_sphere? I've used the
> pigment from Starfield1 in the example below.
>
> sky_sphere {
> pigment {
> granite
> color_map {
> [ 0.000 0.270 color rgb < 0, 0, 0> color rgb < 0, 0, 0> ]
> [ 0.270 0.280 color rgb <.5,.5,.4> color rgb <.8,.8,.4> ]
> [ 0.280 0.470 color rgb < 0, 0, 0> color rgb < 0, 0, 0> ]
> [ 0.470 0.480 color rgb <.4,.4,.5> color rgb <.4,.4,.8> ]
> [ 0.480 0.680 color rgb < 0, 0, 0> color rgb < 0, 0, 0> ]
> [ 0.680 0.690 color rgb <.5,.4,.4> color rgb <.8,.4,.4> ]
> [ 0.690 0.880 color rgb < 0, 0, 0> color rgb < 0, 0, 0> ]
> [ 0.880 0.890 color rgb <.5,.5,.5> color rgb < 1, 1, 1> ]
> [ 0.890 1.000 color rgb < 0, 0, 0> color rgb < 0, 0, 0> ]
> }
> turbulence 1
> sine_wave
> scale .5
> }
> }
>
This works because the sky_sphere is effevtively a unit sphere centered
on the camera.
This will works as long as the camera don't rotate.
The apparent change in your original star field is caused by a pattern
that relies heavily on sub-pixel details to do it's magic. When you move
the camera or the object that have the pattern, any difference in the
relative positions will cause the sub pixels bits that are visible to
change apparently at random.
The granite pattern used is very noisy, possibly the moisiest of all
patterns. That noise in increased by the applied turbulence.
Another effect of that trick is that it's resolution dependent. If you
change the resolution from, for example, 1600x1200 to 1601x1200, the
pattern of stars WILL totaly change.
If you want something consistant, you should take a look at the galaxy
include set. Available from the object collection:
http://lib.povray.org/searchcollection/index.php. Keyword "galaxy".
It can generate star fields, nebulaes, galaxyes, comets/meteors.
It have been successfully used in several animations.
Alain
Post a reply to this message
|
|