Compiling time?

Avatar
Lostprophetpunk
409 Posts
Posted Jul 17, 2011
Heya there,

I have a map which contains two rooms, and there are not large rooms at all. However, when I compile it, it seems to take about half an hour to compile.

Is there anyway to reduce the time it takes to compile? As it's quite annoying when trying to fix bugs and test to see if they have been fixed etc.

Advertisement
Registered users don’t see ads! Register now!
Avatar
Skotty
671 Posts
Posted Jul 17, 2011
Replied 39 minutes later
What exactly needs this long time? VRAD, VVIS oder VBSP?
Avatar
Lostprophetpunk
409 Posts
Posted Jul 17, 2011
Replied 18 minutes later

Skotty wrote:
What exactly needs this long time? VRAD, VVIS oder VBSP?

I have no idea.

I am an inexperienced mapper with Hammer. I have got all the settings on normal, and set it just to compile, and not to run after.

Avatar
Skotty
671 Posts
Posted Jul 17, 2011
Replied 8 minutes later
Just post your last compile log. You can find it in the same directory where your vmf ist. It's named like your map with the ending .log.
Avatar
Lostprophetpunk
409 Posts
Posted Jul 17, 2011
Replied 25 minutes later

Skotty wrote:
Just post your last compile log. You can find it in the same directory where your vmf ist. It's named like your map with the ending .log.

Is this what you meant?

The amount of characters were too big for the post.

sp_mini-faith[log file].rar
Attachments
sp_mini-faith[log file].rar
0.04 MB 35 downloads
Avatar
Aldéz
221 Posts
Posted Jul 17, 2011
Replied 1 hour later
It's vvis that takes most of the time (33 minutes and 48 seconds in the latest log entry). You need to optimize the map. You most likely need to turn world brushes to func_detail. Did a quick search on VDC and found this for more info: http://developer.valvesoftware.com/wiki ... timization.
Avatar
Lostprophetpunk
409 Posts
Posted Jul 17, 2011
Replied 30 minutes later

Ald?z wrote:
It's vvis that takes most of the time (33 minutes and 48 seconds in the latest log entry). You need to optimize the map. You most likely need to turn world brushes to func_detail. Did a quick search on VDC and found this for more info: http://developer.valvesoftware.com/wiki ... timization.

Thank you for that.

I am a bit confused, as most of my map is fun_detail anyway. I have started to read about visleafs, but they confuse the hell out of me. =[

Avatar
Aldéz
221 Posts
Posted Jul 17, 2011
Replied 56 minutes later
fun_detail? :lol: Maybe that's why it's slow...

A visleaf is an invisible volume that knows which surfaces it touches. If you can "see" into a visleaf, then the game will render the surfaces associated with it (only those facing you).

VVIS calculates which visleaves that can see each other during the compilation. If there are many visleaves, and they can see each other, it will take a lot of time.

There are two things you can do to identify the source of the problem. You can filter out everything except world brushes with the visgroup tool. You can also load the portal file (Map > Load Portal File) to see all the visleaves in the map. Their edges should turn up in blue in the 3D view.

Then you'll be able to identify which brushes that cause visleaves to be created. Brushes that aren't important in blocking visibility (like pillars or wall details) should be made into func_detail. They will then no longer split the world into more visleaves.

Avatar
Lostprophetpunk
409 Posts
Posted Jul 17, 2011
Replied 49 minutes later

Ald?z wrote:
fun_detail? :lol: Maybe that's why it's slow...

A visleaf is an invisible volume that knows which surfaces it touches. If you can "see" into a visleaf, then the game will render the surfaces associated with it (only those facing you).

VVIS calculates which visleaves that can see each other during the compilation. If there are many visleaves, and they can see each other, it will take a lot of time.

There are two things you can do to identify the source of the problem. You can filter out everything except world brushes with the visgroup tool. You can also load the portal file (Map > Load Portal File) to see all the visleaves in the map. Their edges should turn up in blue in the 3D view.

Then you'll be able to identify which brushes that cause visleaves to be created. Brushes that aren't important in blocking visibility (like pillars or wall details) should be made into func_detail. They will then no longer split the world into more visleaves.

Didn't notice the typo. hehe.

One thing I have found is if I change the compile options to 'fast' for VIS, it takes like 1 minute.

Thank you for explaining visleafs to me. Much appreciated.

Avatar
Aldéz
221 Posts
Posted Jul 17, 2011
Replied 1 hour later
It's not necessary to quote a whole post when your answer is the next post. It clutters the thread imho.

Back on topic:

I don't know exactly what fast mode does, but it's crude (and thus fast obviously). It's good when you want to avoid very low framerates during testing. If your map is relativly small, and it takes about 30 minutes to compile in normal mode, you have a serious optimization problem.

Avatar
Lostprophetpunk
409 Posts
Posted Jul 17, 2011
Replied 47 minutes later
I didn't know about optimization until now. I shall work on the optimization of my next map, but the first map will take me ages to optimize as I'm still learning how to do it.
Avatar
Skotty
671 Posts
Posted Jul 17, 2011
Replied 15 minutes later
Optimization of existing maps is difficult. The start of every map should already be optimized.

Vis compile time will increase noticeable with single big rooms. If you have a lot of small ones connected with small hallways it won't need very long. Thats because in the big room it needs to create a lot of big Visleafs.
So if you create maps with outside areas, try to use func_viscluster.

A normal compile time in Portal 2 should be max. 2 Minutes for Vis.

Avatar
Aldéz
221 Posts
Posted Jul 17, 2011
Replied 2 minutes later

Lostprophetpunk wrote:
I didn't know about optimization until now. I shall work on the optimization of my next map, but the first map will take me ages to optimize as I'm still learning how to do it.

Glad I could help. Optimization is such a huge topic you can easily drown in it. Portal is rather forgiving though, since it's mostly small rooms. You'll get far with the basics, like func_detail. Then there's hint brushes, areaportals, areaportal windows, func_visclusters, nodraw, lightmap grid resolution... :blah:

Skotty wrote:
[...]
Vis compile time will increase noticeable with single big rooms. If you have a lot of small ones connected with small hallways it won't need very long. Thats because in the big room it needs to create a lot of big Visleafs.
[..]

Just to clarify; size doesn't matter in itself. The exposure and number of visleaves does.

Avatar
Lostprophetpunk
409 Posts
Posted Jul 17, 2011
Replied 6 minutes later

Skotty wrote:
Optimization of existing maps is difficult. The start of every map should already be optimized.

So would I need to make the walls for the rooms into a func_detail? I am still reading up on area portals and all that.

Avatar
Aldéz
221 Posts
Posted Jul 17, 2011
Replied 2 minutes later
Anything that's significant for blocking visibility and sealing the map should not be func_detail.
Avatar
Skotty
671 Posts
Posted Jul 17, 2011
Replied 5 minutes later
Areaportals are not very necessary in Portal. Because of the fact that you mainly create "small" chambers connected with some sort of hallways, each hallway itself can act as areaportal.
You just have to watch the following: The hallways need some kind of curve or stair, so the player can't see from anywhere in Chamber 1 to Chamber 2. Thats the only thing.

The function of func_detail is simple: small brush details or pillars can be func detail.
Every brush will "cut" the Visleafs into more. If you have chambers in destroyed theme and place broken tiles out of brushes everywhere, maybe with different rotations, each of them will cut the visleafs into more. Just think: Vis compile time will decrease with less visleafs.
If you hide all func_details, a room should look as simple as possible. That means: no details (broken panels etc.) and flat surfaces.

Avatar
Aldéz
221 Posts
Posted Jul 17, 2011
Replied 5 minutes later

skotty wrote:
Optimization of existing maps is difficult. The start of every map should already be optimized.

I thought about that for a minute. There isn't much to optimize in the beginning. I prefer to optimize in the end of the creation process because I make so many changes that any optimization soon becomes obsolete.

Avatar
Lostprophetpunk
409 Posts
Posted Jul 17, 2011
Replied 13 minutes later

Ald?z wrote:
Anything that's significant for blocking visibility and sealing the map should not be func_detail.

So from what I am reading, the walls can be world brushes, but anything inside a func_detail. As all of my walls/floors seal the map, so no leaks happen.

Then at the start of an entrance to another room, I should place an areaportal?

Avatar
Skotty
671 Posts
Posted Jul 17, 2011
Replied 7 minutes later
Forget about the areaportals. Their need in Portal 2 is very very limited. They just are senseful if you have to hide rooms with a lot of graphic costing things in it. Due the "small" rooms in Portal you will nearly never need this.
Big outside areas like in Half-Life would need this.

Use func_details just on details, small things and pillars. If you have a wall blocking the whole view of the player, don't make it to func_detail, because the VIS will hide everything the player can't see behind this wall.
If you make walls in your room to func_detail, the game will render all objects behind the wall while the player can't see them (and thats waste of FPS). Always think like this!
Small details on the floor like single broken tiles won't block the players view, so make them to func_details.
Small pillars in a room won't block the view, because you can look past it.

Advertisement
Registered users don’t see ads! Register now!
Avatar
Lostprophetpunk
409 Posts
Posted Jul 17, 2011
Replied 5 minutes later
Thanks for the help with this. So what if I have panels that open up revealing another room?