[b]Edit:[/b] Now updated for the Orange SDK and some other things. See the info at the download site for more details.
I made a modified (h4xed) version of the compiler that is specifically designed for maps with large open spaces.
The benefits are a shorter compile time, lower polygon count, and smaller file size!
This works by increasing the maximum size of "vis leaves". Leaves are used by the VIS compiler to determine what the player can see from where. VIS usually makes something like 1 leaf per room, but in large open areas it chops them up horizontally into 1024x1024 sized blocks. The brown lines in the Hammer grid show where this is:
[IMG]http://img181.imageshack.us/img181/9088/gridae9.gif[/IMG]
The thing is, there's not really much of anything to block your vision in most GM maps so [i]this is all wasted[/i].
The hacked compiler makes the leaves 16 times larger.
See this page for more information on visleaves: [url]http://developer.valvesoftware.com/wiki/Visleaf[/url]
It may seem strange, but it is actually BSP that is responsible for the chopping. This hack leaves the VIS program file untouched.
Here is a normal leaf in a big map: (Seen with the "mat_leafvis 1" command.)
[IMG]http://img254.imageshack.us/img254/4329/regularleafia8.jpg[/IMG]
[i]The reason it appears cut up is because the command wasn't designed to be able to draw boxes that large.[/i]
Here is a leaf made by my compiler:
[IMG]http://img205.imageshack.us/img205/9566/huegleafhj9.jpg[/IMG]
[i]As you can see, this is way too large for the leaf viewer so each side of it appears too small.[/i]
Leaves also chop up the ground at their edges. Since the ground is already being chopped, you get this:
[IMG]http://img181.imageshack.us/img181/1659/regulargroundgp5.jpg[/IMG]
With my hack, you get a much cleaner finish:
[IMG]http://img104.imageshack.us/img104/6650/h4xedground.jpg[/IMG]
(Shots taken with "mat_wireframe 1")
I made these tests by making a box map like flatgrass but as large as the entire grid. It took 19 minutes to compile it normally. (without lighting) With the hacked compiler, VIS took [b]ZERO SECONDS[/b] to compile.
Also, compare the file sizes:
[IMG]http://img204.imageshack.us/img204/4089/filesizesau6.gif[/IMG]
[b]Download:[/b] [url=http://deathbynukes.com/releases.aspx]DeathByNukes.com[/url]
[b]Installation:[/b]
Extract bsp_h4xed.exe to C:\Program Files\Valve\Steam\steamapps\[i]<user name>[/i]\sourcesdk\bin
Whenever you need to use it, open Hammer options and set this:
[IMG]http://img175.imageshack.us/img175/8499/howtostep2jf5.gif[/IMG]
[b]EDIT:[/b]
Some people were still confused so here's a very simple demonstration.
This is why you should only use this for the big build type of map:
Normal level:
[IMG]http://img110.imageshack.us/img110/9512/teachnormalgi5.gif[/IMG]
Level made with this tool:
[IMG]http://img512.imageshack.us/img512/7091/teachh4xedpx8.gif[/IMG]
sounds awesome, source code?
so, this really works? it's not that i don't trust you but i want to see other people say it works before i download
So what the fuck is this? This is only VBSP compiler.
I am not downloading until someone tells did this really work out.
[QUOTE=Stene]So wtf is this? This is only VBSP compiler.
I am not downloading until someone tells did this really work out.[/QUOTE]
same
The test maps you have shown have no light? I would like to know how fast a very detailed map, with lighting compiles.
Compile a large and full map and show.
No fast settings, just normal on.
[QUOTE=Stene]So wtf is this? This is only VBSP compiler.
I am not downloading until someone tells did this really work out.[/QUOTE]
Please read everything.
[QUOTE=DeathByNukes]It may seem strange, but it is actually BSP that is responsible for the chopping. This hack leaves the VIS program file untouched.[/QUOTE]
[QUOTE=oskutin]Compile a large and full map and show.[/QUOTE]
[URL=http://img503.imageshack.us/my.php?image=screenshotja5.gif][IMG]http://img503.imageshack.us/img503/9217/screenshotja5.th.gif[/IMG][/URL]
Also I would like to know what impact this has on fps etc.
scanned with NOD32, it's clean. I'll upload it to virustotal.
What about framerate? Does this affect it? And show how fast it compiles the sdk_d1_trainstation_02 map.
[QUOTE=Stene]What about framerate? Does this affect it? And show how fast it compiles the sdk_d1_trainstation_02 map.[/QUOTE]
This compiler is edited to be optimized for huge GM maps and will actually decrease optimization of normal maps.
Edit: Note that it will always decrease compile time. It might be useful for test compiles.
Fair play. I'll download and use this. thanks.
Ok I'm going to test it. The map is just water and a huge amount of it
Guys, This works really well. Thank you. This will seriously help people like me and others with big maps. :D
nope, did not work. it never finished compiling. the map size is as big as the grid on hammer, Is this because it was a water map?
[QUOTE=decilling]nope, did not work. it never finished compiling. the map size is as big as the grid on hammer, Is this because it was a water map?[/QUOTE]
You need at least one entity inside the level. (player start does not count) Did you just now put this level together?
Edit:
Also, you can't get too close to the grid edge or you might get errors.
Try spacing it about as far as this: [url]http://img503.imageshack.us/my.php?image=screenshotja5.gif[/url]
Compile a complex large map.
[QUOTE=DeathByNukes]You need at least one entity inside the level. (player start does not count) Did you just now put this level together?[/QUOTE]
no It ages ago but could never finish compiling then. It has a light entity a player start and a water entity thing. What do you think is wrong? do i have to make it for gmod because i have it set up exactly as it was for hl2 but with your compiler replacing the default one like in the screenshot
Decompile construct, Then compile it again :v:
[IMG]http://i26.photobucket.com/albums/c140/decilling/Untitled-1-1.png[/IMG]
what am i doing wrong?!
[QUOTE=decilling]what am i doing wrong?![/QUOTE]
Does it work without my version? Post the compile log.
My hack just changes a number in the program. It should be the same in all other respects.
I will definitely try this. I had a spacebuild map (gm_spacewar, if anyone cares) that was taking 25 (!) hours to compile because of vvis alone (which was taking forever because of so many leaves), so I had a friend compile it, and then he went and released it and took all the credit. Oh well.
Anyway, my one complaint is that while it IS really awesome to increase the base visleaf size, sometimes 16384 units is a little big, even for large gmod maps. Perhaps you could release a slightly less extreme version, with the leaves just kicked up to 2048 or 4096. :)
It takes ages to compile with both versions, I did a quick compile and it worked so i'm going to test it now in gmod. later I will try a huge land map
[QUOTE=Of Doom]Anyway, my one complaint is that while it IS really awesome to increase the base visleaf size, sometimes 16384 units is a little big, even for large gmod maps. Perhaps you could release a slightly less extreme version, with the leaves just kicked up to 2048 or 4096. :)[/QUOTE]
I might do that.
Another option might be to use [url=http://developer.valvesoftware.com/wiki/Hint_brush]hint brushes[/url] if that's not too advanced for you. Then you would have full control of your map's VIS.
[b]Edit:[/b] I won't be able to reply for an hour but I'll be back.
[QUOTE=DeathByNukes]Another option might be to use [url=http://developer.valvesoftware.com/wiki/Hint_brush]hint brushes[/url] if that's not too advanced for you. Then you would have full control of your map's VIS.[/QUOTE]
I used to be OCD enough to hint my entire map. :P Lately, I just don't have the energy, but it is always an option.
I still hope you bring out smaller versions. If I'm doing my math right, a map that fills the grid is 32x32x32 leaves (with 1024 units per leaf). If the leaves were just twice as big, the grid becomes 16x16x16, which has one eighth as many leaves. (32768 vs. 4096) Double the leave size again, you get 512 leaves, etc. What I'm getting at, and I'm sure you know, is that we don't even need 16384x16384 leaves to get massive performance gain.
Regardless, great tool, and I'll be using it in the future next time I have to compile a giant, wide-open map.
So this increases the maximum size partitions made by VBSP, which results in VVIS making larger (and therefore less) visleafs, resulting in simpler level geometry and PVS? Correct me if I got any of this wrong.
It seems like a pretty cool hack. Maybe I'll try it later.
Sorry, you need to Log In to post a reply to this thread.