Help: My entire program is generated at run time, how can I show a client?

Hello,
I work on a simulator that creates every object at run time based on data sent from a website. This ranges from primitives to complex 3D models and CAD data. Here’s what I need:

  1. A client that can login and just simply has a controllable camera in the scene.
  2. Can see all the run time generated objects that were created by the host.
  3. There is no possible way to prefab the thousands (or more) of possible objects

Clients logging in will need to be stuck in place with a controllable camera so they can look around the area they are in. How can I get them to see what the host sees without using the prefab spawning system?

Thank you in advance for your time!

if you cannot transfer mesh data to client, then i guess that leaves only video streaming…

similar to GitHub - Unity-Technologies/UnityRenderStreaming: Streaming server for Unity
assetstore has webrtc plugin that can do that also.

Thanks. I’ll look into that now. Would I create a client controlled camera in the scene that streams data back to the client and fakes the feeling that you are in the scene? Would this work in VR?

One thing I am trying, is I generate the scene local for each client before the host client begins input. Then I spawn ghost objects that place themselves as parents of object in that scene. That way I can perform transformational actions. This would work great, except I have an object on a rope (Imagine a crane with a load) and unfortunately the rope adheres to chaos theory and has a different reaction on collisions for each client. If there was a way to enforce the same reactions across clients then I’d done. :stuck_out_tongue:

yeah, i’d test that “remote camera”… to see if its fast enough for vr.

The best way to approach this (imo) is to make the world/object generator deterministic. Instead of showing what someone else generated, re-generate the same thing on another machine. You just exchange the seed value and data and everything else falls in place.

It’s a bit tricky to get right but once you did, you no longer need to transfer anything but a simple initial value.
You only need to worry / sync changes to this world, if that’s allowed.

We got a very very simple demo of that in our PUN 2 package. It generates a “world” on all clients, based on a shared seed. It’s available for free and without obligation, so feel free to have a look as inspiration.

2 Likes

primitives/simple meshes would be easy to generate from parameters,
but he mentioned (imported) 3d and cad models, and apparently doesn’t want to transfer that mesh data to client…

if photon had “remote streaming” that could be nice & easy : )