A few questions about Skyboxes/ why things are done this way.

Belli

L69: Deviant Member
Jan 21, 2012
69
1
Hello there.

I looked up how skyboxes and 3d skyboxes are made in valve maps, and noticed a few things I don't quite understand.

For instance, in the 3d skybox of cp_granary, there's a box of skip brushes marking where the actual map would be located within said skybox. And while it's length matches exactly 1/16th of that, the empty box is actually wider than it needs to be.

Why is that the case? Does it just have to roughly fit the size and shape, or is there a particular reason for that?


Next thing, again in granary, the space above larger buildings is blocked of by the skybox. I understand why that makes sense, but why are some parts of it blocked off by an areaportal instead? The same is the case on gravelpit, between point b and c. Wouldn't it make more sense to do anything above that roof with the skybox, and keep the areaportal "indoors"?
 

Muddy

Muddy
aa
Sep 5, 2014
2,574
4,592
The size and shape of the 3D skybox can be as big or as small as you like. I'm guessing the skip brush is a way to mark where the map itself would be located in the skybox, which is actually kind of smart and I can't believe I've never considered doing that before.

As for the areaportals, I think having too many of them in a map can have a negative impact on its performance, so I guess using skybox brushes is a way to cut down on the amount of areaportals.
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
Skybox walls will completely block visibility. They are invisible and you will see through them IF the stuff on the other side is considered visible through other places. Putting a hole there ensures that when a player jumps high enough they will see the other side of the building, rather than nothing. Filling the hole with an areaportal ensures that the other side won't be rendered for players on the ground.
 

henke37

aa
Sep 23, 2011
2,075
515
To elaborate on that point,the areaportals are there so that players can see landmarks from across the map.
 

xzzy

aa
Jan 30, 2010
815
531
Skybox walls will completely block visibility. They are invisible and you will see through them IF the stuff on the other side is considered visible through other places. Putting a hole there ensures that when a player jumps high enough they will see the other side of the building, rather than nothing. Filling the hole with an areaportal ensures that the other side won't be rendered for players on the ground.

On Viaduct, they just use hints up there.

Perhaps even more cleverly, they make the brushes narrow to a triangle where they touch visible geometry so the sky brush won't create holes. The way they made low sky brushes around the edges of the map to limit visibility really impressed me too.

The Viaduct optimization is just plain fun to study, everyone should dig up the decompile and go look at it.
 

Belli

L69: Deviant Member
Jan 21, 2012
69
1
Skybox walls will completely block visibility. They are invisible and you will see through them IF the stuff on the other side is considered visible through other places. Putting a hole there ensures that when a player jumps high enough they will see the other side of the building, rather than nothing. Filling the hole with an areaportal ensures that the other side won't be rendered for players on the ground.

I see; it'd have to be open areaportals in that case, right?

I'm guessing the skip brush is a way to mark where the map itself would be located in the skybox

That's what I thought, I just find it kind of weird that it'd fit perfectly along one axis with the map itself, but exceed that along another axis, and wonderede if there's anything I didn't quite get about skyboxes...
 
Last edited: