All 3D modelers have been there – you receive a STEP file in .stp format from your engineering department or from a client, they want you to visualize it for simulations in Unity, or Unreal Engine. After converting the STEP file to polygon mesh, the file is so large and complex, and as expected, it’s impossible to open in Maya. It takes hours to load and sadly just ends up crashing.
After staring at your screen for too many hours, you’ve given up and are going to start recreating the entire engineering model from scratch in Maya. This feels like a huge STEP backwards (pun intended!), and the engineering team isn’t happy that their true-to-spec model isn’t being used.
Thankfully, there are ways to work with STEP files in a polygon mesh context. First, let’s go over some of the issues 3D modelers encounter when they work (or try to work) with STEP files in Maya, and how they can be overcome so that you don’t have to remodel.
Problems in the STEP to polygon mesh pipeline
Before we learn how to optimize our STEP file for Maya, lets understand why STEP files are so incompatible with 3D design software.
The simple answer is that the assets produced in Solidworks – or other CAD design software – are not suited for 3D design software and game engines. Solidworks is used to design physically accurate shapes, not polygon mesh geometry – what 3D design software is compatible with.
Solidworks designs are created using methods like Boolean operations, and extrusion-based techniques, which simply don’t translate correctly into polygon mesh. While these methods are highly valuable in CAD/Solidworks context, when they’re converted into polygon mesh, they’re tessellated, which creates numerous errors and problems in the new polygon mesh.
Problem 1: File size
When you export a STEP design in Solidworks as a polygon mesh, you force the software to retopologize all the design factors into a tessellated shape. The tessellation process divides the polygons into triangles to make them suitable for real-time rendering. This creates a very heavy shape with a massive number of edges and vertices. Tessellation also creates errors like holes in the mesh, broken meshes, twisted normals, corrupt UV’s, making the converted polygon mesh essentially unusable.
Problem 2: Open faces and inverted normals
The conversion/tessellation process can also create holes in meshes, meaning the model isn’t watertight and therefore difficult to work with in 3D design software. Inverted normals after conversion are another problem. Incorrectly oriented surfaces make meshes appear inside out – another problem that 3D modelers have to go in and fix manually.
Problem 3: Broken meshes
Another conversion error is broken meshes. A single part, like a staircase, is separated into its subcomponents – a collection of planes – during conversion. Now, instead of a neatly modeled staircase, you’re left with a large set of planes generating an excess of vertices – and consequently, increasing file size. Before moving on to your real-time visualization, you need to individually re-connect all these parts.
Left: In CAD software, the parts in the mesh are connected. Right: After converting, these connections are lost.
Problem 4: Normals
The way CAD software calculates normals isn’t the same way that polygon meshes do. So when a surface file is converted into polygon mesh, the normal calculations are entirely off and create twisted normals. Maya – and other 3D design software – have tools to correct and generate new normals, but you need to individually select each part and separately apply the tools.
Correcting STEP to polygon mesh conversion errors with Meshmatic
Working with engineering STEP files that are virtually untranslatable to polygon mesh is time-consuming and painful for 3D modelers. The errors resulting from converting STEP to polygon mesh are hard to correct. The manual work mainly consists of individually selecting parts and using a tool. Repeat this optimization process for over a thousand parts and you’ll understand why this is such a pain-staking process.
Meshmatic was created to improve and automate the optimization workflow. Instead of individually selecting parts and vertices to fill holes, or to combine previously connected meshes, Meshmatic analyzes 3D files to repair the mesh and make STEP files compatible with 3D design software.
Solution 1: Auto optimization
Based on the project and its end use – game engine development, 3d design, 3d rendering – Meshmatic’s Auto Optimizer detects and corrects geometric errors in one click. This tool can correct errors like repair holes, connect broken meshes, and generate new normals.
Solution 2: Instantiate repeated assets
A foolproof way to optimize CAD files for real-time is to optimize repeated assets. Meshmatic is equipped with duplicate detector technology that identifies repeated assets and instances them. Now, instead of rendering the same mesh over and over, it’s rendered once, resulting in time-saving benefits.
Set of duplicate parts that Meshmatic found, these can be instanced to reduce file size.
Solution 3: Fill holes
Not having a watertight model creates issues in the projects FPS (frames per second) and collision detection where you need to optimize the frame rate or detect collisions in real time simulations. Meshmatic reviews the topology after conversion and detects open areas on a polygon mesh, and automatically fills it with faces. Holes in the mesh don’t need to be found or selected, this action is done throughout the model in a single click.
Solution 4: Correct broken meshes
Instead of individually reconnecting broken meshes, Meshmatic identifies vertices that are touching – but not connected – and merges them all at once. This action also minimizes the outliner, and helps with file organization.
Solution 5: Optimize duplicate vertices and generate new normals
During tessellation, meshes are triangulated creating excess vertices. Meshmatic reads through the 3D file to find repeated meshes – made up of identical vertices, edges and faces. These duplicates can then be instanced to reduce file size.
The vertex optimization process prepares the file for Meshmatic’s Normal Generator, that’s designed to calculate normal angles automatically and create smooth angles. While each triangle has its own set of 3 vertex normals, if the angles of the vertices are small enough, you may only need two normals for a vertex. Meshmatic optimizes vertices and calculates Normals to ensure the smallest amount of normals need to be calculated in real-time.
Left: normals are generated incorrectly after conversion, Right: Normals are correctly applied from faces to vertices with Meshmatic.
While CAD software like Solidworks wasn’t designed to work with 3D design software like Maya, the demand for real-time visualizations in engineering industries has forced these two industries to collaborate. Meshmatic was designed to bridge these two worlds and improve the optimization of polygon mesh for real-time visualizations.
Download Meshmatic today and try it’s powerful features for yourself.