Why can I see through the skybox?

Discussion in 'Mapping Questions & Discussion' started by xillok, Jan 2, 2012.

  1. xillok

    xillok L1: Registered

    Messages:
    2
    Positive Ratings:
    0
    Hi. I made a map where the two spawn points are sticking out behind the skybox. Ultimately I'm going to change it so that it doesn't look like the spawn door leads to nothing when you look from outside. But I noticed that when looking from outside you can actually see through the skybox and into the spawn. I'm just wondering if anyone knows why that might be happening. I ran the compile log through interlopers and it only found that error where it can't build the default cubemap because of a broken skybox. I'm using the trainyard skybox and I found a site about fixing that error, but it didn't seem completely necessary. Could that be the source of my see-through problem? I can also host the map if that would help, but I don't know how to do that.
     
  2. Nineaxis

    aa Nineaxis Quack Doctor

    Messages:
    1,767
    Positive Ratings:
    1,404
    Visleafs

    The visleaf of your spawn room is registered as (potentially) visible by the game, so it is rendered on the screen. The skybox texture doesn't block out anything behind it from rendering, and the skybox itself always renders behind anything else being rendered.
     
  3. xillok

    xillok L1: Registered

    Messages:
    2
    Positive Ratings:
    0
    How would I prevent that? In the Skybox Optimization dev wiki page it talks about the skybox obscuring something behind it. That's why I thought that would work in this case.
     
  4. Nineaxis

    aa Nineaxis Quack Doctor

    Messages:
    1,767
    Positive Ratings:
    1,404
    It works in the same way any other brush "obscures" what is behind it. For nothing to render behind it, the visleaf (or visleafs) behind it must not be rendering. This requires you to optimize your visleaf structure so that the visleaf behind won't render when the player is in the visleaf in front, by making sure vbsp recognizes that the two can't see each other.

    Here's a good guide for understanding how optimization works in Source.

    There's nothing special about the skybox brush in terms of functionality when it comes to visleafs, optimization, and bsp structure.