http://publications.dice.se/attachments/CullingTheBattlefield.pdf
相当hardcore的介绍了dice怎么做cull的
scene数据,battlefield常常是有15000+的object,用新的方法,得出的数据是:
- 360:1.55ms
- i7:1.0ms
- ps3:0.85ms
- spu:0.63(spu太变态了)
使用简单的格子来做划分,AABB用bounding sphere来加入grid的obj列表中,并以此做frustum culling。
grid划分几个类别:
- render dynamic
- render static
- phyx static
- phyx dynamic
加减obj的时候
- 加就用prealloc的数据,不够了再加
- 减的时候用swap,然后count--的方式,高效的保持数据的紧密
然后就是数据简单到死,然后culling过程也很暴力,直接几个for,木有树状结构的操作。
culling函数里面很多条件判断,这个很费,于是用vmx还是sse的代码来优化,相当hardcore(这部分先记下,后面用到的时候再研究)。
project to screen space
这个很棒,会把aabb或者bounding sphere project to screenspace,如果面积小到一定程度就直接skip,这个以前还真没想过,nice!
这样就避免了subpixel这一类的东西的生成。
software occlusion
在一些大的建筑,地形这一类的用美术预先放好的occluder,然后cpu做一个大约256*111的render target,把bounding sphere弄上去,query一把(cpu端操作)不再里面就skip。
经过时间的考验,这招一直很给力。
上个图:场景这样
对应的software occlusion 这样:
蛋疼的爱写software renderer的这下有实际用武之地了。
这么一搞cpu端和gpu端都可以省(如果cull的比较多的话)
最后引用两句话,最近的工作经验对此极其赞同:
- it's all about data
- simple data often means simple code
分享到:
相关推荐
We present a simple but powerful algorithm for optimizing the usage of hardware occlusion queries in arbitrary complex scenes. Our method minimizes the number of issued queries and reduces the delays ...
- 支持 LOD - 支持透明度 - 与内置和 URP/HDRP 兼容 - 与 VR 兼容(多视图、单通道实例化、多通道等) - 非常高效 - 支持动态生成的烘焙预制件 - 支持多个摄像头 - 包括完整的 C# 源代码 - 支持所有平台,包括移动...
Unite 2018 LA上 LOD and Culling Systems
Unity 3D 摄像机 Clear Flags属性和Culling Mask属性用途详解
《在DirectX9中进行Occlusion Culling》 教程中的demo源码和可执行程序 教程原文:http://blog.csdn.net/u011590428/article/details/9853799
InstantOC Dynamic Occlusion Culling LOD 1.5.zip
masked-software-occlusion-culling.pdf
Perfect Culling - Occlusion Culling System 1.2.3 unity遮挡剔除插件,超级好用
InstantOC Dynamic Occlusion Culling LOD.rar
Persson discusses two antialiasing methods that are driven by additional geometric data generated in the geometry shader or stored upfront in a dedicated geometry buffer that might be part of the G-...
数据结构排序算法,透视投影是3D固定流水线的重要组成部分,是将相机空间中的点从视锥体(frustum)变换到规则观察体(Canonical View Volume)中,待裁剪完毕后进行透视除法的行为。在算法中它是通过透视矩阵乘法和透视...
纯动态遮挡剔除 + LOD 零焙烤时间 完美匹配程序场景 基于射线的LOD系统 IOC + LOD / 只有IOC /只有 LOD 灯光与粒子系统遮挡剔除 Unity地形遮挡剔除 完全支持Occludees 完全支持实时阴影 完全支持动态批处理 ...
Perfect Culling-Occlusion Culling System Unity完美剔除遮挡剔除系统插件unitypackage项目源码C# 支持Unity版本2019.4.40或更高 Perfect Culling 使您能够为预制件和场景烘焙像素完美的遮挡数据。它的工作原理是为...
Use Navigation Meshes, Occlusion Culling, and the Profiler tools Work confidently with GameObjects, Rotations, and Transformations Understand specific gameplay features such as AI enemies, Inventory ...
用hiz cull实现的大量草的剪裁
最新版,unity2019亲测可用无报错
Unity 3d Occlusion Culling设置
The view frustum is the volume that contains everything that is potentially (there may be occlusions) visible on the screen. This volume is defined according to the camera's settings, and when using a...
Lite Frustrum Culling.unitypackage
“如果可能,请购买支持开发人员的软件包” 新!美化3增加了对Unity 2022的支持(也支持2020/2021),包括新的抗锯齿和电影带效果,并增加了新的选项和改进的花,变形耀斑,轮廓,色差和景深。 这个资产包含3个包: ...