Sign in to follow this  

Creating a Space-like environment

This topic is 4831 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
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 ...

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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 :(

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
I personally would use a sphere that has the camera as it's center all the time, I would make it so it does no write to Z-Buffer, that way everything you draw will always be in front of it. This will make it seem infinitive, and the spaceship moving will always appear in the same space location. Really, you should never be able to move enough distance to change the background position (without having super gargantuant warp speed in your engine). And special celestial bodies I would either map to the sphere, or have them be billboarded at a set location from the ship. If they need to move then just give them real coordinates.

Share this post


Link to post
Share on other sites
Quote:
Original post by keyofrassilon
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


Setting the far clip plane that fare will hurt your zbuffer accuracy, that is only if you didnt set the near clipping plane to a large number too.

You can just create a skybox just inside what you need normally for a far clipping plane. Then translate the skybox to always be centered around the camera.

Share this post


Link to post
Share on other sites
You have camera. Camera have position and orientation.(i'm using vector and quaternion) So:
load orientation w/o position and render skybox centered at 0. (with z write off and z-test off). There, size doesn't matter. Then turn z-write on, load complete camera matrix and render your things.

Share this post


Link to post
Share on other sites

This topic is 4831 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this