Line_Horizon Limitation With Sky Boxes?

Ask about mapping, UDMF, using DoomBuilder/editor of choice, etc, here!
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Post Reply
User avatar
ReX
Posts: 1584
Joined: Tue Aug 05, 2003 10:01 am
Location: Quatto's Palace
Contact:

Line_Horizon Limitation With Sky Boxes?

Post by ReX »

I have applied line_horizon to the boundaries of an outdoor sector, and I noticed that the lower half of the skybox image does not show up at all. It doesn't matter if I adjust the ceiling height of the sky texture, the horizon always cuts the skybox image at the same height.

How do I use the line_horizon special and still display the complete skybox?

Alternatively, will I need to resort to the "standard" DooM way of creating an outdoor area where the sky is displayed in its entirety?
User avatar
Enjay
 
 
Posts: 27294
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Line_Horizon Limitation With Sky Boxes?

Post by Enjay »

Sometimes I find resorting to the older mapping ways* of getting skies to be at the edge of maps can look better than using line_horizon. In fact, the same flat disappearing off into infinity at the "waist" of the map can often look quite poor IMO.

*e.g. bordering the relevant area of the map with a sector that has f_sky1 on its ceiling and making the ceiling for that sector lower than anything visible within the play area.

Also if depends on what you are doing but sometimes using f_sky1 on the floor can also be useful - not always, but it can work out well.
User avatar
Darkcrafter
Posts: 590
Joined: Sat Sep 23, 2017 8:42 am
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Contact:

Re: Line_Horizon Limitation With Sky Boxes?

Post by Darkcrafter »

There is a way to do that. Place filling texture into the sky box itself and disable your line horizon. Then play and test the map until you find the right height for your skybox filling texture so there is no really noticable seams between the map geometry and skybox texture.

https://imgur.com/a/99q9Vgl
User avatar
Enjay
 
 
Posts: 27294
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Line_Horizon Limitation With Sky Boxes?

Post by Enjay »

Just to be clear, what kind of "skybox" are we talking about? Is it a constructed one made from map geometry or a "virtual" one constructed by GZDoom from 6 images forming the faces of a cube? (Or even something else like a more traditional texture?)
User avatar
ReX
Posts: 1584
Joined: Tue Aug 05, 2003 10:01 am
Location: Quatto's Palace
Contact:

Re: Line_Horizon Limitation With Sky Boxes?

Post by ReX »

Enjay wrote:Sometimes I find resorting to the older mapping ways* of getting skies to be at the edge of maps can look better than using line_horizon.... Also if depends on what you are doing but sometimes using f_sky1 on the floor can also be useful - not always, but it can work out well.
Yes, I have resigned myself to these methods. Much as I like the Line Horizon feature, in my particular case it seems to have net negatives; the lower half of the skybox I'm using has got spectacular colors, and it would be a crime to obscure them.

Still, I figured I'd ask, just in case someone has figured out a way to have it all.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Line_Horizon Limitation With Sky Boxes?

Post by Graf Zahl »

How about posting a map that exhibits the problem?
User avatar
ReX
Posts: 1584
Joined: Tue Aug 05, 2003 10:01 am
Location: Quatto's Palace
Contact:

Re: Line_Horizon Limitation With Sky Boxes?

Post by ReX »

Graf Zahl wrote:How about posting a map that exhibits the problem?
The maps are WIP, and I'll be glad to send them to you via PM (needs some resource-modification first). Meanwhile, I am attaching a couple of screenshots that illustrate what I'm referring to.
What it should look like, ideally
What it should look like, ideally
What it looks like in-game
What it looks like in-game
User avatar
ReX
Posts: 1584
Joined: Tue Aug 05, 2003 10:01 am
Location: Quatto's Palace
Contact:

Re: Line_Horizon Limitation With Sky Boxes?

Post by ReX »

To see the effect in action, go to Map 17 of Paranoiac and noclip to x = -400 and y = 9200 to see what I'm speaking about. [You'll also require Paranoid to run Paranoiac. As both the files are somewhat large, I don't expect you to download them to test what I'm referring to. But if you have already downloaded them and have them available, you can check.

Meanwhile, here are 2 more pictures, again from a WIP:
What it should look like, ideally
What it should look like, ideally
DESERT3E.jpg (9.17 KiB) Viewed 922 times
What it looks like, in-game
What it looks like, in-game
[Ignore the relative width/aspect ratio of the images]
User avatar
Enjay
 
 
Posts: 27294
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Line_Horizon Limitation With Sky Boxes?

Post by Enjay »

Yeah, unfortunately (in this case), that is the way it works, and that's the way it's meant to as far as I know. However, you can set things up using traditional mapping techniques to overcome the issue. e.g. these diffeerent cliff-side maps all use full skyboxes and you can see well below the "waistline" of the sky. (Ignore any visial glitches - these pictures were taken by noclipping to places that the player can never actually be).
Spoiler:
As I said, it really depends on what you are trying to do and how you want to set things up. The type of skybox, how you create the horizon etc can all be messed with and you may well be able to get something close to what you are trying to create.

In saying that, it does look as if you are trying to create a plane that disappears off to infinity and the sky eventually meets the land at the horizon. With a setup like that, it's logical enough that what you are seeing is the result.

However, what you might be able to do is construct a cube, apply the faces of your skybox to the inside of the cube and then place a camera viewpoint in the cube and put it very low down. A word of caution though, unless its been addressed (not sure if it has), building a skybox in that way can mean that if a player has ambient occlusion switched on, it will highlight where the joins in your skybox are. The problem there is that sometimes ambient occlusion inside the skybox is desirable too. e.g. my first screenshot is actually taken inside a constructed skybox and I want ambient occlusion on those cliffs if the player has it switched on.
User avatar
Darkcrafter
Posts: 590
Joined: Sat Sep 23, 2017 8:42 am
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Contact:

Re: Line_Horizon Limitation With Sky Boxes?

Post by Darkcrafter »

Enjay showed you the best you can do: "raise" or "put" the map onto a "rock". The floor texture that would then surround this "rock" would be for sure F_SKY1.
User avatar
ReX
Posts: 1584
Joined: Tue Aug 05, 2003 10:01 am
Location: Quatto's Palace
Contact:

Re: Line_Horizon Limitation With Sky Boxes?

Post by ReX »

Thank you, @Enjay and @Darkcrafter.

After trying out a few things, I have learnt the following:

1. Using the "traditional" DooM way of doing things (e.g., have a surrounding sector with 0 sector height, at or below the playable/viewable outdoor "edge" sectors) will allow the whole skybox to be displayed. This will happen whether or not the line_horizon special is used, or what the floor texture is.
2. Using a surrounding sector with the floor texture as F_SKY1 will produce the desired effect, whether or not the sector has a 0 height or not.
3. Using a surrounding sector with the floor texture as F_SKY1 will produce the desired effect, whether or not the linedefs of the surrounding sector use the line_horizon special.

In all of these examples the horizon is not visible at the edge of the map. This tells me one can either choose to have a horizon or to have the full skybox images appear in-game.

Another thing I've learnt is this: Using the methods above will work for a "DooM style" map, where it doesn't matter that the floor of the surrounding sector seems non-existent. In other words, the edge of the map appears to be suspended over a chasm. It will also work with "realistic" maps that are set on a space station or on an island orbiting in space. As my current endeavor is for "DooM style" maps, the player can suspend disbelief when reaching the edge of the map.
User avatar
Enjay
 
 
Posts: 27294
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Line_Horizon Limitation With Sky Boxes?

Post by Enjay »

ReX wrote:As my current endeavor is for "DooM style" maps, the player can suspend disbelief when reaching the edge of the map.
Personally, I do like to give a visual clue rather than the player eventually happening on a line that he can't walk through. Even a token low wall, steep slope, barbed wire fence, or even a cliff to fall off with a damaging floor below (as I have used in some of the examples that I posted pictures of). Basically, I just like something that simply and visually says "there is a reason that you can't go any further in this direction" without a sudden, inexplicable block to the player's movement.
User avatar
ReX
Posts: 1584
Joined: Tue Aug 05, 2003 10:01 am
Location: Quatto's Palace
Contact:

Re: Line_Horizon Limitation With Sky Boxes?

Post by ReX »

Enjay wrote:Personally, I do like to give a visual clue rather than the player eventually happening on a line that he can't walk through. Even a token low wall, steep slope, barbed wire fence, or even a cliff to fall off with a damaging floor below (as I have used in some of the examples that I posted pictures of). Basically, I just like something that simply and visually says "there is a reason that you can't go any further in this direction" without a sudden, inexplicable block to the player's movement.
I, too, like to use a visible blocking method. In the in-game screenshot with the orange mountains, however, the player is unable to reach the edge of the map (without cheating). Therefore, a visible blocking mechanism became unnecessary. Also, because of my use of the traditional DooM method of creating a horizon, it now looks like there is a cliff right beyond the edge. (Not as convincing as I'd like to make it, but ....)
Screenshot without horizon special
Screenshot without horizon special
User avatar
Enjay
 
 
Posts: 27294
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Line_Horizon Limitation With Sky Boxes?

Post by Enjay »

Looks good to me. You've obviously lost the "vast plain" effect of line horizon, but gained more of the sky. Overall, I prefer #2 in this case but both techniques have their uses.
Post Reply

Return to “Mapping”