当前位置:网站首页>Unity occlusion culling
Unity occlusion culling
2022-06-11 04:21:00 【Sea moon】
Set the static objects in the scene as static occlusion Static Occluder And static obstructions Static Occludee.

But they have to be terrain or Mesh Renderer, Opaque , Don't move .
After setting the static occluder and the static occluded , Make sure that the camera has the occlusion removal function turned on , You can bake the occluded data .
window - Rendering - Occlusion culling , Open the occlusion culling panel

Object tab related settings
Screne Filter You can select the object type to edit , After selecting an object, you can adjust its static identification .
1. If you don't create an occluded area , Occlusion culling is applied to the entire scene by default .
2. Whenever the camera is outside the occluded area , Occlusion culling will not be applied . It is important to have a camera where the occluded area covers , But if the occlusion area is too large , It will lead to more baking expenses .
3. Occlusion Areas Applied to moving objects to be occluded .
Bake tab related settings

Smallest Occluder
The size of the minimum shelter : The smallest size that can block other objects , Anything smaller than this size will be obscured
Smallest Hole
This value represents the minimum gap between the geometry that the camera should see .
Backface Threshold
Unity Occlusion using data size optimization , Reduce unnecessary details by testing the back . The default value is 100 It is powerful. , Back faces are not removed from the dataset . The value is 5 Data will be actively reduced depending on the location with the visible back . The idea is usually , Effective camera positions usually do not see many backgrounds - for example , View below the terrain , Or views in solid objects that you should not be able to reach . Below the threshold 100 Under the circumstances ,Unity These areas will be completely removed from the dataset , This reduces the size of occluded data .
View the culled effect
After baking , Select the visualization tab , Then go to the scene , choice Visualize, You can see the effect of being eliminated
Whether to bake the occlusion elimination effect of terrain
Only the scene objects are baked , No baked terrain
This leads to redundancy drawcall
The following figure , The house is shaded by the terrain , But it hasn't been eliminated , So there is 4331 Of drawcall

After baking , The house was knocked out ,drawcall Down to 1419

Baking is a scheme that trades space for time
If the terrain is large , Baking occlusion culling data takes a long time , And the baking data will be relatively large
This may increase the memory footprint of the game


边栏推荐
猜你喜欢

一款自适应的聊天网站-匿名在线聊天室PHP源码

mysql存储过程

Explain in detail the structure and working principle of the crystal oscillator

Guanghetong LTE Cat4 module l716 is upgraded to provide affordable and universal wireless applications for the IOT industry

MySQL index

Unity 音乐播放管理器

2022-06-10:薯队长从北向南穿过一片红薯地(南北长M,东西宽N),红薯地被划分为1x1的方格, 他可以从北边的任何一个格子出发,到达南边的任何一个格子, 但每一步只能走到东南、正南、西南方向的

游戏数学: 计算屏幕点中的平面上的点(上帝视角)

ESP series module burning firmware

给你一个项目,你将如何开展性能测试工作?
随机推荐
PHP regular use case
JVM(4):类的主动使用与被动使用、运行时数据区域内部结构、JVM线程说明、PC寄存器
使用工具类按一定规则读取Excel文件
项目架构演进
Embedded basic interface UART
Esp32 development -lvgl display picture
MySql索引
2022 年 5 月产品大事记
MySQL锁总结
Evil CSRF
Methods to detect whether PHP websites have been broken
Unity 高級背包系統
SQL optimization
2022爱分析· 隐私计算厂商全景报告 | 爱分析报告
Unity Advanced Backpack System
JVM(7):动态链接、方法的调用、四种方法调用指令区分非虚方法和虚方法、invokedynamic指令的使用
App live broadcast source code, platform login page and password modification page
Cloud broadcast alert, guanghetong helps intelligent camera to build a "river protection" drowning prevention system
司马炎爷爷 告诉你什么叫做内卷!
Vulkan-官方示例解读-RayTracing