I am trying to embed two ShapeDiver viewports into a webpage. My goal is to have two concurrent sessions with the same ShapeDiver model, however, when I use the same ticket for both sessions I end up getting computation issues (presumably due to some kind of leakage between the sessions due to using the same ticket).
Can someone point me to the correct way of initiating multiple sessions with the same model in separate viewports?
I see in the viewer example and this other example from the forum that they use separate tickets per session, but I cannot find if it’s possible to create multiple tickets with the same model, so that seems to imply that they are different models.
Thanks for the help!
Actually, the issue was (as could be expected) not with ShapeDiver but with me. It’s perfectly possible to use a single ticket to create multiple concurrent sessions.
The issues I was seeing were just my own bugs. After a recompute, I was re-running the logic that maps ShapeDiver outputs to objects in my scene. The problem is that ShapeDiver fires its update callback twice per recompute (once mid-rebuild and once when finished) and my mapping logic would pick a different output on the second call because the scene was in a different state than when it started. This caused materials to be applied to the wrong object.
So to answer my own question: multiple sessions with a single ticket is no problem on ShapeDiver’s end.