Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Dynamic Batching with Chain
#1
Hiya,
We are trying to use Obi Rope with a Quest 2.
Right now we are using the chain renderer and wanted to know if its possible to use dynamic batches with the chain links.

We have a length of chain attached to an anchor with links being added as it sinks.
Problem being that each link gets treated as one batch and we quickly run into performance issues, even though from my understanding the chain links meet the requirements to be batched together (same model, material, and under the required vertex limit).
Reply
#2
(19-01-2021, 05:03 PM)chrisemc Wrote: Hiya,
We are trying to use Obi Rope with a Quest 2.
Right now we are using the chain renderer and wanted to know if its possible to use dynamic batches with the chain links.

We have a length of chain attached to an anchor with links being added as it sinks.
Problem being that each link gets treated as one batch and we quickly run into performance issues, even though from my understanding the chain links meet the requirements to be batched together (same model, material, and under the required vertex limit).

Hi there!

The chain renderer simply instantiates the prefabs you provide, and moves them around. No material instancing, mesh/texture modifications or any other thing that might prevent batching takes place. Testing the sample "chain" prefab included with Obi shows that dynamic batching is indeed taking place:

Dynamic batching disabled (117 batches):
[Image: NQYXQWn.png]

Dynamic batching enabled (7 batches, less than chain links are present):
[Image: phrKeeT.png]

Make sure your mesh really is meeting all batching requirements. There's some more obscure ones (the more per-vertex attributes you use, the smaller the vertex count limit, negative axis scaling disables batching, etc) that might be preventing batching in your case: https://docs.unity3d.com/Manual/DrawCallBatching.html
Reply