Is there a way to display a model from multiple camera angles in Autodesk Forge Viewer without loading the model multiple times? - autodesk-forge

We would like to use the Autodesk Forge Viewer to implement a screen in which you can see the loaded model(s) from multiple camera angles. For example, one view in which the model is displayed from a perspective and another view in which we display the model from the top in an orthographic camera.
Mockup with 2 viewer canvases and an example model
We already searched the documentation and examples of viewer applications that can be found in the web but did not encounter any hints yet how this could be implemented.
We also implemented a prototype solution by initializing two viewers with the same document URN. This let's us implement what we want but for large models the memory consumption is too high and the WebGL context is likely to crash.

Related

Autodesk Viewer Performance

I have problem with large model on Forge Viewer. Although i had translate it to SVF2 but it take so long to load and with any action it rerender all time (i known it a part of process). Are there any solutions like Proxy in 3Dsmax or when camera far from model it show low LOD and when scroll in it show higher LOD? What can i do to speed up model? Appreciate any solutions.
UPDATE:
Would you be able to confirm that you are really using SVF2 in the viewer? For example, do you see the viewer communicating via WebSockets in the Network tab?
So far we've seen major performance improvements across all projects switching over to this new file format, but it's possible that your model is so large/complex that even SVF2 isn't helping. In that case I'm afraid we won't have other solutions, other than perhaps splitting your design into multiple models, and loading only those that you really need. For example, Navisworks designs are often split by area and/or discipline, and the models are then loaded selectively by specific users. Check out this demo (specifically the checkbox matrix in the sidebar): https://forge-industrial-construction.autodesk.io/facility/montreal.

Autodesk Viewer problem and missing elements from translation to SVF

I've been trying to encourage some of our less Revit-savvy building services engineers to utilise the Autodesk Viewer product. Unfortunately though, I have encountered a couple of problems, one of which I think I have solved and one which I am guessing is more to do with the Autodesk Viewer Applications programmed interaction with the model derivative API.
Initially I uploaded our services model with supporting architectural and structural models but the phase the solitary 3D view created in the viewer was "Existing" with a filter of "Show All". I managed to get around this by creating a 3D view in each model just called "3D" and setting the phase and filter as I like. Happy days.
Could this also have been better solved by setting generateMasterViews to true during the POST job on a custom Forge viewer app?
However, I am only getting some elements from the services model come through into the Autodesk Viewer application. Most notably it's missing ducts, sanitary pipework, cable trays, radiators. In the "3D" 3D view I have created everything is phased correctly, no issues from worksets, visibility graphics, view discipline is coordination (doesnt work to change to mechanical) and everything looks hunky dory in Revit. In the viewer though it's a different story. Even if I upload the services model on it's own. Strangely, in the 2d sheet views all the equipment and infrastructure is there fine, just in 3D it is now.
So my knowledge of Javascript and the Forge API is quite rudimental but I'm guessing the problem is with Autodesk Viewer's implementation of the model derivative API for when the model is translated to svf.
Does this sound correct?
Could it a bug within Autodesk's viewer app? I'm not too sure what the best Autodesk forum to post in would be.
Could it be a bug within the model derivative API? Or is it a setting that is beyond my knowledge?
I guessing I'm at a place where what I'm really after is a custom Forge viewer application to design in the functionality I am after, in this case control of phasing in the .svf file output and ensuring everything is coming through in the view.
Not the most interesting post by any stretch and if you're still reading now, thanks. But I'm sure I can't be the only one experiencing this problem. While I'd love to share a model to demonstrate whats happening, it's commercially sensitive unfortunately.
If anyone can shed a more technical light on
Cheers,Pete
Hi please make sure those elements are visible in 3D views and those 3D views are chosen in the publish settings of the Revit UI. Otherwise, the Model Derivative API will translate the default 3D view called {3D} only that might not contents proper element visibility configurations.
If this issue still persists after setting this up, please consider providing a none confidential model to forge[DOT]help[AT]autodesk[DOT]com for investigations. Thanks!

2D Floor Plan not loading correctly in Viewer

I am using Autodesk Forge to display 3D model and floor plans of a building in a web application. I am using rac_advanced_sample_project.rvt sample model I found on Autodesk Knowledge network sample revit projects.
I was able to display both 3D and floor plans in my web application, but now I can't load the Floor plans (3D model is working fine). I am getting black, blue and white spots on loading floor plans.
And I am also attaching image for console error.
Can someone help me with this?
The problem was with viewer version(6.2). For 2D Floor plans, it was displaying that view. I changed the version of viewer to 6.3 and it worked fine.

Add forge viewer measurement tool for Point Cloud

I have added Point-Cloud to forge viewer. I have created extension for the same and it works good.
As an advancement, I want to add Forge Viewer's Measurement tool for Point Cloud to measure distance between two points like Potree.
But as I observed, we can use Forge Viewer's measurement tool to measure on model faces only, I don't know whether my observation is correct or not.
I want to measure the distance between points which are outside the model's face (refer this Image). In the image, the coloured portion is my Point Cloud flying between two faces of model.
I want to give option to user so that they can measure distance between the points from Point-Cloud.
Is there any option in forge viewer to do this??
OR
Do I need to use any shader to serve points as faces?
OR
Is there any limitation in forge viewer like measurement tool can be used with objects those are added by forge viewer itself??
Thanks.
Unfortunately, most of viewer features are made for Forge translated geometries loaded via ‘Viewer3D#loadModel’. Since the point cloud you mentioned is archived by THREE.PointCloud, it’s not parts of Forge translated model(i.e. custom geometries), the measurement extension won’t works for your case.

Viewing Revit floor plans (2D views) in the Forge Viewer

I am interested in displaying Revit floor plans on the web, using the Forge Viewer.
Accessing the 3D view and sheet views has been straightforward, using Autodesk.Viewing.Document.getSubItemsWithProperties (link). However, I am unable to find any reference to accessing floor plan views (not sheet views) in the documentation.
A similar question was asked here (Autodesk Viewer: Suggestions for 2D view of floor view), but the conclusion is unclear - the original poster only seemed to access sheet views.
My question is: are Revit floor plan views accessible from the Forge Viewer? Or, is it meant to only expose 3D views and sheet views?
Re-reading the previous question that you pointed to, Autodesk Viewer: Suggestions for 2D view of floor view, and its comments more carefully, I have the impression that the Collaboration for Revit tool or C4R add-in mentioned there allows you select addition views to include in the translation, both 2D and 3D:
https://fieldofviewblog.wordpress.com/2016/04/02/selecting-views-to-publish-revit-project-on-a360/
You might also want to check out the possibility of driving this functionality programmatically:
http://thebuildingcoder.typepad.com/blog/2016/07/selecting-views-for-forge-translation.html