Advertisement

Stars - building a space engine

Started by February 01, 2005 11:28 AM
16 comments, last by evolutional 19 years, 7 months ago
hi. I have built 3d engines before, and the game I am working on right now is going fine. However, I find myself now wishing to create the ambient environment. The stars. My initial plan was to create a sky sphere (rather than a sky box) and plaster star images all over it. Then create billboards for nebulas, coloured gas clouds, etc. However, the resolution of the images required to have stars spread all over a absolutely massive sphere is very large indead. Low res textures look very bad, in fact anything which isn't extremely hig-res (so high res the files are very big) look pretty awful plastered on such a big sphere. I am wondering, does anyone know how space games such as Nexus and Freelancer do those wonderful distant stars (usually thousands upon thousands of them)? I suspect there is some pretty easy trick to it, that I am missing. Links or advice are greatly appreciated.
I really see no advantage to using a sphere over a box.

I myself do the following:

I multi-texture, with the base being the nebular skybox (each side 512x512 or so) then use the other texture as a bunch larger starfiled. The starfield is tiled 4 times on each side of the skybox.

You can see the results here:
http://www.endgameinteractive.com/9601/9001.html
Advertisement
I did think of exactly the same thing, show. But I had in my mind that still, a huge resolution image would be required.

How big is your starfield texture?

Your screenshots look very nice, btw. Good job.
only a texture of 1024x1024. You could use a smaller texture and tile it even more.
I would recommend the technique used by Homeworld. The space background is composed of shaded polygons projected on a sphere.

Take a look at this link for more information
http://www.strategyplanet.com/homeworld/mma/mmaart5.html
Anyone know what methods that mmo game Eve Online uses? Their game is absolutely BEAUTIFUL
Advertisement
I just use pointsprites, first I make a static vertex buffer with random positions and colors, then I render the VB numerous times, rotating the stars with world transform, that way I can have different scales for each 'layer'.. heres a picture of when I went over kill and made 1 million stars @ 64fps (not all on screen at once, but you get the picture).

I have tried tiling a bitmap starfield that I created myself, 1012x1012, twice across each skybox plane.

Works pretty good.

I do get an odd thing though. If I strafe the camera, the stars fluctuate in brightness.
Nice screenshot+very cool pic!
I love it.

The only thing I can think of is individually rendering millions of stars would kill a framerate on older cards, even with vbo. If it doesnt matter tho, more power to you.

Personally, I like the idea of using multitextures and tiling a smallish star texture over the nebula maps myself. the only problem I can see would be a distinct "unrandomness" if the starfield maps were too small. however this could be fixed very easily by simply multitexturing two starfield maps together at different texmatrix orientations, giving the effect of randomness across the entire sky.

Just my two cents. Good luck! It looks really sweet now.

Honestly, it looks quite good with twenty thousand, and it barely touches framerate on any card I've used it with, probably any modern card (geforce 3-4 and up).

This topic is closed to new replies.

Advertisement