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

Discussion in 'Mapping Questions & Discussion' started by Belli, Jan 28, 2015.

  1. Belli

    Belli L69: Deviant Member

    Messages:
    69
    Positive Ratings:
    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"?
     
  2. Muddy

    Server Staff Muddy Muddy

    Messages:
    2,387
    Positive Ratings:
    4,219
    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.
     
  3. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,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.
     
    • Thanks Thanks x 2
  4. henke37

    aa henke37

    Messages:
    1,890
    Positive Ratings:
    443
    To elaborate on that point,the areaportals are there so that players can see landmarks from across the map.
     
    • Thanks Thanks x 1
  5. xzzy

    aa xzzy

    Messages:
    815
    Positive Ratings:
    393
    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.
     
  6. Belli

    Belli L69: Deviant Member

    Messages:
    69
    Positive Ratings:
    1
    I see; it'd have to be open areaportals in that case, right?

    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: Jan 28, 2015
  7. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,531
    Yes. A closed areaportal is the same as a block of nodraw as far as visibility is concerned.