Obi Official Forum
Help Dynamic Batching with Chain - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Rope (https://obi.virtualmethodstudio.com/forum/forum-4.html)
+--- Thread: Help Dynamic Batching with Chain (/thread-2709.html)



Dynamic Batching with Chain - chrisemc - 19-01-2021

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).


RE: Dynamic Batching with Chain - josemendez - 20-01-2021

(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