- Home /
Send/Receive a mesh over network
I tried searching on google and unity answer but couldn't find solution to my question, so creating new question.
I want to send a mesh from one machine to another over a network. The receiving side needs to be able to show that mesh in Unity. There is no such requirement on whether sending side is unity or not(any would be fine). So, is there a way that I can receive meshes over network and show them in unity?
Note: what I'm actually trying to do is creating meshes in real time using a algorithm called DynamicFusion which creates deformable real time geometry using kinect. So, I just want to get meshes from that sequentially, send them over network to another machine running Unity and render it in unity.
Take a look at this:
https://github.com/$$anonymous$$arek$$anonymous$$owalski/LiveScan3D-Hololens
Hi All! were you able to send and update meshes in realtime? what kind of protocol did you use?Thanks!!!
A transfer protocol you would use for this is irrelevant, you can use any protocol you want.
I created a plugin for setting up TCP connections in a LAN network (untested outside LAN but connecting to the public ip should work), which you can use to send simple data through serialized classes and objects, and convert the data back to its object.
It works in a standard C# application setting, but it can also be integrated into Unity, but it's quite buggy. Here's the link to the project (includes examples, plugins and source). Networking
Answer by BastianUrbach · Apr 14, 2018 at 10:01 PM
Yes, the Mesh class allows you to get and set all relevant information (at least mesh.vertices and mesh.triangles but you'll probably also want mesh.uv and mesh.normals) which are easy to serialize as they are basically just arrays of numbers or vectors. You can send those, create a new Mesh on the client side and set all the received information. So basically, instead of sending a mesh in one piece, just send all pieces of data that make a mesh and assemble them on the client.
Answer by Dicknsty69 · Jul 28, 2021 at 10:15 AM
These nodes connect to multiple other nodes and communicate with each other to transfer data. Every device has at least two ways in which it can send and receive informations. Because of that, the whole network doesn’t rely on one node only.
Answer by chiarapalu · Jul 28, 2021 at 03:45 PM
Hi All, I'm doing something similar but when I received new vertices the triangulation of the mesh is completely wrong. Since the first frame is received, it seems that a new triangulation is computed and this new triangulation is kept for all the updated vertices. Do you have an idea on how I can fix this?Thanks!