25-10-2021, 09:47 AM
Good day.
I have a high poly Obi cloth proxy that is a dense wire mesh (at about 12000 vertices) with a source cloth that is a very simple plane (at around 110 vertices).
The goal of this is to manipulate the source cloth using Obi particle attachment to place the wire mesh over a section of a wall. There's a good deal of cloth interaction with Obi colliders as well.
What I want to do is run the cloth simulation on a single central PC (called it the primary node) and have the obi cloth proxy behave exactly the same way on three other PCs (called them the secondary nodes). These secondary nodes are used for rendering different views(left, front and right); so it's very important that the cloth's positions and behavior is consistent between the secondary nodes (for an extreme example some vertices might have sunk through the wall on the left view rendering secondary node, but are fine on the front view render secondary node).
My first plan was to try use a byte[] to sync the vertex positions of the high poly mesh on the primary node to the instances of the high poly mesh on the secondary nodes. Directly applying the Vector3[] of the mesh vertices from one mesh to another was easy for Unity. Unfortunately it is very costly to convert that same Vector3[] into a byte[] to transfer over a network, and then converting back into the Vector3[] to apply to the high poly mesh on the secondary nodes.
So I was hoping there was a way to apply changes in vertex positions on the source cloth; unfortunately this doesn't seem possible while it's being used as part of the obi cloth system. This might work by removing all the Obi cloth system from the secondary nodes, but then the proxy would no longer work (because it needs the obi solver to function).
TLDR: I want to serialize a cloth from one PC to another so that I know for a certainty that it's visually the same.
Is there a simpler solution that I've missed perhaps?
Any ideas or help would be greatly appreciated!
I have a high poly Obi cloth proxy that is a dense wire mesh (at about 12000 vertices) with a source cloth that is a very simple plane (at around 110 vertices).
The goal of this is to manipulate the source cloth using Obi particle attachment to place the wire mesh over a section of a wall. There's a good deal of cloth interaction with Obi colliders as well.
What I want to do is run the cloth simulation on a single central PC (called it the primary node) and have the obi cloth proxy behave exactly the same way on three other PCs (called them the secondary nodes). These secondary nodes are used for rendering different views(left, front and right); so it's very important that the cloth's positions and behavior is consistent between the secondary nodes (for an extreme example some vertices might have sunk through the wall on the left view rendering secondary node, but are fine on the front view render secondary node).
My first plan was to try use a byte[] to sync the vertex positions of the high poly mesh on the primary node to the instances of the high poly mesh on the secondary nodes. Directly applying the Vector3[] of the mesh vertices from one mesh to another was easy for Unity. Unfortunately it is very costly to convert that same Vector3[] into a byte[] to transfer over a network, and then converting back into the Vector3[] to apply to the high poly mesh on the secondary nodes.
So I was hoping there was a way to apply changes in vertex positions on the source cloth; unfortunately this doesn't seem possible while it's being used as part of the obi cloth system. This might work by removing all the Obi cloth system from the secondary nodes, but then the proxy would no longer work (because it needs the obi solver to function).
TLDR: I want to serialize a cloth from one PC to another so that I know for a certainty that it's visually the same.
Is there a simpler solution that I've missed perhaps?
Any ideas or help would be greatly appreciated!