• Advertisement
Sign in to follow this  

Skybox - center on camera or not

This topic is 4287 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, Currently starting on a skybox, but I have read somewhere you should center the skybox on the location of your camera, and I have read you shouldn't. As you probably understand this works pretty confusing for me, so can anybody make clear why I should or why I should not move the skybox together with the camera. Thanks in advance, - Poly

Share this post


Link to post
Share on other sites
Advertisement
I think you should try it yourself. If you not move the skybox with the camera, you'll get closer to the "horizon" while infact, the horizon is always a distance away from you.

When centering the camera around the player, the sky doesn't move. I think it depends a bit per gametype though.

I added a skybox to my scene a week ago (well, a skydome actually) and decided to center on the camera position.

Share this post


Link to post
Share on other sites
When I have done skyboxes in the past, I simply create a 1x1x1 cube around the camera. The skybox moves with the camera, so that the camera is always centered. As mentioned, if you don't center the skybox, it will appear that you are moving towards the horizon. You would also have to make sure the user never 'exists' the boundaries of the skybox. I personally have never read of a skybox that doesn't move with the camera, but I could be wrong. Just draw a small cube around the camera, clamp textures (to blend sides together), turn lighting off (to eliminate corners), and do your depth buffer thing, and you will be set.

Share this post


Link to post
Share on other sites
When I did a skybox for a space sim awhile back, I just put the planes of the box so far out in the distance that it didn't matter that the box did not move with the camera. It seemed to look and work just fine.

I think I like the idea of a small cube moving with the camera better though.

Share this post


Link to post
Share on other sites
a skybox is designed to be viewn from exactly the center , thus not centering ion the camera will give distorted results (though perhaps this is what u want)

Share this post


Link to post
Share on other sites
Quote:
Original post by ProphecyEye
When I did a skybox for a space sim awhile back, I just put the planes of the box so far out in the distance that it didn't matter that the box did not move with the camera. It seemed to look and work just fine.

Of course you'll have this one guy who's thinking "Alright, I'm going to fly out as far as I can and see what happens." Lol.
/me is one of those people.
Actually, that was how I first realized years ago how skyboxes worked. I tested it with some games which had them, then some which didn't.

At OP: Generally, like everyone else said, a skyx is centered on the camera. Then again you might want to purposefully do it otherwise, such as having the sky "fall" or something.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement