Jump to content
  • Advertisement
Sign in to follow this  
ic0de

Parallax skybox problem

This topic is 2502 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 have this problem with my 3d game, I programmed a skybox and made it move at a different speed as the player to give the illusion of depth(Parallax) but the problem with this technique is that the player will eventually cross the confines of the skybox and even before that he will come close enough it to realize it's a box. How can I have a moving skybox but still prevent the player from leaving the box?

Share this post


Link to post
Share on other sites
Advertisement
You don't. The skybox does not move, it's infinitely far away so movement has 0 relevance.
What you're looking for is probably a 3D skybox like this. Notably, it is not a box. Edited by Krohm

Share this post


Link to post
Share on other sites
The OPs problem will still exist. We use this technique in our engine/game as well. The important thing is that it's only (easily) usable if your gameplay area is confined enough to prevent the player from walking forever (This is what we do, and it's what the Source engine does...). Another option might be a tileable skybox texture/model (although that's going to look pretty bad in the general case).

Share this post


Link to post
Share on other sites

so the only way to prevent this is to make my skybox the same size as my level?

The sky box can be any size if you render it first with depth-writes disabled. But you have to scale the amount by which you move it to ensure you never cross (or get anywhere near to) the boundary.

As previously mentioned, as sky box typically doesn't move at all, relative to the camera.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!