项目作者: AlexSerodio

项目描述 :
Unity project that tests the performance of two different surface components.
高级语言: C#
项目地址: git://github.com/AlexSerodio/dynamic-surfaces.git
创建时间: 2017-10-06T18:23:53Z
项目社区:https://github.com/AlexSerodio/dynamic-surfaces

开源协议:GNU General Public License v2.0

下载


Dynamic Surfaces - Performance Test

An Unity project made to compare the performance of two different surface components provided by Unity, the Terrain Component and the Mesh Component.

Getting Started

To run the project you must have Unity 3D installed. This project was developed with Unity 2017.3.0 so it might not work for older versions.

Understanding the project

The main goal here is test which surface component is better for dynamic modifications made at runtime. The surfaces used were the Terrain and Mesh components. Both have the same resolution, width, length, height and are submitted to the same functions. The only differences are how to access the surfaces height values (since Terrain uses a two-dimensional array to store the height values whereas Mesh uses a simple one-dimensional array) and how to update their colors (since Mesh Component can work with solid colors whereas Terrain seems to work only with alphamaps).

Results

Here are some images showing the results achieved until now (using both static and dynamic texture). The yellow numbers on top indicate the frame rate of the scene.

prints

The images can’t demonstrate the changes that occur in the frame rate during execution. So for more accurate results, you can download the project and run it to see the changes yourself.