Jump to content
  • Advertisement

Recommended Posts

Hi everyone,

I would need some assistance from anyone who has a similar experience
or a nice idea!

I have created a skybox (as cube) and now I need to add a floor/ground.
The skybox is created from cubemap and initially it was infinite.
Now it is finite with a specific size. The floor is a quad in the middle
of the skybox, like a horizon.

I have two problems:

  1. When moving the skybox upwards or downwards, I need to
    sample from points even above the horizon while sampling
    from the botton at the same time. 
  2. I am trying to create a seamless blending of the texture
    at the points of the horizon, when the quad is connected
    to the skybox. However, I get skew effects.

Does anybody has done sth similar?
Is there any good practice?

Thanks everyone!

Share this post


Link to post
Share on other sites
Advertisement

Hi, as requested a re-post ( i dont know why the whole topic can not be moved by admin ? )

Here it is :

//-----------------------------------------------------------------------------------------

Hi, i am very intrested in this topic.

If you look to a PS2 game like resident 4, you will see the skybox also have clouds passing by, very nice made.

( i cant find a youtube movie of the last level, they dont look to the skybox )

 

Anyways this is how i have my skybox with all my super simple tricks :

No floor, the level will generate the horizon.

No looking up either, there is a empty spot, the background wont be cleared so it remembers the last drawn pixels,

you could clear the screen, only it is very cpu demanding, for a simple level you could, then have alpha values in your skybox to blend towards the sky and floor,

you need to add some extra vertices for that.

I made the skybox have selectable wall ammount, from box to cylinder, so it wont look super warped in the corners like a skybox.

The skybox has always the camera position, so it wont move, rotation would look a dumb way to move the clouds.

The textures are mirrored in a selectable ammount, can set how many times you want the texture repeating.

Still no perfect skybox, i hope you find out some more or someone will post it ( i bet the pro`s are typing on skyboxes instead of posting here ).

You could make to load mountain mesh also in the skybox, or some planets and astroids in the skybox.

 

Still i have exact the same question as you : how to make a flat horizon ?

Look at this movie its for sega saturn so it should be doable very simple somehow ::

 

Share this post


Link to post
Share on other sites

Hello,

 

First there is no such thing as an infinite ground. At most the ground will be clipped by the far clip plane of your camera projection and for the depth precision you usually don't want that far plane to be at an absurd distance. I think that what you are looking for is a simple fog function. Pixels should be mixed with a fog color the closer you get to the far clip plane in your pixel shader. The color to use for the fog can either be a manual value that match your skybox or you could also sample the color from the horizon of your cubemap. The ground/objects will then slowly appear to fade with the skybox in the distance.

 

On 5/20/2018 at 3:18 PM, mmmax3d said:
  1. When moving the skybox upwards or downwards, I need to
    sample from points even above the horizon while sampling
    from the botton at the same time. 

 

A skybox is supposed to be centered around the camera. I've never heard of a skybox moving up or down. Could you detail that part of the question a little more please.

 

Share this post


Link to post
Share on other sites

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

  • 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!