Garry's Mod

Garry's Mod

873 vurderinger
Automatic Culling - Dynamic auto-cull
2
2
   
Pris
Føj til foretrukne
Gjort til foretrukken
Fjern som foretrukken
Content Type: Addon
Addon Type: Tool
Addon Tags: Build, Fun, Roleplay
Filstørrelse:
Offentliggjort:
Opdateret:
2.517 KB
28. maj kl. 17:58
28. maj kl. 18:44
2 ændringsbemærkninger ( vis )

Abonner for at downloade
Automatic Culling - Dynamic auto-cull

Beskrivelse
What is this?
This script is a dynamic aggressive culling applicator for Draconic's aggressive culling system I released a few weeks back. I had a fair few people ask me to make a script that makes it "automatically apply to everything". So tl;dr, here's that request, -ish.

Not so tl;dr: If I were to apply it to everything you would end up losing more performance than you would gain. So I wrote this script which has a size & material count filtering system for spawned entities, as well as a blacklist for entities it should not bother with, to make sure this only applies to entities that will actually improve your performance by enabling aggressive culling on them. This also includes convars if you wish to try enforcing it on more things just to see yourself that trying to do so will only result in a net loss. Draconic's aggressive culling disables when the entity is within close proximity so you won't have to worry about stuff like weapons and gameplay objects becoming invisible near you, as well as whenever you are zoomed in.

So where will this actually save my FPS?
  • Entities obscured by the world from player view, but not traditionally culled (either due to a large visleaf or a poorly optimized map).
  • Entities an extreme distance away will not render at all.
  • Weapons with a ton of materials held by NPCs.
  • Custom entities with a lot of polygons and/or materials.
  • If used on a server with "custom base maps" or other perma-prop-like solutions, likely to help save a decent few frames from scripted entities with lots of materials being picked up by this script.

Convars
  • sv_autocull_enabled 0/1 -- Enable/disable this script from flagging newly-spawned entities for aggressive culling.
  • sv_autocull_dolargeculling 0/1 (Default 1) -- Enable/disable "large" entities from being aggressively culled (See image).
  • sv_autocull_domassiveculling 0/1 (Default 0) -- Enable/disable "massive" entities from being aggressively culled (See image).
  • sv_autocull_minimummaterials 3 (Default 3, max 32) -- Minimum number of materials an entity must have in order to be considered for automatic aggressive culling. Using this on a ton of entities with only one material will result in a loss of performance rather than a save.

If you are looking for a way to manually apply aggressive culling to specific entities there is a toolgun tool I made for exactly this purpose.

IMPORTANT NOTE
Do NOT mix multiple culling-method addons. All you accomplish by doing this is creating extra processing overhead which will make your game run worse than if you didn't have any at all.

Support me on Ko-fi[ko-fi.com]
If you need immediate help with any of my addons, or just want to know what I'm working on or etc, then consider joining my Discord[discord.gg] server.
155 kommentarer
Биг Хит 21. nov. kl. 14:24 
Лирили ларила окалеро окала балери балерина аа
Vuthakral  [ophavsmand] 15. nov. kl. 2:45 
You didn't install the required addon
Gabriel Ultrakill 14. nov. kl. 23:41 
[Automatic Culling - Dynamic auto-cull] lua/autorun/automatic_aggressive_drc_culling.lua:3: attempt to index global 'DRC' (a nil value)
1. unknown - lua/autorun/automatic_aggressive_drc_culling.lua:3
That viking who procrastinates 14. nov. kl. 7:29 
the prophecy is true
PixelTheCollie ΘΔ 6. nov. kl. 23:33 
is this on by default?
ТАЙНО ДЕРНУЛ 10. okt. kl. 2:34 
тунг тунг тунг сагур та та та сагур удин дин дин дун
Vuthakral  [ophavsmand] 14. sep. kl. 5:28 
Just put it in an autoexec
JosefZopaopi 14. sep. kl. 5:27 
it doesn't save the sv_autocull_domassiveculling 1 setting whenever i load the game
Vuthakral  [ophavsmand] 14. aug. kl. 4:02 
Gmod issue, ask in their Discord. I've never had that problem so idk how to help you.
Vuthakral  [ophavsmand] 6. aug. kl. 7:18 
you can use mat_wireframe 4 to see the visual effect used in the thumbnail, anything picked up by this system will disappear when obstructed by the world even if it's in the same room as you.