arena_sawmill has weirdly place skyboxes..

Eternal

L69: Deviant Member
Jul 8, 2009
69
10
In the decompiled version of sawmill there are 2unit wide pieces of skybox that basically cut the map in to quarters (almost). Any idea why this is done and what benefit it gives?
 

Waif

L7: Fancy Member
Mar 22, 2009
412
125
I think its done for optimization.
 

TMP

Ancient Pyro Main
aa
Aug 11, 2008
947
560
when I think about it, it's not for optimization, it's for the extra light sources from the light_env. With optimization, they could just use hints. I'd really think it is the light throwing sources.
 

Psy

The Imp Queen
aa
Apr 9, 2008
1,706
1,491
The light_env is a constant light. You could cover an entire map in the skybox and it would not have any effect how much light is in the map.

A skybox blocks visibility which is why they create them along the roofs of buildings whilst hints only split visleafs without physicall blocking visibility.
 

TMP

Ancient Pyro Main
aa
Aug 11, 2008
947
560
The light_env is a constant light. You could cover an entire map in the skybox and it would not have any effect how much light is in the map.

A skybox blocks visibility which is why they create them along the roofs of buildings whilst hints only split visleafs without physicall blocking visibility.

Couldn't they do the same with nodraw? Hmm, actually that wouldn't make much sense. It could create a hall of mirrors effect. Would it? I'm not certain. But it would cast a shadow.

I don't know if you've ever noticed this, but the light_env is emitted from skybox brushes. If you put a skybox block or brush in a room inside your map, light emits from it.

If I'm wrong, I'm wrong, but I did see it on Interlopers and I am certain I tried it a while back.

Either way, that's not the reason they'd use it! They'd use it because it doesn't cast a shadow (I am an idiot for not realising this earlier) and stops vis entering.
 

Psy

The Imp Queen
aa
Apr 9, 2008
1,706
1,491
Yes. I know that the skybox emits a light source. The reason they used a skybox to break visbility is that using nodraw would cause the hall-of-mirrors effect as you mentioned as well as a shadow.
 

TMP

Ancient Pyro Main
aa
Aug 11, 2008
947
560
That's relatively smooth thinking, and I always wondered why they would occasionally do that.
 

Sgt Frag

L14: Epic Member
May 20, 2008
1,443
710
Yeah, it's a great way to optimize and keep a tall skybox, but you gotta be careful.

I didn't notice until after final compile on Orient_b3 (and wasn't gonna recompile), but the tops of the temples are in 'boxes' that are taller than the rest of the sky to keep vis_leafs/vision to a minimum.

The box is in real tight around the top roof. Unfortunately I ended up with a little leaf up in the top and if you stand in one doorway and look at the blue temple that leaf doesn't draw and part of the roof clips out.
It's not very noticeable and I don't think anyone has seen it yet but it's there.

Once I add a func_viscluster it'll be fine, but that's the type of thing you gotta watch for.
 

TotalMark

L6: Sharp Member
Feb 13, 2008
331
78
Skybox brushes used like this are invisible right? I have some player_clips in Villa I could swap with this if true.

The map is really open so it would help with optimization.
 

Sgt Frag

L14: Epic Member
May 20, 2008
1,443
710
They're aren't invisible per se. While they may seem like it because their texture (skybox) renders behind regular terrain they can block vision.

I know Villa has alot of open airspace. Closing it off with sky will help performance but it could also block some of the terrain behind it from being rendered if you are up on roofs trying to look through it into the next area.

You can trick it somewhat like I discussed earlier.

If you connect the sky to the roof you will seal it and won't be able to see the next area. If you leave a small gap it can help block alot of visleafs but still let you see into the next one. But maybe you'll end up seeing the bottoms of buildings and the tops will get chopped off from certian views.

Worth a try though as you could do tests with vis only (no lights) in a matter of minutes. If it doesn't work delete a few brushes and you're back to square one.

Still, they can improve performance and compile time just by blocking out sky in places players can't get to because it will minimize the number of visleafs wether or not they actually block views.
 
Last edited: