autodesk-forgeautodesk-viewerautodesk

Why does my Autodesk Viewer 3D model appear different when viewed locally?


I downloaded a 3D SVF model for offline viewing using the following tool: Forge CLI Utils. See the resulting folder structure.

However, when I load the 3D model locally, it looks different when loaded from the cloud using an URN. See the following picture, where the left building is from the cloud using an URN and the right building is the 3D model loaded locally.

3D model offline code:

var path = "MIN/0.svf";
var options = { env: 'Local' };

Autodesk.Viewing.Initializer(options, function() {
  viewer.start(path);
});

3D model online code:

var urn = <MY_URN>;
var options = {
  env: 'AutodeskProduction',
  api: 'derivativeV2',
  getAccessToken: getForgeToken,
};

Autodesk.Viewing.Initializer(options, function() {
  viewer.start();
  var documentId = 'urn:' + urn;
  Autodesk.Viewing.Document.load(documentId, onDocumentLoadSuccess, onDocumentLoadFailure);
});

My question is: Why don't they look the same?

I attempted to address this issue by myself but encountered no leads during my research. Your assistance is greatly appreciated. Thank you in advance!


Solution

  • Due to a lack of document data, the viewer cannot know if this model is an AEC design, so that case viewer doesn't apply the special light settings for AEC to the model. We can manually turn this one by passing isAEC: true, which is the same as viewer.loadModel( path, { isAEC: true } );.

    var path = "MIN/0.svf";
    var options = { env: 'Local' };
    
    Autodesk.Viewing.Initializer(options, function() {
      viewer.start(path, { isAEC: true });
    });