Advertisement

Add floor in skybox

Started by May 20, 2018 07:18 PM
2 comments, last by ChuckNovice 6 years, 8 months ago

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!

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 ::

 

S T O P C R I M E !

Visual Pro 2005 C++ DX9 Cubase VST 3.70 Working on : LevelContainer class & LevelEditor

Advertisement

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.

 

This topic is closed to new replies.

Advertisement