编辑器/功能拓展
Unity 2020
WHAT IS FRUSTUM CULLING?
Increase your frames and performance using this tool that disables game objects completely when they're not in view (or distance). Stop events, scripts, animations, sounds, basically any and all components on an object when not in view and re-enable on view, by disabling/enabling the object itself.
WHAT'S THE PURPOSE?
Sometimes, depending on your game, you might have cpu-intensive game objects that are aimlessly taking performance out of your game. So the solution is to completely disable these game objects when out of view (or distance) and re-enable again when in view. A very simple example: is a location fixed NPC that is playing animations and audio, or a puzzle component that is making heavy calculations and validations every frame. They don't need to run when the player isn't looking. For these cases and many more, you can disable these objects and improve your game's performance/frames dramatically.
RENDERING PIPELINES
This package works on all rendering pipelines (built-in, URP & HDRP) but the demos are made for URP and built-in.
DISTANCE CULLING
This asset offers the option to disable game objects by distance also and not only the camera's view.
HOW IS THIS DIFFERENT FROM UNITY'S SOLUTION?
Unity performs Frustum Culling for static objects by default under Occlusion Culling, but you need a custom solution to completely disable the game object as Unity's solution disables the mesh renderer only. This is where this tool comes in. Use it on CPU-intensive objects as the game object will be disabled in it's entirety including all of it's scripts and components when the player isn't looking and back on again when within the frustum. Don't use it on your entire world.
ASSET PACKAGE
This package comes with a demo for built-in and URP, fully-commented source codes and documentation.
什么是视锥体剔除?
使用此工具可以完全禁用不在视野范围内(或远处)的游戏对象,从而提高帧率和性能。通过禁用/启用对象本身,可以在对象不在视野范围内时停止事件、脚本、动画、声音以及对象上的所有组件,并在玩家视线范围内时重新启用它们。
目的是什么?
有时,根据游戏的不同,您可能会有一些 CPU 密集型游戏对象,它们会无目的地降低游戏性能。因此,解决方案是在不在视野范围内(或远处)时完全禁用这些游戏对象,并在玩家视线范围内时重新启用它们。举个很简单的例子:一个固定位置的 NPC 正在播放动画和音频,或者一个谜题组件每帧都在进行大量计算和验证。当玩家不在视线范围内时,它们无需运行。对于这些情况以及更多其他情况,您可以禁用这些对象并显著提升游戏性能/帧率。
渲染管线
此资源包适用于所有渲染管线(内置、URP 和 HDRP),但演示仅针对 URP 和内置管线制作。
距离剔除
此资源包提供了按距离禁用游戏对象的选项,而不仅仅是摄像机视角。
这与 Unity 的解决方案有何不同?
Unity 在遮挡剔除下默认对静态对象执行视锥体剔除,但您需要自定义解决方案才能完全禁用游戏对象,因为 Unity 的解决方案仅禁用网格渲染器。这就是此工具的用武之地。请将其用于 CPU 密集型对象,因为当玩家不在视线范围内时,游戏对象(包括其所有脚本和组件)将被完全禁用,而当玩家位于视锥体内部时,则会再次禁用。请勿将其用于整个世界。
资源包
此资源包包含内置和 URP 的演示、完整注释的源代码和文档。
|
|