Garry's Mod

Garry's Mod

863 个评价
Automatic Culling - Dynamic auto-cull
2
2
   
奖励
收藏
已收藏
取消收藏
素材类型: 插件
插件类型: 工具
插件标签: 建筑, 快乐, 角色扮演
文件大小
发表于
更新日期
2.517 KB
5 月 28 日 下午 5:58
5 月 28 日 下午 6:44
2 项改动说明 ( 查看 )

订阅以下载
Automatic Culling - Dynamic auto-cull

描述
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 条留言
Биг Хит 11 月 21 日 下午 2:24 
Лирили ларила окалеро окала балери балерина аа
Vuthakral  [作者] 11 月 15 日 上午 2:45 
You didn't install the required addon
Tatsel 11 月 14 日 下午 11: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 11 月 14 日 上午 7:29 
the prophecy is true
PixelTheCollie ΘΔ 11 月 6 日 下午 11:33 
is this on by default?
ТАЙНО ДЕРНУЛ 10 月 10 日 上午 2:34 
тунг тунг тунг сагур та та та сагур удин дин дин дун
Vuthakral  [作者] 9 月 14 日 上午 5:28 
Just put it in an autoexec
JosefZopaopi 9 月 14 日 上午 5:27 
it doesn't save the sv_autocull_domassiveculling 1 setting whenever i load the game
Vuthakral  [作者] 8 月 14 日 上午 4:02 
Gmod issue, ask in their Discord. I've never had that problem so idk how to help you.
Vuthakral  [作者] 8 月 6 日 上午 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.