基于Unity3D游戏开发的批处理技术研究  被引量:1

Research on Batch Processing Technology Based on Unity3D Game Development

在线阅读下载全文

作  者:杨晓虎 朱颖 朱珣[2] YANG Xiaohu;ZHU Ying;ZHU Xun

机构地区:[1]江汉大学,湖北武汉430056 [2]江汉大学数学与计算机科学学院,湖北武汉430056

出  处:《科技创新与应用》2020年第3期31-32,共2页Technology Innovation and Application

基  金:武汉市教育局教学研究项目(编号:2019067);江汉大学2018年学生科研项目(编号:2018zd048)

摘  要:在传统游戏开发的过程中,图形渲染上的优化一直是一个难题,在Unity中最常用的优化方法就在于减少DrawCall,一次DrawCall就是CPU准备数据并通知GPU绘制图形的过程。当DrawCall数量过多时,就会导致CPU大量计算进而导致CPU过载,影响游戏运行效率。而在Unity中,最有效的优化DrawCall的方法就是批处理,Unity中的批处理分为动态批处理和静态批处理。同时,两种批处理的效率和适用范围也不一样。可以通过Unity的Stats面板信息,观察实际批处理对DrawCall数量的影响。对于动态批处理来说,优点是一切处理Unity自动完成的,不需要做任何操作,而且物体可以移动,缺点是限制很多。而对于静态批处理来说,它的优点是自由度很高,限制很少;但缺点是可能会占用更多的内存,而经过静态批处理后的所有物体都不可以再移动。In the process of traditional game development, the optimization of graphics rendering has always been a problem. The most commonly used optimization method in unity is to reduce the number of drawcalls, which is the process of CPU preparing data and informing GPU to draw graphics. When the number of drawcalls is too large, it will lead to a large number of CPU calculations,which will lead to CPU overload and affect the efficiency of the game. In unity, the most effective way to optimize drawcall is batch processing, which is divided into dynamic batching and static batching. At the same time, the efficiency and scope of application of the two batching are different. One can use the stats panel information of unity to observe the impact of the actual batching on the number of drawcalls. For dynamic batching, the advantage is that all processing is done automatically without any operation, and the object can be moved. The disadvantage is that there are many limitations. For static batching, it has the advantages of high degree of freedom and few restrictions, but it may occupy more memory, and after static batch processing, all objects can no longer be moved.

关 键 词:UNITY3D 动态批处理 静态批处理 DrawCall 

分 类 号:TP317[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象