Pixel perfect occlusion system that will significantly improve the performance of your scenes, without almost any overhead.
Using time on your computer, precompute/bake your scenes to gain a significant performance boost. The occlusion culling algorithm will find all visible meshes from each point on your scene, using the color-coding algorithm. Then it will save them efficiently and load only when needed.
Heavily occluded scenes like a two-story house with the interior on all floors gained us up to 240% in frame rate!. From 30fps to 72fps on Quest 2. Open world scenes with flat chunked terrain, gained us 10-25%. From 47fps to 60fps on low-end mobile.
Links:
Name | Link |
---|---|
Documentation and API reference | https://prographers.github.io/Precomputed-Culling |
Project page | https://prographers.com/precomputed-culling/ |
Documentation repository | https://github.com/Prographers/Precomputed-Culling/ |
Discord | https://discord.gg/55gM3s3pdR |
Asset Store | https://assetstore.unity.com/packages/slug/221372 |
- Support for URP and HDRP
- Support for multiple cameras
- Support for multiple scenes with multiple variants and dynamic loading and unloading
- Lightweight with an option for additional compression
- Supports transparency
- Supports LODs
- Supports Unity Terrain
- Supports 2D Sprites*
- Runtime precision control between quality and performance
- Support for all platforms including mobile, VR, AR, and WebGL
- API for custom building pipelines
- Everything is written in C#, full source code included
- Code documentation + external documentation with tutorials
- Easy to setup
- Examples and Demos
- Moving Occlusion Area with objects
- Support via email or discord
- Superior performance
- Bake in runtime or before build
*Not recommended to use in 2D games, intended use is for example leaves on the 3D trees or far away rocks.
- Port to other game engines
- In Unity Editor, the Open Package manager
- In "My assets" select
Precomputed Culling
and press "Install" - Done!
For more advanced usages visit https://prographers.com/precomputed-culling/ or the related section in the repository https://github.com/Prographers/Precomputed-Culling/
- Open the main scene where you want to initialize your setup
- In the top menu, press Tools->Precomputed Culling->Setup
- Adjust Precomputed Volume/Area to match the play area of your player (note you can have multiple areas)
- Adjust cell density and camera control (Find the best setting between bake Quality and Bake time and performance).
- Start baking either in Tools->Precomputed Culling->Bake or in Area
- Wait for bake to finish
- Enjoy an increase in performance
- Chunk size should be around 5 meters in width by 5 meters height by top jump height.
- At least 3 cameras in the middle. At top of jump height; At eye level; At Crouch eye level (add the fourth one if the prone position is allowed)
- Allow for taking data from neighboring cells at distance of 1 reduce aggressiveness of the algorithm
- Set runtime pixel requirement to 50-100 pixels
- Allow for baking terrain
- Allow for sprites baking (If the environment is not a pure 3D model)
- Chunk size should be around 1 meter by 1 meter by the height of the building
- At least 18 cameras. All spread out within the cell. At top of jump height; At eye level; At Crouch eye level.
- (Optional if experiencing artifacts) Allow for taking data from neighboring cells in distance of 1 reduce aggressiveness of the algorithm
- Set runtime pixel requirement to 0 - 25 pixels
- Allow for baking transparent between 1 or 2 layers
More dense areas should have a bigger priority than less dense areas.
Please rate us at Asset Store 5 stars if you find this plugin useful!