AlexMerzlikin / Unity-SandBallsMechanic-MeshDeformationPerformanceTest

The repository contains implementation of Sand Balls mechanic using different approaches to deform a mesh in order to compare their performance

Home Page:https://gamedev.center/sand-balls-mechanic-implementation-how-to-deform-a-mesh-the-most-performant-way-part-1/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sand Balls Mechanic: Mesh Deformation Performance Test

DeformationSample

The repository contains implementation of Sand Balls mechanic using different approaches to deform a mesh. The goal is to play around with MeshData API and compute shader with AsyncGPUReadback. And then compare its performance to other approaches.

The following samples were implemented:

Each sample can be found inside the Scenes folder

Perforormance Test Results

Performance Test Run Example

PerformanceTestExample

Results

Run on OnePlus 9 (Snapdragon 888, VSync on (forced), 120Hz refresh rate)

Method Median Dev StdDev
DeformableMeshPlane_ComputeShader_PerformanceTest 8,27 ms 0,43 ms 3,53 ms
DeformableMeshPlane_Naive_PerformanceTest 8,27 ms 0,39 ms 3,25 ms
DeformableMeshPlane_NaiveJob_PerformanceTest 8,27 ms 0,19 ms 1,58 ms
DeformableMeshPlane_MeshData_PerformanceTest 8,27 ms 0,19 ms 1,58 ms

Run on Intel Core i7-8750H CPU 2.20GHz (Coffee Lake), 1 CPU, 12 logical and 6 physical cores NVIDIA GeForce GTX 1070

Method Median Dev StdDev
DeformableMeshPlane_ComputeShader_PerformanceTest 1,37 ms 3,91 ms 5,66 ms
DeformableMeshPlane_Naive_PerformanceTest 15,37 ms 0,11 ms 1,65 ms
DeformableMeshPlane_NaiveJob_PerformanceTest 6,76 ms 0,88 ms 5,97 ms
DeformableMeshPlane_MeshData_PerformanceTest 6,72 ms 0,83 ms 5,60 ms

More details and the conclusion in blog posts:

  • Part I: covers single-threaded, job system, and compute shader implementations, as well as performance tests.
  • Part II: covers MeshData and optimization techniques for such game mechanic and more.

About

The repository contains implementation of Sand Balls mechanic using different approaches to deform a mesh in order to compare their performance

https://gamedev.center/sand-balls-mechanic-implementation-how-to-deform-a-mesh-the-most-performant-way-part-1/

License:MIT License


Languages

Language:C# 100.0%