I would like to convert assemblies from a .RVT model to three.JS to .USDZ for AR. I have a list of assemblies and want to process each individual file into the final format of USDZ for AR. Does anyone have any good recommendations? I’m thinking Model Derivative IFC to three.JS to .USDZ but would love know the best method for this! Thank you!
The ModelDerivative API allows you to convert your RVT file (and many others) into SVF (or SVF2) to be used by the viewer for example. Then you can use Forge Convert Utils package to extract the geometry and create a glTF of your model.
glTF is widely used for AR but if you need to use USDZ, you can easily convert your model with this kind of tool : USD_From_glTF
Related
I have implemented multiple models viewer using Autodesk forge. We are trying to achieve a functionality where users could select entities from different models from multi-model viewer and export a single obj file out of it.
but it seems, Translate a Source File API allows just a single model URN to be passed.
I'm looking for a way where I could create a single Obj from more than one model URN.
I think there is not built-in way to do that actually.
If you are working with NodeJS you can use glTF file format and follow this method :
Convert your different models with Forge-Convert-Utils
Merge with glTF-Transform following this answer : Multiple gltf loading and merging on server side
glTF is well supported now on many platforms and pretty efficient but if you really need OBJ you can use assimpJS (which is the JS port of assimp) to convert your files.
I have a Revit file with two different 3D views which I can see them in Autodesk viewer ;however, when I extract model manifest, there is only one OBJ file and I can extract only one.
How can I extract the OBJ of all the 3D views that are created in the model?
Thank you
You need to translate your file into OBJ first using the ModelDerivative API.
According to Supported Translations, Revit files doesn't support OBJ derivatives, so can't translate the whole file into OBJ.
But you can extract the geometry, take a look at this tutorial : Extract Geometry in the official Autodesk Forge documentation.
In the translate payload you need to pass the model guid of the 3D view you want to translate, so you should be able to translate all your 3D views.
I've seen some examples of high quality and detailed models that works for the Autodesk Model Derivative. Some example are Dotty, Dasher and Fusion Race Car. Dotty is actually amazing.. even has some reflection added in there.
So, to achieve this I would need to upload the textures and the materials with my model. I've tried to reproduce the guide telling me to create a ZIP containing of the OBJ, MTL and PNG. First of all, to be sure I am on the correct path when I am testing out different workflows: is OBJ the only format that can be uploaded with custom materials/textures? I know that I can add standard materials to rvt, fbx, 3ds etc, but I do not have a clear idea on how to upload custom materials/textures.
Could you kindly give me a step-by-step how to get the best possible visualization of the uploaded models? Thanks a lot
Models from Fusion 360 uses the built-in material library, in the case of Fusion Race Car you mentioned. The Dasher sample uses a Revit model of a "well-designed" model in Revit, but no custom materials. Don't have much info on the Dotty format, but would consider the direction of obj or rcp (Reality Capture or point cloud) files, both can have texture.
For a custom material, OBJ is the best route as of now, allowing you to include your textures. As far as Forge, the translation is exactly the same: upload the zip with all files and post a job with rootFilename pointing to the .obj file.
I would like to build a CNC manufacturability analysis app using Autodesk Forge.
Setting the computational geometry algorithms aside, what kind of geometrical data can I extract from CAD files using this platform? also, is there an existing app I am unaware of?
Thanks
Depending on the input file format you can convert to different other formats:
Supported Translations
Though it's not obvious from the above list, all input formats support conversion to OBJ format, which can also be done at subcomponent level - so you don't have to export the whole model to OBJ.
Here is a sample that lets you access your files from A360 and convert them into whatever format is currently supported for them:
Model Derivative API sample
Source code: https://github.com/Autodesk-Forge/model.derivative-nodejs-sample
I want to render 3D graphics files of autodesk (.dwg and .dwf) using three.js but three.js requires 3D data to be in json format. So, I need to convert these files to three.js readable json format. I tried searching on the internet but couldn't find any solution. Can anyone tell me a good converter for these files?
Thanks in advance.
In fact Autodesk already have a converter & wegbl viewer. Go to http://developer.autodesk.com and get a key for View & Data API. There is a server side REST API that allow you to upload a CAD file and convert to a JSON stream. You can hook to it and get the output. Or, even easier, just use the JavaScript client side API to embed the viewer on your website/app
Update
The API was renamed to Model Derivative + Viewer, the first translates the source file (e.g. DWG, RVT and many others) to a web-friendly format that can be viewed on the second, which is based on Three.js (and can be customized).