Is it possible to show custom textures applied to materials in Revit using the forge viewer?
Thanks for your help in advance.
My understanding is that you want to use custom JavaScript to modify textures of the model after having translated it. If this is the case here is an example on how you can modify textures in the viewer: Viewing.Extension.Material
You can test the live version using a revit model here. Click the + from lower-right control and select "Office" for example.
Related
We are having an issue with some Inventor models, where the orientation and up direction in the forge viewer does not match the home view within Inventor.
This screenshot is of a sample model in Inventor (home view):
cylinder pointing upwards
This screenshot shows how it is displayed in the viewer:
cylinder on it's side
We are creating the svf file directly from Inventor design automation, in exactly the same way as the forge configurator sample https://github.com/Autodesk-Forge/forge-configurator-inventor
Is there anything that we need to do explicitly to have the viewer use the home view and up direction from the Inventor model?
I think I have now found the answer to my own question!
In the svf exporter I had turned off the option to export file properties:
oOptions.set_Value("ExportFileProperties", false);
Thinking that this would just eliminate the part properties, but it seems like it must remove the up direction and home view also.
I have an IFC file, with the model component located quite far from the origin (Due to using the correct actual coordinates of the project). After uploaded and translated to Forge, the viewer does not display properly at the location where the model is located. While the url thumbnail still shows the model fit to view. I attach 2 image as follow. Please help how to fix this.
Thumbnail when translation finished:
[1]: https://i.stack.imgur.com/lQTLR.png
Viewer result:
[2]: https://i.stack.imgur.com/hiqS5.png
Forge is usually able to handle BIM models "far away from the origin" quite well. I'd try the following:
check if this isn't just some strange camera preset; when the model is loaded, try double-clicking somewhere on the empty space; this should transition the camera so that it's covering the bounding box of the entire model
alternatively, open the Model Browser panel, and select one of the nodes in the tree to move the camera to it
the Forge Model Derivative service allows you to switch between different loaders when processing an IFC file (go to https://forge.autodesk.com/en/docs/model-derivative/v2/reference/http/job-POST > "Attributes by Output Type" > "SVF Output", and search for conversionMethod in the advanced properties); give it a try and see if you get better results
And finally, if none of the above helps, consider sharing your IFC design with us (confidentially; we will not share the design with anyone outside of Autodesk) via forge (dot) help (at) autodesk (dot) com so that we could debug the issue on our end.
How do I enable search on a 2D view in the forge viewer. Looks like the model browser is only available on 3D views. Is there a way to enable it on 2D views as well
Explicitly adding loading the ModelStructure extension does the trick.
viewer.loadExtension('Autodesk.ModelStructure')
We are using the Forge viewer to show both 2D and 3D models. For the 2D models, we would like to be able to show markups all the time, like you can with the viewer inside BIM360.
I tried the solution mentioned here: Forge Viewer: Show bottom toolbar and markups at the same time - but I have not been able to get that to work. It seems like when I call:
Autodesk.Viewing.Extensions.Markups.Core.Utils.showLmvToolsAndPanels(viewer)
It hides the markups.
How is this done in BIM360? - are they using a custom viewer, where this has been enabled somehow?
Unfortunately I was able to get it to work with:
Autodesk.Viewing.Extensions.Markups.Core.Utils.showLmvToolsAndPanels(viewer)
See live sample here:
I have added some materials to a couple of the rooms in my Revit model which seems to end up displaying pure green color (no "Office" text) when the file is uploaded to the Forge Viewer. Is this a familiar matter?
Here are the images for reference:
Revit
Forge
Kind regards,
As Zhong Wu, as of now (Jan/2018) this is not supported: the translation will not understand materials from custom images.