animated stars

How does one do animated stars for a night scene?

I made this but I think its kinda weird way of doing it:

Very Nice :slight_smile:


hi Anon,

I did an attempt the other day and my idea was to make a skybox and then add a shader to it. I haven’t gotten around to the shader yet, i don’t even know if it is possible, I’m still learning the basics.

Anyway i found this little tool (made by Alex Grigny de Castro in case he’s watching :wink: With it you can easily create the images for a cubemap. I used the box model from panda to put them on. It works now besides for it stretching out the images to much, i haven’t figured out why that is yet.

I hope it might be to some use for you otherwise just ignore the whole thing :slight_smile:


thats what is called a static skybox. It can look pretty good visually, but the only downside is that it is… static. Static sun, clouds, sky colour, etc.

As you probably guessed by my topic title I want to make animated (shining) stars.

Also I would advise to stick that cube position (not rotation) to the camera. And you should also make it render behind everything else, rather than making it huge.

skybox.setBin('background', 100)

ahh thanks for the advice. I don’t want to steal your thread but do you perhaps also know why my texture gets blown up?

‘Blown up’? Do you mean anything about camera FOV?


i mean stretched out, the picture is 512 x 512 but it looks like it gets stretched out to triple that size. The stars look like cubes now :wink:

Hm, well since the cube uses 512x512 resolution textures and the screen resolution is at least 800x600 these days, then thats normal. You can tile the texture or just make bigger resolution images (say 1024x1024).

EDIT: Oh, sorry , now I see what you mean… beats me

well i scaled the window to 512x512 (see the pic, the right one is the original), i think it has more to do with the cube size perhaps. It is probably something embarrassingly simple, time to hit the manuals again!

I just updated my previous post…

Doesn’t look that different. I can see Orion’s belt in both snapshots; it looks maybe 25% larger on the left.

Still, the size of the image onscreen has to do with the placement of the UV’s on the cube model, and the size of the cube model itself. It has nothing to do with the size of the original texture image.

For a cube map, you will have six images, not just one, and they will be designed to fold around a cube in a specific way, such that each image will completely cover one face of the cube. Then the cube, when centered on the camera, will fill the background. I don’t believe the box.egg model that ships with Panda has UV’s designed for cube maps, but you could generate cube map UV’s on the fly using the techniques described in the manual.


aye, i agree, it’s a rtfm issue :slight_smile:

I did end up hijacking the thread though, so let me put it back on track; does anyone have a good idea on how to make an animated nightsky?

Very nice.