Autodesk Viewer Performance - autodesk-forge

I have problem with large model on Forge Viewer. Although i had translate it to SVF2 but it take so long to load and with any action it rerender all time (i known it a part of process). Are there any solutions like Proxy in 3Dsmax or when camera far from model it show low LOD and when scroll in it show higher LOD? What can i do to speed up model? Appreciate any solutions.
UPDATE:

Would you be able to confirm that you are really using SVF2 in the viewer? For example, do you see the viewer communicating via WebSockets in the Network tab?
So far we've seen major performance improvements across all projects switching over to this new file format, but it's possible that your model is so large/complex that even SVF2 isn't helping. In that case I'm afraid we won't have other solutions, other than perhaps splitting your design into multiple models, and loading only those that you really need. For example, Navisworks designs are often split by area and/or discipline, and the models are then loaded selectively by specific users. Check out this demo (specifically the checkbox matrix in the sidebar): https://forge-industrial-construction.autodesk.io/facility/montreal.

Related

Autodesk Forge Viewer loading heavy models VS BIM360 Viewer

We have a large .nwd model (1.6GB) that we are uploading directly to forge. I have hidden some elements in the viewer so only some of the elements are translated in the view to make it lighter. I am still having issues with SVF and SVF2 times to fully load the models on Forge. However I did a test on uploading to our hub on BIM360 and noticed it was significantly faster to upload and also the viewer renders the model a lot faster.
My question: Is it better to directly upload to the OSS on Forge or are there benefits in terms of load and rendering times to take the files directly from BIM360 via the Plugin integration workflow? Note: I am only considering upload and rendering times in this question and not other factors that could be beneficial to the end user.
BIM360 is built on top of Forge and it uses the exact same stack to store, translate, and preview your designs, so there should be almost no difference in loading and performance.
If you do see a significant difference in rendering performance, try the following:
open the model in your custom Forge Viewer app, and run the following command in the browser console:
NOP_VIEWER.model.isSVF2()
This should tell you whether your model really uses the SVF2 format.
open the model in another sample app, for example, https://github.com/petrbroz/forge-simple-viewer-nodejs (there's a branch called test/svf2 that is configured to load your models in SVF2), and see if the performance is the same
This should rule out any potential issues in your app's own code that could be affecting the performance.

Needed Download Speed

First of all, sorry for my English.
I need some kind of assistance with Forge. I need to display the download speed of the BIM model on the Unity.UI, be it the .RVT or whatever is downloaded from BIM360. Is it possible to know where it is downloading exactly to be able to put a count of downloaded bytes there?.
Another question. Currently the download time from Autodesk servers is approximately 110 seconds.
We understand that the download is by meshes packages. Is there a way to speed up this download? Our client needs this download to be faster.
The size (in Mb) depends of the model, so it hard to tell you how large a RVT image could be. It also depends on the asset quality, and what you actually requesting to view. So I am afraid I cannot really answer that question. However, if you are interested to create a progress bar in your UI, you can ask the number of triangles, material definitions, and textures from the model manifest, and calculate the % download from there, depending which technology you are using to access the data. There is an example in the AR|VR toolkit doing this, but again it depends of the technology you are using.
Assuming you are using the AR|VR Toolkit, mesh request are done in parallel, so the speed to download and instantiate meshes depends of your internet bandwidth, and speed of you device to run Unity. In the toolkit, you may accelerate the download, but accept to lose control of the UI during that period. It is a compromise to make due to the Unity limitation running singe threaded.
The toolkit can also convert models to glTF, and you could using the gltfast Unity plugin to get better performances, but lose metadata associated to objects. Another compromise due to the nature of glTF at this time.

Render refresh for large models in Forge viewer

I am experiencing slower render refreshing for a model in forge viewer, than for the same file in the BIM360 viewer. I am wondering whether it is possible to obtain the same performance in the forge viewer, and if so, how?
I have been looking through old posts on the subjected, where various settings are suggested.
The function viewer.impl.setFPSTargets, as suggested in an old post from 2018, was tested, but even though less objects visibly refreshed, it was on the expense of the graphical performance during view rotations. The viewer.impl.toggleVizBuffer, suggested in the same post seems to have been removed.
Are there any other options or settings I can test to improve my performance?
The object flickering experienced in the forge viewer can be seen here:
Forge viewer render refreshing
Whereas in the BIM360 viewer, the performance is much smoother:
BIM360 render refreshing
The difference in performance might be related to the new, significantly improved viewing format that Forge introduced not too long ago: https://forge.autodesk.com/blog/svf2-public-beta-new-optimized-viewer-format. BIM 360 has been using it for some time now.
If you'd like to give it a shot yourself, take a look at https://forge.autodesk.com/en/docs/model-derivative/v2/developers_guide/notes/.

Autodesk Viewer problem and missing elements from translation to SVF

I've been trying to encourage some of our less Revit-savvy building services engineers to utilise the Autodesk Viewer product. Unfortunately though, I have encountered a couple of problems, one of which I think I have solved and one which I am guessing is more to do with the Autodesk Viewer Applications programmed interaction with the model derivative API.
Initially I uploaded our services model with supporting architectural and structural models but the phase the solitary 3D view created in the viewer was "Existing" with a filter of "Show All". I managed to get around this by creating a 3D view in each model just called "3D" and setting the phase and filter as I like. Happy days.
Could this also have been better solved by setting generateMasterViews to true during the POST job on a custom Forge viewer app?
However, I am only getting some elements from the services model come through into the Autodesk Viewer application. Most notably it's missing ducts, sanitary pipework, cable trays, radiators. In the "3D" 3D view I have created everything is phased correctly, no issues from worksets, visibility graphics, view discipline is coordination (doesnt work to change to mechanical) and everything looks hunky dory in Revit. In the viewer though it's a different story. Even if I upload the services model on it's own. Strangely, in the 2d sheet views all the equipment and infrastructure is there fine, just in 3D it is now.
So my knowledge of Javascript and the Forge API is quite rudimental but I'm guessing the problem is with Autodesk Viewer's implementation of the model derivative API for when the model is translated to svf.
Does this sound correct?
Could it a bug within Autodesk's viewer app? I'm not too sure what the best Autodesk forum to post in would be.
Could it be a bug within the model derivative API? Or is it a setting that is beyond my knowledge?
I guessing I'm at a place where what I'm really after is a custom Forge viewer application to design in the functionality I am after, in this case control of phasing in the .svf file output and ensuring everything is coming through in the view.
Not the most interesting post by any stretch and if you're still reading now, thanks. But I'm sure I can't be the only one experiencing this problem. While I'd love to share a model to demonstrate whats happening, it's commercially sensitive unfortunately.
If anyone can shed a more technical light on
Cheers,Pete
Hi please make sure those elements are visible in 3D views and those 3D views are chosen in the publish settings of the Revit UI. Otherwise, the Model Derivative API will translate the default 3D view called {3D} only that might not contents proper element visibility configurations.
If this issue still persists after setting this up, please consider providing a none confidential model to forge[DOT]help[AT]autodesk[DOT]com for investigations. Thanks!

Poor rendering time when plotting large shape files on Google Maps

First, I'd like to let it be known that this is my first journey into developing mapping applications with such a large set of data. So, I am in way locked into the techniques or technologies listed below...
The Overview
What I am trying to accomplish is the ability to load my company's market information for the United States onto some form of web-based mapping software. Currently I am trying to accomplish this with Google Maps JS api and GeoJSON data, but am not against other alternatives. There are roughly 163 files (ranging from 6MB to 200KB) that I have exported from ArcGIS into GeoJSON files, and then loaded into a database (currently as GeoJSON strings). We have developed a UI that loads the data based on the current map bounds and Max/Min calculations in the corresponding records.
The problem I'm running into is the render time on the map itself, which is annoying when switching between different regions, states, or zoom levels. The API calls to load the data are acceptable in regards to the size of the data being retrieved. My boss said it is great for a proof of concept, but would like to see it much, much faster.
The Questions
What suggestions could you offer to increase the render time?
Are there better options (3rd party libs, techniques, etc) for what I'm trying to accomplish?
It was suggested by a co-worker to export the map shapes and just use the images for overlaying the information based on the coords. Any input on this?
One solution to your problem could be reducing number of vertices in polygon or polyline layers (files) while preserving feature's shape. In that way geoJSON file would be smaller and easier to render.
You can use tools available in ArcGIS for Desktop.
See
How to Simplify Line or Polygon
or
Simplify Polygon
I'm sure there are similar tools in QGIS or any other open source GIS software.
There are other solutions to your problem like prerendering data in map tiles that could be overlayed over Google Maps basemap(s). That is probably the fastest solution but more complicated.
Maybe this could be good starting point.
Just couple of random thoughts.
On one project I worked on I noticed terrible performance with geoJson I loaded via REST service.
I found out that browser's JavaScript engine had hard time parsing large geoJson responses. I finally decided to load data in batches (multiple requests). Performance increased enormously.
I noticed you use 163 files (layers?). Do you display them at the same time (no no no) or you have some control panel to switch layers on/off? If you display them at the same time then performance will suffer for sure and you should look into generating map tiles with thematically grouped layers. In that way you'd come up with couple of tile layers that you can switch on and off.
Also, if data used to generate tiles changes frequently than tiles aren't good idea. Then maybe you should look into Web Map Services. WMS generates maps on the fly from data stored in database. GeoServer supports WMS and it's easy to configure and use.