0

I use the Forge Viewer and I've got a large model, so whenever I move around it refreshes the view with very annoying flashes.

I've tried to manually set the ProgressiveDisplay to false and it seems a good option, but if I set it false using the code in the Autodesk.Viewing.Initializer(), it requires too much time until the model is completely rendered and navigable in the window. This is not an option for this kind of model. I've used the GEOMETRY_LOADED_EVENT, trying to trigger the right moment for setting that property, but when the event is triggered the model is still not complete causing again too much waiting time.

I was wondering if there's a way to keep the ProgressiveDisplay to true until the model/geometry is completely loaded and rendered in the viewer, and after that set it to false just to hanging around the model. Is there an event that can help me to manage large models in the viewer in a better way?

I'm quite new to Forge and I'm still learning, so I'm looking for your suggestions. Thanks!

duffra
  • 45
  • 5

1 Answers1

0

There are three approaches to reducing the 'mesh flickering' issues you are seeing...

  1. Change the devicePixelRatio (fill pixel bound)
  2. Change the FPS counter (vertex bound)
  3. Turn on the experimental 'visibility Cache' option (render bound)

1. Use devicePixelRatio

To change the devicePixelRatio, experiment with these values... 1.5, 1.0, 0.75 ...

window.devicePixelRatio = 0.75

2. Use setFPSTargets

  1. Lower the FPS heuristic, to a lower 16FPS, average 24FPS and max 30FPS, using...

viewer.impl.setFPSTargets(16,24,30);

3. Activate visibility culling

viewer.impl.toggleVizBuffer(true)

This activates an experimental feature, that uses the previous frame(s) to figure out what is visible and what isn't. It then renders biggest things to smallest, based on pixel contribution. It works well for some things, and not so well for others.

Here is a GIF animation showing the 'before and after' of vizBuffer with a large building...

VizBufferbeforeAndAfter

michael beale
  • 1,014
  • 1
  • 6
  • 5
  • Can you try Autodesk.Viewing.TEXTURES_LOADED_EVENT instead of GEOMETRY_LOADED_EVENT ? Example: https://github.com/wallabyway/forge-pdf-report/blob/3c8ba04d45cb3f6a44dc2024905ed148cf388dbb/docs/index.html#L44 – michael beale Oct 11 '18 at 09:12
  • It works! The model is completely loaded and textured when it's triggered. All yours suggestions are very useful, thanks! – duffra Oct 12 '18 at 14:45