Twinkling stars

Ok. I’ve been looking for a good tutorial on how you can make stars twinkle in the background like in the nightime sky but I couldn’t find any. I heard somewhere you can make stars by clicking the “Stars” button next to the “mist” button in the world buttons but it didn’t say how to make them twinkle.

Any tips?

Ok…I just realised I made a pig’s ear of this and posted it in the wrong place so can a mod or someone please move this thread to the support forums. Sorry.

Sure.
Put a large plane, large enough to cover the whole image, and then some, behind all the models but still within camera range. Make the plane transparent, alpha = 0.000 and press the Ztransp button. Then give it a texture, such as clouds. Give the texture a color ramp, so that most of the plane is transparent, with some patches of non-transparent black (or whatever color you use for the night sky.) Animate the plane moving back and forth. It will sometimes let the stars shine through it, sometimes it will block them out, giving you a twinkling star effect.

If you use a high contrast texture, the stars will blink on and off. If the texture has more grey shades, the stars will fade in and out. You can adjust the speed of the twinkling by adjusting the plane’s speed of movement.

[mods probably won’t move this, just post in the support forum next time]

Welcome to BlenderArtists, :smiley:

Demonstration video is here


This is the sky set up. World colors all set to black, and stars are turned on. Everything else is default values.


Here is the camera, the light, some objects, and the big textured plane. Notice that the limits of the camera extend beyond the plane. If the camera can’t see the plane, this won’t work.


This is the plane material. In the Links and Pipeline panel, Ztransp is on. In the Materials panel, Alpha is set at 0.000. In the Shader panel Ref, Spec and Hard are all turned down to zero (I suppose I could have used the shadeless button in the Materials Panel…) and in the Map To panel, Col is turned off and Alpha is turned on.


This is the plane’s texture. I used a Cloud texture, and the Colors Panel shows the Color ramp set up. The first stop (left end of the band-- set Cur: 0) is color black and alpha 0.000. The middle stop (shown in the image) is also black but alpha is 1.000. The last stop (right end of the color band, Cur: 2) is the same as the middle stop.

I didn’t change the contrast in the Color panel, but more contrast would result in stars winking on and off more than fading in and out like they do in the demo. It’s all a matter of the effect you’re looking for.

That’s perfect thank you! It worked a treat :D!

Now I can create my night scene, which I may post when I’m done (In the right forum this time, lol) ^_^!