DirectShape.ByMesh does not work anymore

Hello to everyone, i should import an Obj file in family ambience (.rfa) as generic model.
I followed all the common procedures, i did it once and it’s ok but the second time does’t work ( i followed the same steps with the same files)
The code is running well but i can’t see the mesh on revit family, any suggestions?
Thank you very much in advance.

Opere Mesh.dyn (19.9 KB)

Your graph is missing the category for the directshape
Also try a Mesh.Remesh as shown below (some of the other MeshToolkit nodes such as repair might also work)

If that does not work, please share the OBJ mesh


2 Likes

Thanks a lot @Andrew_Hannell, i knew about category node i just did not put in that code. For remeshing i prefer to use MeshLab because i can manage more specific parameters. I think i had a problem because i was not using the last version of packages (Spring nodes and MeshToolkit) it seems working now. Thank you so much. Do you know if we can import also the .mtl file in some way?

It would be great but is not possible at all. Even putting a different Material on each facet is not a thing.

PS: ReCap Photo is great for repairing meshes.

Thank you for the advice @truevis. There is a very good attempt made by @Alex_Shovelton in 2017, in which he basically merged the information relating to the material into the mesh, but it is very complicated and sometimes, like in my case, an approximation of the colors is not enough.
I have some meshes come from 3d scanning of artworks that have more than 2,5 millions of faces.

From my experience, practical limit is around 150000 faces in a DirectShape.

1 Like

I’d agree that Revit is not the right tool for a mesh of this complexity

1 Like

forgot to say- on the materials

as far as I know the mesh import methods in Revit/Dynamo don’t bring across materials.
You’d need to reassign materials to each mesh in Dynamo

Meshtoolkit seems to import multiple meshes within one file as one object whereas Rhynamo brings them in individually



1 Like

I tried to import a mesh of 140000 faces maximum, i simplified it a lot but the native one had just 300000 faces.
A mesh of 2 millions and more faces can’t be remeshed to 150000 without losing a lot in terms of quality.

@Andrew_Hannell in this way are you connecting to DirectShape a list of meshes and a list of different materials? At the end so you have 4 meshes even if they look one, right?

I am making reaserch about the M-BIM, Building Information Modeling for Museum Heritage. As you know a family can be characterized in geometrical and informational way. My conclusion is this: for the geometrical part, as both of you said before, we still have some limits because of complexity of meshes and losing of material information. For the management side instead an approach Revit/Dynamo could be a really good method. You can immagine the importance of having a database of the artworks with all the related information, or the potential of Dynamo in terms of creating new algorithms to analyze the parametric relations between the building and the artworks.

1 Like

Yes

My understanding is that a mesh can only be assigned a single material

The issue with the MeshToolkit importer is that even if the OBJ file contains multiple meshes, it comes into Revit as a single object- so you can only assign a single material to all meshes. The Rhynamo importer brings in each mesh as a separate object, so each can have a different material.