This article explains how to convert Revit data to OGC 3D Tiles.

If you want to visualize large Revit datasets and maintain application performance, you must convert the Revit data to the OGC 3D Tiles format. OGC 3D Tiles is an optimal format for visualizing large geographical datasets. After the conversion, you can visualize the data on a Lightspeed view, as explained in the Visualize OGC 3D Tiles data on a Lightspeed map article, or in LuciadRIA, as explained in the LuciadRIA documentation about handling BIM data.

LuciadFusion can natively serve Revit data as an OGC 3D Tiles service. For that use case, you don’t need a manual conversion to OGC 3D Tiles.

Check the LuciadFusion Serving BIM data article for more information on how to serve the Revit data as OGC 3D Tiles.

To convert the Revit data to OGC 3D Tiles, you have two options: you can perform the conversion programmatically, or you can run the Revit data conversion script from the command line.

Converting Revit data to OGC 3D Tiles in your code

To convert Revit data to OGC 3D Tiles:

  1. Decode the Revit data into an ILcdModel using a TLcdRevitModelDecoder.

    ILcdModelDecoder decoder = new TLcdRevitModelDecoder();
    ILcdModel model = decoder.decodeSource(new TLcdBIMDataSource(sourceName, TLcdBIMDataSource.Type.GEOMETRY));
  2. Encode the generated model to OGC 3D Tiles using a TLcdOGC3DTilesModelEncoder.

    TLcdOGC3DTilesModelEncoder encoder = new TLcdOGC3DTilesModelEncoder();
    encoder.export(model, outputPath);

The resulting OGC 3D Tiles dataset is written to the given outputPath location.

Converting Revit data to OGC 3D Tiles from the command line

To convert Revit data to OGC 3D Tiles from the command line, go to the samples folder, and select the appropriate script to run:

  • bim.converter.bat on Windows systems

  • bim.converter.sh on Linux and Mac systems

For example, run:

bim.converter.sh -i /data/Formats/Revit/someRevitFile.rvt -o /project/3dtilesoutput

If you run the script with invalid or insufficient arguments, the converter tool prints its usage documentation.

You must run the script with these parameters:

  • -i path/to/<projectfile>: specify the Revit dataset, either a .rvt or a .rvt.index file.

  • -o path/to/output/: specify the path to the output folder for the OGC 3D Tiles.

Optionally, you can add these command parameters:

  • You can use the -g command parameter to add a GeoJSON file to the output folder.

    bim.converter.sh -g -i /data/Formats/Revit/someRevitFile.rvt -o /project/3dtilesoutput

    The GeoJSON file contains the metadata of the individual elements in the Revit data, such as doors and walls. A bounding box is also included, but not the full geometry. For more information about GeoJSON conversion, see the Converting Revit data to GeoJSON tutorial.

  • You can use the --no-tileset command parameter to disable the creation of the OGC 3D Tiles output.

    This is useful when you only want to generate the GeoJSON output. This also means that the -g parameter is required when using this parameter, otherwise the tool will fail and print an error message.

    bim.converter.sh --no-tileset -g -i /data/Formats/Revit/someRevitFile.rvt -o /project/geojsonoutput
  • You can use the -m command parameter to specify the mesh compression you want to apply. You can set it to either DRACO or NONE. See ELcdOGC3DTilesMeshCompressionType for more information about the meaning of these values. If this parameter isn’t specified, the DRACO compression is used.

    bim.converter.sh -m DRACO -i /data/Formats/Revit/someRevitFile.rvt -o /project/3dtilesoutput

    This option is ignored when the --no-tileset parameter is used.