Funnily enough, after dealing with the new Revit 2014 custom exporter framework last week, and even suggesting rewriting my Revit 2013 OBJ exporter to make use of it, a request came in for a version of the OBJ exporter for Revit 2014, so I discuss that below. I also add some more background to the list of new Revit 2014 SDK samples. Finally, to wrap up, we'll look at a surprisingly unbalanced distribution of Revit API blog page views per country.
As mentioned, it would be nice to rewrite my OBJ exporter for Revit 2013 using the new Revit 2014 custom exporter framework.
However, a request already came in for a Revit 2014 version:
Question: Until now I have been using Lumion for visualisation. It is fast and the result is OK. However, I now discovered the Octane renderer and would like to try that as a visualisation tool instead. Apparently, the only way to export a Revit model to Octane is via the OBJ file format.
Answer: In order to provide something immediately, I simply flat ported the Revit 2013 OBJ exporter to Revit 2014. I also made use of the DisableMismatchWarning utility to fix the processor architecture mismatch warning MSB3270.
The current implementation thus still traverses all the Revit model elements one by one, retrieves their solids, exports the graphics face by face, and determines some, but not all, graphical attributes as described last year:
Some of that complexity could be removed by rewriting this using the Revit 2014 custom exporter API. Above all, the graphical properties could easily be better supported.
Running the OBJ exporter on the RAC basic sample model generated these OBJ and MTL output files and reported the following result:
Here is a sample visualisation in Octane of a Revit 2014 model exported to OBJ:
As you can see, the texture mapping is rather strange. Maybe the MTL file is not being properly processed.
Probably some face normals are also wrong, or, equivalently, the polygon loop vertex ordering is inverted.
Anyway, here is ObjExport2014.zip containing the complete flat ported source code, Visual Studio solution and add-in manifest for the Revit 2014 OBJ exporter.
I already presented the list of new Revit SDK samples without going into much detail.
I fleshed it out a bit more for the Revit API DevCamp in Moscow, as part of my presentation on the Revit 2014 API news.
The shortest useful summary of the main new API features that I have been able to achieve is this:
The three last items are the only ones not covered by any new SDK samples.
For that reason, I recently went to some effort to explore the Structural Analysis SDK and the custom exporter framework.
The third item not covered yet concerns the MEP calculations in external services. We are working on a good sample for that, hopefully coming soon.
All other important new features are covered by the following SDK samples:
Several of these have already been discussed in the DevDays online presentation, recording and sample code and other separate posts.
Here is my Moscow DevCamp Revit 2014 API slide deck that includes one slide for each sample to provide a quick first impression of each.
Let's close for today with something not directly API related:
Cheers to Australia, Denmark, Netherlands and Sweden!
When I visited Harry Mattison in Boston in connection with the Autodesk Tech Summit, he mentioned that his Boost your BIM page views had an extremely unbalanced distribution for different countries, and very kindly provided some numbers correlated with the total country population:
As you can see, the top four countries have 4, 5 and even up to almost 7 page views per 100000 population, whereas Canada has 2.5, the USA and UK well under 2, and the rest of the world well under 1.
Rather strange, isn't it?
Thank you, Harry, for this perplexing little item.