ADR-0022 Asset Triangle Count

Publication Date2021-09-21
Last Update2021-09-21
StatusAccepted

Context

The vertex / triangle count of objects placed in a Unity scene affects immediately the performance of the application. The most important statistics that are affected are CPU usage and FPS while an application is running.

Obi cloth is calculating physics parameters for every Obi particle. The number of particles in an Obi blueprint is equal to the number of vertices of the 3D asset that is simulated. Hence, it is important to set a limit on the number of triangles that can be present in a scene at a time to ensure performance is not compromised.

We should consider that our applications will be running on mobile devices, too, which (usually) translates to lower processing capabilities.

Several tests have been conducted to evaluate how many triangles can be present in a Unity scene without affecting performance. The tests involved several iterations of running the same Obi simulation with a varying triangle count of the mesh.

Decision

We should aim to have an maximum triangle count of ~10,000 for all garments in a scene. That is, in case that multiple garments are simulated, the sum of their triangles shouldn’t exceed ~10K triangles.

Consequences

Ensure that the FBX files that are created for all garments (or other assets that need to be simulated) have a reasonable triangle count. This ADR is particularly important for Use-Case 3, but could apply to Use-Case 1 if Obi is used for simulation.