One of my first paying gigs with 3D computer graphics was an architectural rendering. It took hundreds of processing hours and resulted in a minute or so of 320×240 video. It was blocky and cartoonish, but it was done on a computer. A few years later we could get a 3D model of some real world structure into an immersive VR environment after weeks of works. It required someone by hand rebuilding the model into something that could be read by the visualization software. This assumes you first didn’t have to write the software to visualize the model.
Cycle after cycle, over the years. the formats used by drawing and the formats read by graphics engines have gotten closer together.
Revit is popular these days for building design. Unity is popular, or at least I like it a lot because I can take it in so many directions. Since the C4 was installed in the basement I’ve been wanting to find a way to get Revit projects into an immersive VR. It’s been no sweat to go from 3DS or Maya into VR (through Unity or Unreal) for some time. Getting geometry into Unity is pretty easy using the FBX format, which 3DS max, Revit, and a lot of other things export. Seems pretty straight forward, right?For the geometry it actually is. Revit exports fbx, but it uses Autodesk material definitions, which don’t import into Unity. Everything, with only a few exceptions, comes in with the same material, called Default. The picture above is a Revit model of a brew pub, with some basic Unity lighting, ported to the C4 using GetReal3D.
The big issue here is materials in the 3D scene, and how they’re defined. Revit uses a material definition that doesn’t export into something that Unity can read in. Revit ties the material to the object definition, so there can be many different materials. Different manufacturers can define different materials in Revit. Unity, for now, isn’t going to care if a component comes from Bradley or Cooper, because they’re going to look the same, but it makes a difference in Revit.
I opened the model in 3DS Max and could see that all the materials coming from Revit were of type ‘Autodesk Material’. In focused systems like Max or Revit, it makes sense that there would be material definitions that catered to those specific rendering environments. FBX, which is what Unity needs currently, only supports ‘Standard’ materials.
Turns out there’s a paid solution, depending on whether or not Max 2017 is a paid solution to you. There’s a new functionality in 3DS Max 2017 called the ‘Scene Converter’ that seems to be just a front end dialog for a collection of max scripts. It’s not a default conversion rule for some reason, but there’s one available in the conversion scripts folder called ‘Autodesk Material to Standard Material’.
So here’s the workflow that’s works best for me so far:
- Don’t export FBX from Revit. Import the Revit file into Max 2017. Combine entities by materials. This will result in all the geometry being grouped into materials, regardless of how they’red drawn. You’ve broken the Revit entity definitions at this point, but it will make it easier to visualize.
- Every Material will be named ‘Standardmaterial’. You need to go through and manually rename every material. It doesn’t matter what the name is, just so long as it’s unique. This well keep all of the problem materials from being lumped into one ‘standardmaterial’ definition in the exported file.
- Export from Max as an FBX file. There will be quite a few materials that have maps which don’t export.
- These maps are probably bump maps. When you import the model into Unity, you’ll have to convert the bump maps from Revit into Normal maps. You might have to re-assign the normal maps in the materials that are missing them.