I'm working on an animation tool for Autodesk Forge. The animation uses fragProxy getAnimTransform() -> updateAnimTransform() workflow to change object position and sceneUpdated(true) to invalidate the viewer and force visual update.
However,
Is there any option to tell what elements need to be cleared and rendered, to reduce animation render flick? What's the best option for an animiation that should operate multiple times per second?
António
Unfortunately, according to our engineering team, Forge Viewer doesn't support partial re-rendering. But if your model is simple enough and isn't too big, you may try to disable the progressive rendering to avoid flickering.
Turning off progressive rendering by code:
// Method 1
viewer.prefs.set(Autodesk.Viewing.Private.Prefs.PROGRESSIVE_RENDERING, false);
// Method 2
const profileSettings = Autodesk.Viewing.ProfileSettings.clone(Autodesk.Viewing.ProfileSettings.AEC);
const profile = new Autodesk.Viewing.Profile(profileSettings);
// -- Turn off progressive rendering
profile.settings.progressiveRendering = false;
viewer.setProfile(profile);