Feature #1093

r_worldLOD to set level-of-detail

Added by keMoN over 1 year ago.

Status:New% Done:


Priority:NormalSpent time:-
Category:Mod generic
Target version:2.78
OS: Arch:


I constantly think about level-of-details (LOD) for ET and how useful it would be to have. Now I thought of something that in my eyes might be possible, so hear me out:

We need a new brushmodel entity, something along the lines like func_worldLOD.
This entity requires targetname and scriptname, but also has spawnflag choices: [0], [1] and [2].
Then we need a client cvar, something along the lines like r_worldLOD. This cvar has the value [1] assigned by default.

[2] = highest level of details
[1] = regular level of details
[0] = lowest level of details

The mapper can then create the map like they normally would, starting with the basic geometry. Afterwards, when they start filling their basic rooms with details, they can differentiate between detail that, on the one hand, is there for gameplay purposes, for example to block line-of-sight and player movement, and on the other hand details that is out of the players movement area. Everything that is out of the players reach, for example brushes on roofs or brushes high up on walls, can all be assigned to a func_worldLOD. func_worldLODs with regular amount of detail receive spawnflag [1]. Everything that is truly excessive receives spawnflag [2].
Ingame, depending on the value of /r_worldLOD, the appropriate amount of detail is rendered and the rest deleted. Changing the value would require a /vid_restart to reload the map.

With this, mappers can finally create maps that are (shameless self-promotion incoming) around Dingenskirchen’s amount of detail. Everyone who wants to have an excessively detailed map can set /r_worldLOD [2]. Everyone who is happy with the regular amount of detail can keep it on [1] and people that have troubles with even the regular amount of detail can set r_worldLOD to [0].

• This is restricted to brushmodels, since misc_models can’t be assigned another entity class.
• This should only be used on detail that is non-solid. Otherwise, this cvar is creating an unfair advantage.
• Maps using this will only be playable on Legacy (presumably).
⇒ with great power comes great responsibility for mappers

I have attached screenshots, where I simulated what I’m talking about. Obviously, all three maps aren’t excessively detailed, but with that cvar more details could be placed around the hallways of Railgun, etc. For example decals of water stains, rust or cracks in the concrete. More pipes, vents, toolboxes, etc. Everything highlighted in green is detail that is out of the player’s reach and could potentially be assigned to a higher level of detail. Obviously, like I said, the materials used for them should be made non-solid via shaders, so people who decide to render them, don’t have a disadvantage, because their nades get blocked.

Is this possible and if yes, is it good?

r_worldLOD.jpg (413 KB) keMoN, 05.05.2018 11:53

r_worldLOD2.jpg (490 KB) keMoN, 05.05.2018 11:53

r_worldLOD3.jpg (494 KB) keMoN, 05.05.2018 11:53


Also available in: Atom PDF