Search code examples
autodesk-forgeautodesk-viewerautodesk

MultiViewerFactory causing thicker edges on the second (and third, etc.) viewer?


My intention is to save some resources when loading the same model in multiple viewers by following this guide. However, it seems that Autodesk.Viewing.MultiViewerFactory is causing the second viewer showing thicker edges on the model: Thinker edges on second viewer caused by MultiViewerFactory

Actually, the problem also appears in the guide mentioned above if you look closely at the screen shots in that post. (notice the difference between the two smaller viewers)

If I create two separate viewers without using Autodesk.Viewing.MultiViewerFactory, the problem disappears. But this way I can't save resources when loading two same models.

Besides, there is still another smaller problem in both ways of creating multiple viewers: the cube on the upper right corner in the second viewer loses the text and detail and becomes dark, which also can be spotted in the screenshot in the post mentioned above.

Any configs am I missing or any ways to fix this? Thanks in advance for your attention.


Solution

  • Thank you for reporting this issue with the MultiViewerFactory tool.

    We have created a request to address a change in the functionality and it has been added to the backlog of the Viewer Team.

    In the meantime, there are a few approaches you could take in order to optimize the performance and experience while using multiple instances:

    • Use selective loading, so only what's necessary gets rendered on each instance
    • Skip properties db in instances where you don't need them (refer here if you need selection or fit to view without properties db)
    • Use SVF2 to optimize geometry (just know that it won't optimize geometry across Viewer instances)