Sketchup: Export Scene XML

The ability to export a Sketchup scene and import it into Unreal Engine in a straight forward fashion.

Sketchup Export XML Features:

  • Material name cleanup, because some if not most Sketchup naming tend to have illegal characters that most programs don’t like. This feature also adds a “M_” prefix to keep name clashing between assets.
  • Texture name cleanup, adds a “T_” prefix to keep name clashing between assets. Also added the option to write out textures to the export directory in case FBX files were not used.
  • Export Components with unique name identifiers to keep track what asset is what.
  • Export Components in different file formats including FBX, Obj and USD
  • Export out the entire Sketchup scene into individual Components and an XML scene file.
  • Export out the selected scene hierarchy, similar to the entire scene option, but only whats selected.

Unreal Engine 4: Import Sketchup XML

  • Import and process FBX files and apply custom file metadata to keep track of things.
  • Import and process texture and material data.
  • Process and recreate the scene hierarchy and layout based on what is seen in Sketchup.
  • In additional to recreating the hierarchy and layout, display layers, Cameras and special tag information with unique identifiers are created to allow future updates.
  • Ability to link Sketchup objects to Unreal Engine Assets, allowing the artist to use existing Unreal Assets as a substitution once the scene xml was imported.

Languages/Libraries: Ruby, C++, Python, Ox

History:  This project started back in 2015, years before Datasmith and Python for Unreal projects had been started and deployed. This project has gone through several revisions and major updates.

2015: Originally written as a ruby script that exported out a *.t3d file that was specifically formatted so you could import it directly into Unreal using their t3d importer. Though geometry and texture assets had to be imported manually.

2016: Rewritten so all the scene data was written to a custom xml file. This required a C compiled ruby library that would generate xml data in seconds compared to minutes. Wrote a custom C++ Unreal Engine Plugin in order to import the assets and xml scene data.

2018: Rewrote the Unreal Engine plugin to use Python rather than C++.  Making the upgrading and tweaking of the code simple and straight forward.

2020: Rewrote both Sketchup and Unreal plugins to use the most recent versions of the applications and their respected API’s (Ruby and Python). Most features and functions remained the same, but adding additional features needed a new import structure.

Tags: