For our project, a infra building we created several familys with a lot of "shared parameters in Revit.
now we would like to see them back in Unity 3D but i don`t see any option to import the IFC file.
we are also looking for way to import IFC files into Unity. We are working in AEC sector as well and want to evaluate the possibility to make a app to use IFC data with VR.
If it would be possible to get also Psets into Unity it would open up a hole new variety of possible applications.
This blog suggests to use Cinema4D to convert IFC into Filmbox FBX:
In my project, I have some success with letting IfcConvert convert the IFC file to OBJ and XML. Then load the OBJ into the scene and parse the meta and hierarchy from the XML file to reorganize the element tree to fit. Takes some scripting and fiddling, but it works
It’s hard to convert ifc to polygonal straight from the ifc file because it’s mostly a procedural generation of primitives (extrudes, loft, surfaces…) and there are lots of operations to manage before having anything to work properly.
I’ve had the same need for a long time and had hard time finding a solution. I developed this plugin for Bim Vision that exports ifc to an optimized polygonal model (.obj) that can be imported right away in Unity.
Feel free to check it out and try the demo version.
Does it do any sort of data handling? When data doesn't matter I just pass the FBX through 3DS Max so everything with the same material is meshed together. When it does matter I generate a CSV in Dynamo and import it in Unity.
I’m working on a process to get element parameter:
In Revit:
Export FBX
Run Dyanmo script that produces a XML file with Element Id and other info extracted from the elements (currently Category but any element info can be included).
List item
In Unity run a script that
-Imports FBX
-Reads element id from element name in the Hierarchy
Convert the IFC to a Mesh format and use an additional file (json or xml) to import all the information. E.g. using IfcConvert and export to DAE + export separately to XML. Use GUIDS as object names.
Use a C# library such as XBIM or GeometryGym to parse an IFC file. If you are on Windows Desktop, the XBIM Geometry library supports full geometry processing. On macOS I had to rely on only the Essentials package, which means manually parsing the FacetedBREP geometry. For Revit files I had to convert all geometry into BREP first (e.g. using SimpleBIM)
Export from Revit to 3ds Max and export to FBX. The object names carry their ElementID and use a separate schedule from Revit to export information you want into a tabbed text file to parse in Unity.
Use IFCEngine.dll as external library and use the IfcEngineCS wrapper from GitHub - smartaec/IfcEngineCS: CSharp wrapper for IfcEngine.dll in Unity. I had to hack a bit on macOS and it requires quiet a lot of code but I could convert all geometry and properties and attributes and quantities into Unity. The geometry contains vertex colours so you cannot use Unity Standard shader for that.
This is a running subject on my blog
Can't get what you are trying to accomplish here. If you want I can help you over Skype with these scripts, that would be faster instead of guessing what you are trying. (SkypeId: sumitb.mdi)
Hello, I found the article very interesting! But I have a question, if my goal is to have a mobile application, download and convert my .ifc file to .obj and see the model at runtime. How could I raise it? Could the .exe be run from the unity app?
Ifcconvert is a desktop command-line utility. You may try to run that from an external (or local) server and call into it from your Unity app. I don't see instructions to compile ifcconvert for Android or iOS. In that scenario, the ifcengine I mentioned in bullet 4 may be a possibility, as this has been compiled to almost any platform.
In my project, I have some success with letting IfcConvert convert the IFC file to OBJ and XML. Then load the OBJ into the scene and parse the meta and hierarchy from the XML file to reorganize the element tree to fit. Takes some scripting and fiddling, but it works
– Eldamir88