Select to view content in your preferred language

Scene memory exceeded with gltf symbols

1154
8
Jump to solution
03-23-2023 05:51 AM
ChristopheSuter
New Contributor III

Hi all,

I found that since version 4.25 of the Javascript SDK the memory consumption with large glTF symbols had a hard impact on scene performances. Below are 2 codepens samples:

4.24: https://codepen.io/christophesuter/pen/Jjaeamo

4.26: https://codepen.io/christophesuter/pen/VwGVGVj

Wait a few seconds for object and open console to see memory exceeded warnings

Has anyone any solution for this ?

0 Kudos
1 Solution

Accepted Solutions
VeronikaLanders
Esri Contributor

Hi Christophe,

yes, we are now including glTFs when montoring memory consumption.

If you are curious about memory usage you may find it interesting to take a look at this experimental (!) class SceneViewPerformanceInfo.

As you already mention your glTF is large and therefore, a stretch when it comes to loading it in a browser, just like this. We would recommend to use a scene layer with level of detail. Would this be an option in your case?

If not, could you explain the use case you are trying to solve? We would like to make sure that we have it covered in our backlog and add your input for prioritization.

Best,
Veronika

View solution in original post

0 Kudos
8 Replies
VeronikaLanders
Esri Contributor

Hi Christophe,

yes, we are now including glTFs when montoring memory consumption.

If you are curious about memory usage you may find it interesting to take a look at this experimental (!) class SceneViewPerformanceInfo.

As you already mention your glTF is large and therefore, a stretch when it comes to loading it in a browser, just like this. We would recommend to use a scene layer with level of detail. Would this be an option in your case?

If not, could you explain the use case you are trying to solve? We would like to make sure that we have it covered in our backlog and add your input for prioritization.

Best,
Veronika

0 Kudos
ChristopheSuter
New Contributor III

Hi Veronika,

We need to add one to 5 of those glTF's on the scene for a preview App without publishing a service. SceneLayers cannot load any local source right ? Is there any other way you would suggest to do this ? The performances were satisfying using 4.24 ..
Best,

Christophe

0 Kudos
VeronikaLanders
Esri Contributor

Hi Christophe,

this is the only way to preview models at the moment. Do you see any degradation with 4.26?
This would be unexpected as the new version should be equivalent to 4.24 (with improved memory management and messaging).

Uploading models to scene layers is currently work in progress on our roadmap. This could be an option in future.

Best,
Veronika

0 Kudos
ChristopheSuter
New Contributor III

Hi Veronika,

Question .. could you tell me what king of format will be avaiable to upload models in the future ? It would be good to know for our project.

Best,

Christophe

0 Kudos
ArnoFiva
Esri Contributor

 

Uploading 3D models is a capability currently being developed and planned to release this year, therefore all information is subject to change.

The upload will be based on the ArcGIS CityEngine runtime (PRT), so whatever formats are supported by PRT, should also work for in the web. Here is a list of the supported file formats:
https://esri.github.io/cityengine-sdk/html/esri_prt_codecs.html

As mentioned in previous posts, the glTF being used is rather large for client-side consumption. Would be great if you could share more information with us about the use case and the source of the model.

 

0 Kudos
ChristopheSuter
New Contributor III

Hello Arno,

Actually we are consuming glTF's that are produced by an external BIM management system that is based on IFC, using IFC4js and Three. We managed to get some smaller files that are converted into mesh geometries client-side in a scene view. But as I understand this method could be updated in the near future adding a backend processing of those files.

Thanks for your reply!

Best,

Christophe

ArnoFiva
Esri Contributor

Hi Christophe

Thanks for your response and elaborating on the use case. One more thing that came to mind, visualizing a glTF model in the client. You could increase the rendering quality using view.qualityProfile = "high". Besides using high resolution renderings, the scene view also allocates more memory.

https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#qualityProfi...

I tested this in your above CodePen and still see the memory limit exceeded message, however it continues to show the glTF and integrated mesh as expected.

Thanks,
Arno

0 Kudos
ChristopheSuter
New Contributor III

Yes, but if you add more data to the scene, you will have that problem again. I guessed this is that glTF's used as symbols are now included in that sceneViewPerformance "pool", but their resolution is not managed as the other members of that "pool" (i.e. scene layers) so the memory load of that symbol stays at the same level while other layers reduce their resolution, therefore the scene "flickering" effect. If I convert that glTF to a mesh geometry instead of using it as symbol of a point, it works better.

Best,

Christophe