POV-Ray : Newsgroups : povray.general : Stars... : Re: Stars... Server Time
2 Aug 2024 08:16:08 EDT (-0400)
  Re: Stars...  
From: Slime
Date: 23 Nov 2004 22:57:00
Message: <41a4068c@news.povray.org>
> Does anyone know of  agood way to produce a background star field? I need
to
> be able to pan and zoom the camera with the stars staying as small as
> possible...

This should suit your needs. It's a simple pattern (so it's fast to parse
and render), but it works great with antialiasing and should be perfectly
consistent in an animation.

The stars are perfectly circular (thanks to the crackle pattern with form
<1,0,0>), and you can control their size and density. One thing you cannot
control is the distribution of their size (you can't make them more likely
to be small than big), although it's possible that it could be tweaked to
make that option available.

#declare star_size = .002;
#declare star_density = 50;

sky_sphere {
 pigment {
  crackle
  form <1,0,0>
  color_map {
   [star_size*star_density rgb 1]
   [star_size*star_density rgb 0]
  }
  scale 1/star_density
 }
}

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


Post a reply to this message

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