Sign in to follow this  

Is there anything special involved in making a skybox?

This topic is 4666 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, I'm trying to make a skybox as my world in my program. So far I just created a box with the camera inside, and put the appropiate textures on the 6 faces. Except it looks really funny, nothing like normal games eg halflife etc. By funny I mean you can see the bending of the skymap into a box, so its obvious its not spherical. So I am wondering if there is actually any special methods of making a skybox? Thanks .here are some screenshots /> />

Share this post


Link to post
Share on other sites
Can you post the original texture to compare with?
That doe look pretty wierd though - it is as simple as painting the inside of a box with the textures (not the culling has to be reversed or disabled normally though but since it renders that can't be it.) I've not seen anything like this before. I reckon your perspective is screwed somehow ie your projection matrix maybe.

Sorry not to be more help.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Cube mapping! Although it's about cube mapping, you can also make skyboxes with it: http://developer.nvidia.com/object/cube_map_ogl_tutorial.html
Dynamic Cube Map Reflections

Goodluck

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Don't have any idea what graphics API you're using, but if it's OpenGL. Simply pass GL_CLAMP_TO_EDGE to glTexParameterf when you're creating your skybox texture.

Share this post


Link to post
Share on other sites
I just found out the skybox is supposed to move with you, thats what I wasn't doing,

thanks anyway

I'm using direct3d but what kind of effect does the 'GL_CLAMP_TO_EDGE' give in opengl?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
CLAMP_TO_EDGE just makes the seams where the faces of the cubes meet much less obvious.

Share this post


Link to post
Share on other sites
For a Skybox you need to:
Have the textures clamped to the edge.
Draw it before anything else in the scene, making sure that you aren't writing to the depth buffer.
Turn off lighting on the box (glDisable(GL_LIGHTING) or just use GL_REPLACE as the texture mode).
Make sure that all poits in your box are between the near and far clipping planes.

Share this post


Link to post
Share on other sites

This topic is 4666 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