Send a mesh via network

Options
I'm trying to send a mesh data(Mesh filter component) via Photon Unity Networking continuously. Also, it needs to be in sync like transform component. I tried using UNET, but I was not able to send the data(vertices,uvs,triangles approx 640kb) even after splitting the data in small chunks(because of channel buffer limit).

When I try sending the data using PUN, Unity Editor crashes.

Is there any way I can solve this problem?
It will be really helpful. Thank you in advance.

Comments

  • jeanfabre
    Options
    Hi,

    This is a very bad idea :) Can you explain what you are trying to achieve?

    Synching variables should be kept to the strict minimum, so maybe instead of sending the mesh, synchronize the variables necessary for the mesh modification and reproduce the mesh on all client based on them variables.

    example: a cylinder as a radius, a height and a resolution, don't synch the resulting mesh, instead, synch the radius, height and resolution.

    If you are using megaFiers and similar mesh runtime editor, also consider simply synchronizing the necessary modifiers values and inject them back on slaved instance to reproduce the mesh deformation.

    Bye,

    Jean
  • msundarv
    msundarv
    edited July 2016
    Options
    Hi Jean,

    Thanks for the suggestion.

    I have filtered the data required to reproduce the mesh as you mentioned. It is now 280kb not 640kb.
    Is it possible now to sync data of size 280kb over a network in unity using PUN/Bolt?

    Note:Data is from Kinect sensor
  • jeanfabre
    Options
    Hi,

    I would still be very concerned with 280Kb,

    I understand the struggle now, because it comes from kinect it modify the mesh accordingly, and you can't insert yourself with code between kinect and the mesh. Am I correct?

    if Data comes from a Kinect Sense, then it should be only a dozen of transform position and rotation at best. I would really push in this direction to avoid synching 280Kb of mesh ( which if you do that several times per seconds is really a lot).

    I would also try the following, can you follow each bones individually with a GameObject? if you can, then I would write a script that knows about the bones structure and simply read the transforms and synch that over the network, on the other side, you control the bones with this data.

    I am right to assume your mesh is controlled via bones, correct?

    Bye,

    Jean