PDA

View Full Version : What is func_detail


ARKaMAN
05-30-2009, 01:55 PM
Ok, so I just started mapping for l4d. In the l4d offical tutorials they talk about func_detail. I read what they were for but i'm not sure I really understand what they meant. Is func_detail for making the game run faster? Any help would be welcome! thanks

Invernozz
05-30-2009, 02:07 PM
This (http://developer.valvesoftware.com/wiki/Func_detail) is a pretty good explanation.

For L4D I think func_detail will prevent an object from providing cover to allow infected to spawn if a survivor is on the other side. I'm not 100% on that point though.

Woodsyx
05-30-2009, 05:45 PM
What he said I dont know about any special effects for L4D but basically anything that isn't required to seal the world should be a func_detail.

munkeypants
05-30-2009, 05:55 PM
What he said I dont know about any special effects for L4D but basically anything that isn't required to seal the world should be a func_detail.

Wrong.

Anything that doesn't effectively block visibility should be set to func_detail.

For example, a solid wall with no windows/doors should not be func_detal. A wall with lots of windows should be func_detail because it doesn't effectively block visibility since you can see through the windows.

Same goes for things like pillars and detail brushwork like roof overhangs.

Invernozz
05-30-2009, 06:19 PM
I dont know about any special effects for L4D.

The way I understand func_detail is that it tells the visleaf to ignore the object, meaning as far as the game is concerned the player can see through it; even if his view is actually obstructed. If the game thinks a player can see a specific spot, the infected cannot spawn there while a player is looking in that direction.

That said I'm pretty nubbish, so my understanding might be wrong.

ARKaMAN
05-30-2009, 06:45 PM
Ok, I think I get it now. If you have this house with a roof and the "over hangs" stick out about 3 feet. I should mark it func_detil so what zombies can't spawn on top of the over hang they will have be on the main roof. Right?

Punishment
05-30-2009, 07:31 PM
When compiling, Source games cut maps into things called Visleafs. The game will then calculate which Visleafs can be seen by the player from where he/she is standing. Normally, Visleafs are cut every 1024 Hammer units, but all world geometry will also cause Visleaf cuts. A func_detail brush will tell the compiler not to cut visleafs for that brush.

ARKaMAN
05-30-2009, 09:04 PM
When compiling, Source games cut maps into things called Visleafs. The game will then calculate which Visleafs can be seen by the player from where he/she is standing. Normally, Visleafs are cut every 1024 Hammer units, but all world geometry will also cause Visleaf cuts. A func_detail brush will tell the compiler not to cut visleafs for that brush.

Why would you not want to cut it?

Fluffles
05-30-2009, 09:09 PM
because then there would be a billion mini visleaves...
and if one vis leaf can see 100 others the game would definately have spasms

ARKaMAN
05-30-2009, 09:30 PM
What do visleaves do?

Punishment
05-30-2009, 10:16 PM
What do visleaves do?

Visleaves will either be visible or invisible depending on whether or not the player can see them. The more Visleaves visible at one time, the lower the players' FPS will be. Also, non-rectangular Visleaves can also lower FPS.

cfoust
05-31-2009, 04:22 PM
This is what happens when you compile a map (among other things):
1. All the empty space in your map gets cut up into segments called visleaves. More brushes in your map means more leaves.

Only solid world brushes matter in this process. Displacements, water, entities, and func_detail is considered ampty space. Brushes with transparent textures are also ignored.

2. The compile tool vvis.exe looks at each leaf and tries to draw a line of sight to all other leaves in the map. It stores these results in a table and saves it inside the map. The important thing to know here is that the more leaves, the longer this process takes. A large, complex map might take all day to compile if you don't optimize.

3. When you play the map, the game keeps track of which leaf you are standing in. It will only render stuff that is visible from inside that leaf. If it doesn't have this information, it has to render everything at all times. That's bad.

So func_detail, used wisely, makes your map compile more quickly. It doesn't really make the game run better (the smaller vis tables might help a little, but probably won't be noticeable). If you use func_detail improperly (like doing it to your entire map), you will cause sections of the map to render when you can't really see them, which will definitely hurt performance.

zombie@computer
06-01-2009, 02:20 AM
Psssst

im secretly working on a new guide, so you havent seen this link, ok?

http://rvanhoorn.ruhosting.nl/files/test.html

schoft
06-01-2009, 08:15 AM
I like the flash game, plays like pokemon. I want to advance to the next lvl but it seems impossible =[