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.
Related
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
I need to view files with the autodesk viewer and make and save the changes. I wonder if it is possible to do it directly through the Forge API I thought to apply, once the waterfall viewer is loaded, all the preloaded changes in an internal database
The changes I would like to make are of the type:
adding a room,
addition of mesh
addition of successively recoverable properties
addition of other 3D models preloaded in forge
Since all property data and the SVF itself (or any derivatives for that matter) is immutable once extracted so I am afraid you'd need to programmatically append the mesh (try SceneBuilder to make things easier) every time the model is loaded ... As for the properties it's possible to use your own data source for persistence though - see a case in point here and here
To persist any change to the original design file would require translating the model again for Viewer to consume the changes - however this process can be automated using our Design Automation service and Webhooks ... see here to get started.
One possible workaround to persist your custom geometry would be to convert your geometry to OBJ and then SVF with the Model Derivative service (for course that'd incur costs ...) and then load it to Viewer and aggregate with the original model...
I try to load a three.js file (Json from rvt) into the offline version of the forge viewer. How I can do this?
Thank you!
Forge viewer is based on three.js. It is similar to adding mesh to the scene in native three.js context. The below are one demo extension.
https://github.com/Autodesk-Forge/library-javascript-viewer-extensions/tree/0c0db2d6426f4ff4aea1042813ed10da17c63554/src/Autodesk.ADN.Viewing.Extension.MeshImporter
In this demo, the json file (Arbor Press.json) is from Inventor. It contains the definition of the geometry and material. The code of the extension will parse the json, and create mesh in the scene of Forge Viewer.
You might also need to take a look at the other extension for examples of changing material colors:
https://github.com/Autodesk-Forge/library-javascript-viewer-extensions/blob/0c0db2d6426f4ff4aea1042813ed10da17c63554/src/Autodesk.ADN.Viewing.Extension.Material/Autodesk.ADN.Viewing.Extension.Material.js
However please be aware your meshes will not be detected by the viewer selection logic, some extra work would be needed if you want that.
I'm trying to translate Revit file that contains both 3D and 2D geometries. I've verified that the file contains proper 3D geometry, by opening it in revit 2019 and visualizing it through 3D viewing mode.
However, when I pass this file into model derivative process, it only creates 2D derivative.
Before translation process, I've tried to set default view of the revit file as '3D' instead of 2D drawing file, which didn't work.
I've also tried making a translation POST request with formats as 'svf', and views as both ('3D', '2D'), and ('3D' only), which both failed.
However, all these attempts didn't work, and when I inspected the manifest from the file translation, it seems like that 3D geometry is completely missing. I think that there is a unhandled exception in Model Derivative process that fails to extract 3D geometry in our particular forge model file.
If you need URN of the file / actual file, please let me know.
Thanks in advance.
- EDIT
UPDATE:
I've confirmed that the default 3D view is named as {3D}, default name set by Revit.
What is the name of your default 3D view?
The default name is "{3D}", I believe.
Maybe the translation process does not pick it up if it is named differently.
Afaik, the one and only way to specify the views for the translator to process is by using the Collaboration for Revit or C4R BIM 360 Team tool to select the views to publish to the cloud.
I have a collada (.dae) 3D file with nodal colour for contouring. But these information are lost while uploading to autodesk viewer api. I have attached the file for reference.
https://1drv.ms/u/s!ApS9nIpyJIuQbJulgP5rcm1b-ic
Is there any other way to show contour in viewer api ? Please help.
Yes, unfortunately, the DAE, Obj, FBX pipelines only translation geometry. Material & Textures won't get through. We are working on a process to handle this as well as supporting glTF. The is no solution to workaround this limitation at this time.