Creating a Space-like environment

Started by
11 comments, last by Dmytry 19 years, 7 months ago
Hi all! I'm making a game set in outer space, but I can't seem to find a really good way to give that outer space "feel". If I use a sphere to surround the playing area, there are problems with UV creasing, but even worse, any planets or anything in the texture map become terribly warped. I'm going for a feel much like Homeworld...I can't quite see what they're doing for that...it doesn't look like there's a sphere around the entire playing area. If anyone has any ideas on what techniques I could use or links to articles relating to it, that'd be great! Thanks! FiXxoRion
Advertisement
Quote:Original post by fixxorion
Hi all!

I'm making a game set in outer space, but I can't seem to find a really good way to give that outer space "feel". If I use a sphere to surround the playing area, there are problems with UV creasing, but even worse, any planets or anything in the texture map become terribly warped. I'm going for a feel much like Homeworld...I can't quite see what they're doing for that...it doesn't look like there's a sphere around the entire playing area. If anyone has any ideas, please help me!!!

Thanks!

FiXxoRion


i'm using a shphere in my space game and it seems to work fine, though the texture still needs work.

creasing: this is a texture issue, you have to make it seemless. there is nothing you can do as far as programming to eliminate this.

planets: for these i don't use a texture, but another texture mapped sphere.

it's important to note that in order for the planets to not be drawn outside of the "space sphere", i turned of the depth buffer, drew the space shpere, turned it back on and drew everything else.
As your leader, I encourage you from time to time, and always in a respectful manner, to question my logic. If you're unconvinced that a particular plan of action I've decided is the wisest, tell me so, but allow me to convince you and I promise you right here and now, no subject will ever be taboo. Except, of course, the subject that was just under discussion. The price you pay for bringing up either my Chinese or American heritage as a negative is - I collect your f***ing head.
Thanks for the info!

However, I am kinda curious now as to how they do it in Homeworld. I feel it must be some sort of billboarding technique, but I can't quite place it. If anybody knows, please tell! :D

EDIT: After some searching, I did find this thread:

http://www.gamedev.net/community/forums/topic.asp?topic_id=181210

Can anyone explain further about this "vectorial background" thing? I really do like the effect they get in Homeworld, and would like to try and work that into my engine.

FiXxoRion
What Homeworld does for their backgrounds is essentially this...

1) Take a tesselated, evenly-balanced sphere mesh (take any regular polyhedra, tesselate it several times, and normalize the vertices out from sphere center)

2) Manipulate this mesh, by adding/removing vertices, coloring vertices, moving vertices about, etc.

3) Optimize it down into the fewest triangle strips you can, so it doesn't take too many calls to drawPrimitive() (or the OpenGL equivalent).

4) When rendering, translate the center of this sphere to the camera's position. You'll want to render this before anything else in the scene, with Z-buffer r/w disabled.

Hope that helps!
RIP GameDev.net: launched 2 unusably-broken forum engines in as many years, and now has ceased operating as a forum at all, happy to remain naught but an advertising platform with an attached social media presense, headed by a staff who by their own admission have no idea what their userbase wants or expects.Here's to the good times; shame they exist in the past.
Ahh....so that's how they do it...interesting. Thanks for clearing that up for me.

Final question...does anyone recommend going the skybox route?

Thanks!

FiXxoRion
1. Find a large opaque container.
2. Line the inner wall of the container with radioactive material.
3. Remove all air, moisture, or any other particles from it.
4. Drop the container from a very high place.

During the container's freefall, the area inside of the container will be very similar to the environment of space.

[/sarcasm]

Sorry, it's early and the baby kept me and wife up all night ...
yes, why not just use cubical skybox?

You only need to properly project things to it (or em will look deformed). You can make small renderer that will render your nebula billboards into it,that is, setup a scene and render 6 times (with different camera orientations) into textures, then save textures.

[Edited by - Dmytry on September 18, 2004 1:18:14 PM]
just create billboards of all the features you'd like to have in space, and when you make the quad, set the w coord to 0, so it is infinitely far away (x/w,y/w,z/w) if w = 0, then its infinite distance, yet you still retain vector information
I love me and you love you.
I have tried to do a decent space for a long time now and I can tell you one thing - going the traditional sphere way wont get you far in terms of visual splendour and realism. It will always look very "carboardy" and fake. You can achieve half decent effect if you use a lot of fog, but it's not the same. I think the Homeworld way is the only way to do it properly, however so far I wasn't able to replicate it. Sitting waiting for someone to come and show me the way :(
I am working on the same thing and I use a skybox with a radius of a million units plus. I also use vector points of varius shades of white for stars also rendered a million units away from the center. Set up a bounding box for the camera that inhibits it from moving past a certain point say 500 thousand units. Like mentioned you can also use a billboard for your nebs and galaxies. Billboards will also provide a simple method of applying a glow around objects like a star...

G/L

This topic is closed to new replies.

Advertisement