func_details increasing BuildVisLeafs calculations tenfold

Any aspects of level design for the Source engine.

func_details increasing BuildVisLeafs calculations tenfold

Postby Syphon on Sun Jun 09, 2013 9:55 pm

[SOLVED:] Too many small lightmaps.

Hello everyone,

Today I started noticing really long compile times in the level I'm working on.

The compiler kept timing out at BuildVisLeafs and created a fullbright map that even mat_fulbright "0" couldn't darken.

Using the Cordon tool I was able to find out where the issue was coming from, and checking the auto_visgroups I found out the map compiles correctly if all func_details are hidden.

I was under the impression func_details were ignored by VVIS so should in no way be able to influence it, but as you can see in the images below it certainly does greatly affect my compile times...

(all nonhidden func_details are highlighted)
-------
SCENARIO 1: Everything visible.
http://puu.sh/3c4TP.jpg
BuildVisLeafs: 0...1...2...3...4...5...6...7...8...9...10 (169)
-------
SCENARIO 2: Hid a couple of func_details.
http://puu.sh/3c5hs.jpg
BuildVisLeafs: 0...1...2...3...4...5...6...7...8...9...10 (97)
-------
SCENARIO 3: Hid even more func_details.
http://puu.sh/3c5Di.jpg
BuildVisLeafs: 0...1...2...3...4...5...6...7...8...9...10 (64)
-------
SCENARIO 4: Hid ALL func_details.
http://puu.sh/3c5I1.jpg
BuildVisLeafs: 0...1...2...3...4...5...6...7...8...9...10 (18)
-------
As you are able to see the time to generate the visLeafs is in direct correlation with the amount of func_details in the map.

I have also copied everything into a new map file to see if that would be the issue. All compiles were done on fast and I'm mapping for HL2 Ep2 (Source2009).

Any help would be greatly appreciated so thanks in advance!

Jethro
Last edited by Syphon on Mon Jun 10, 2013 7:05 pm, edited 1 time in total.
Syphon
Regular
Regular
 
Joined: Tue Dec 09, 2008 12:53 pm
Location: the Netherlands

Re: func_details increasing BuildVisLeafs calculations tenfo

Postby Armageddon on Sun Jun 09, 2013 10:12 pm

The metal walls and thick angled concrete slabs should not be func_detail.
User avatar
Armageddon
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Sun Dec 14, 2008 5:53 am

Re: func_details increasing BuildVisLeafs calculations tenfo

Postby DarkIceJack on Sun Jun 09, 2013 11:16 pm

Everything apart from the stairs, window and door frames, and the trusses along the roof should be changed back to world brushes.
Time is but a movement inside a stillness; as the hands of a clock seem to race against time
User avatar
DarkIceJack
Been Here A While
Been Here A While
 
Joined: Sat Nov 24, 2007 12:42 am
Location: Bluff NZ - The bottom of the World -

Re: func_details increasing BuildVisLeafs calculations tenfo

Postby Dives on Mon Jun 10, 2013 12:12 am

BuildVisLeafs is a vrad process (and confusingly named because visleafs are created by vbsp).
By removing the func_details you're removing brush faces who's lighting need to be calculated, so naturally it'll complete faster. How long are you wait for it to "time out"? vrad should take a while if your map is large.
User avatar
Dives
May Contain Skills
May Contain Skills
 
Joined: Sat Feb 28, 2009 9:54 pm
Location: Moorpark, CA

Re: func_details increasing BuildVisLeafs calculations tenfo

Postby Syphon on Mon Jun 10, 2013 8:45 am

Ah, Seeing the VRAD process running in the background did confuse me!

I removed most of the func_details in the screenshot area and recompiled. Unfortunately, the problem persists.

When everything is visible and I compile the whole map, it times out after six minutes. Like this:
----
BuildVisLeafs: 0...1...2...3...4...5...6...7...8..
** Executing...
** Command: Copy File
** Copying map.bsp
----
If I hide the area from the screenshots (from the previous post) the compile time of the rest of the map is 2 minutes.

If I hide all but the area from the screenshots compile time is 3 minutes, note that this area is only a fifth or sixth of the total map.
Syphon
Regular
Regular
 
Joined: Tue Dec 09, 2008 12:53 pm
Location: the Netherlands

Re: func_details increasing BuildVisLeafs calculations tenfo

Postby ErikKiller on Mon Jun 10, 2013 1:45 pm

I'd suggest you take some time out and read up on optimisation:
https://developer.valvesoftware.com/wik ... vel_design)
It's a tricky thing to master, but it's possible.
Image
Image
First rodeo? Use the Source SDK Documentation for reference!
User avatar
ErikKiller
May Contain Skills
May Contain Skills
 
Joined: Sun Sep 09, 2007 4:05 pm
Location: Estonia

Re: func_details increasing BuildVisLeafs calculations tenfo

Postby zombie@computer on Mon Jun 10, 2013 4:39 pm

Syphon wrote:Ah, Seeing the VRAD process running in the background did confuse me!

I removed most of the func_details in the screenshot area and recompiled. Unfortunately, the problem persists.

When everything is visible and I compile the whole map, it times out after six minutes. Like this:
----
BuildVisLeafs: 0...1...2...3...4...5...6...7...8..
** Executing...
** Command: Copy File
** Copying map.bsp
----
If I hide the area from the screenshots (from the previous post) the compile time of the rest of the map is 2 minutes.

If I hide all but the area from the screenshots compile time is 3 minutes, note that this area is only a fifth or sixth of the total map.
its not timing out, its crashing. Though i assume you mean the one by the other, i wasn't 100% certain. Vrad crashes often on brushfaces that are oddly constructed, eg wrong texture alignment or surface not really what it expects it to be. Needless to say finding the culprit is a boring process of hiding and unhiding untill you find the brushface (or -s if you are unlucky) that cause said crash.
When you are up to your neck in shit, keep your head up high
zombie@computer
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Fri Dec 31, 2004 5:58 pm
Location: Lent, Netherlands

Re: func_details increasing BuildVisLeafs calculations tenfo

Postby Syphon on Mon Jun 10, 2013 5:27 pm

Thanks for all the replies!

The VRAD crashes are very irregular so I am finding it really hard to find the culprit.

Today I've been excluding areas until the map compiles correctly. Then when I finally found the area which causes VRAD to crash I copied that area to a new map file.

With func_details the new map keeps crashing but without them it compiles fine. So I decide to hide half of the details and again, it compiles fine. So that means the erroneous func_detail is with the others but compiling with that half also is fine. Only compiling them together causes VRAD to crash.

Continually experimenting I decided to destroy ALL standard brushes and build a new box around all the func_details and this somehow solved it. It does however take a while to compile...

Long story short: It seems to me the source of the problem isn't in one place and keeps shifting. Does that mean it overloads at a certain point (badly optimized)?

Would someone have the time to look at my .vmf? I am not asking for you to help hiding/unhiding brushes/entities but it would be great if someone could take a fly through the map to see if it isn't too big, too detailed etc...

Here are some images of the (what I think) more complicated areas of the map:

http://puu.sh/3cEXB.jpg

http://puu.sh/3cEZH.jpg

http://puu.sh/3cF0P.jpg

http://puu.sh/3cF2V.jpg

http://puu.sh/3cF4W.jpg

EDIT: I am feeling hopeful and already uploaded the .vmf. Here is the direct download link: http://www.jethrojongeneel.com/sites/default/files/jongeneeljethro_garden_v11.vmf (9.3mb)
Syphon
Regular
Regular
 
Joined: Tue Dec 09, 2008 12:53 pm
Location: the Netherlands

Re: func_details increasing BuildVisLeafs calculations tenfo

Postby Dives on Mon Jun 10, 2013 6:39 pm

Whoa your lightmap scale of all your surfaces is set way way too low. Much of your map is set at a lightmap scale of 2 and 4. vrad is probably crashing because its running out of memory or exceeding whatever internal limits it has.
Select everything and set it to lightmap scale 16 and use anything lower than that sparingly, 8 is usually as low as you need to go.
User avatar
Dives
May Contain Skills
May Contain Skills
 
Joined: Sat Feb 28, 2009 9:54 pm
Location: Moorpark, CA

Re: func_details increasing BuildVisLeafs calculations tenfo

Postby Syphon on Mon Jun 10, 2013 7:03 pm

Wow!

Rarely do I create new brushes, but instead I always copy existing ones. In an early version of the map, a couple of them had an altered lightmap-scale and as I continued to expand, copying existing brushes again and again, the small lightmaps must have spread through the map as a disease!

Dives, you are a hero! The highlight of my day. Thank you Interlopers! Hopefully I'll be able to solve some other people's issues in return.
Syphon
Regular
Regular
 
Joined: Tue Dec 09, 2008 12:53 pm
Location: the Netherlands

Return to Hammer Editor Help

Who is online

Users browsing this forum: Bing [Bot]