13 Dec 2016

Forge Viewer Consolidated Geometry

Default blog image

There is an endpoint to know which versions of the viewer are available. Checkout the https://developer.api.autodesk.com/viewingservice/v1/viewers endpoint.

it would return a list like the one below – Model Consolidation, which brings performance enhancements is coming with v2.12+

[
  "2.12.60",
  "2.12",
  "2.11.58",
  "2.11.57",
  "2.11.55",
  "2.11",
  "2.10.58",
  ...
]

Performance Enhancement: Model Consolidation

Model Consolidation optimizes a model for faster rendering by using mesh consolidation and hardware instancing.

An optional value can be specified to control the amount of GPU memory spent for mesh merging. Default value is 100MB.

Consolidation requires the full model to be in memory first. I.e., progressive rendering will have the unoptimized speed until loading is finished and the consolidation step is run.

The optimization step is most effective for models where the large shape count is the main bottleneck. E.g. models like the NWD model can be rendered several times faster

Example:

var initializerOptions = {

   env: 'AutodeskProduction',

   useConsolidation: true,

   consolidationMemoryLimit: 150 * 1024 * 1024 // 150MB - Optional, defaults to 100MB

}

Autodesk.Viewing.Initializer( initializerOptions, function() {

  // ...

});

Some Limitations

# It requires significant extra memory (CPU-side and GPU-side).

# Consolidation will be turned off automatically when playing animations or exploding the model.

# Consolidation reduces the granularity of the scene, which conflicts with existing techniques like progressive rendering, fine-grained frustum culling, and sorting (e.g., for transparency).

Related Article