For many 3D modelers that are experienced in modeling, rendering, and animation, 3D optimization can be a daunting process – especially if you’re optimizing a 3D model for real-time application! A quick Google search of “how to optimize 3D files” will bring up a handful of suggestions – like reducing polycount and getting rid of excess vertices.
However, optimizing 3D files for real-time applications has many nuances that can be overwhelming for 3D modelers. Whether you’re optimizing a Sketchup or Revit architectural file, or an engineering model created in Solidworks, there’s a few essential points to keep in mind, and we’ve rounded them up in this list of best practices when optimizing 3D models for VR.
1. Instance duplicate parts
Imagine re-processing the same exact 3D mesh a hundred times. It sounds like a waste of resources, right? That’s exactly what happens when a game engine processes duplicate meshes in your file. Whether your model is made up of thousands of bolts, or contains the same door model numerous times, when your design is being rendered, these duplicate parts will each processed repetitively.
Instead of processing identical duplicates and using additional resources on your device, you can instantiate the duplicates and create clones of them. Now when you edit or render the model, all instances receive the updates instantly and get processed more efficiently. Speed and efficiency are the two key requirements to achieve optimized real-time visualizations in VR. If your design contains duplicate parts, such as screws or chair, Meshmatic’s Duplicate Detector is a simple and powerful tool that finds and instantiate duplicate meshes for your entire design.
2. Correct overlapping or hidden parts
Missing or hidden parts is a common problem among 3D teams that have multiple designers working on the same project. For example, during the design process, a user may hide a part instead of deleting it from the project and the next user exports the file not knowing that there are hidden parts or layers. The problem could also be due to an error during conversion. If a part is too complex, it may accidentally get converted twice. Either way, hidden parts use up additional resources, taking a toll on the processing power of your CPU.
It’s good practice to review and locate hidden parts and delete them to avoid unnecessary delays in your real-time visualization.
3. Reduce the number of faces
Mobile VR headsets have a standard FPS that you need to stay within to avoid lagging issues and motion sickness. This is usually between 60 to 90 FPS. Detailed and high-poly 3D models are the main cause of slow FPS. Reducing the face count reduces the complexity of the model, making it:
- Faster for the game engines to render, increasing performance for real-time
- Easier for the 3D modeler to edit the mesh, texture and UV unwrap it.
For Autodesk Maya users, the new 2020 version is equipped with the new Re-mesh and Re-Topology tools, where users have control over the modification settings. For individual parts that need to be simplified, Maya’s tools offer a great solution. For simplifying a group of meshes, especially in large CAD models, our software, Meshmatic, offers a high-performance LOD tool that can be applied to the entire model with one click.
4. Apply LOD’s
Applying level of details (LOD’s) removes excess amount of details by decreasing the complexity of a 3D model as it moves further away from the camera. Applying LOD’s deletes mesh features such as openings, gaps, bumps, transparencies, and more. When the mesh is in close proximity to the camera, LOD’s are rendered with all the required details. But as the mesh moves further away from the camera, the mesh swaps with a lower quality version of itself, unloading render requests from the CPU or GPU.
Another factor to keep in mind when applying LOD’s is volume resolution. Smaller objects that aren’t important in your visualization don’t need as much resolution as larger objects. For example, when creating a visualization for a food manufacturing plant, larger parts of your model such as conveyer belts and robotic arms can have more detailed resolution, whereas bolts and screws on different parts of the machinery can get away with much lower LOD’s.
The new Re-topology tool by Autodesk Maya and the new Unreal Engine LOD Generator help 3D developers reach their optimum FPS. Another useful tool is Meshmatic’s LOD generator that delivers optimized meshes for large CAD models in one click. LOD generation requires additional steps and Meshmatic automates these steps for you. For example, after generating LOD’s, we recommend deleting duplicate vertices, deleting non-manifold edges, and re-generating normals to avoid render issues.
5. Reduce the amount of materials
Too many materials in a 3D model increase file size and complexity, making it difficult to work with in real-time game engines. Keeping as little number of materials as possible is important in optimizing 3D models for real-time. Another good practice is to use solid colors instead of image textures since they are easier to render.
When you generate LOD’s, you create a lower resolution polygon mesh as well as creating a material LOD duplicate in a lower resolution. After creating material LOD’s, it’s a good practice to check if the LOD materials have any metallic, transparency or opacity properties. If they do, they can be deleted because it’s unlikely you’ll see any of these features in the render.
6. Generate new normals
Physically based rendering, or PBR, was a major step in improving real time visualization. PBR approximates optimal properties of the materials using a few parameters that are quick to compute (reference). To generate accurate result for PBR, 3D engines use polygonal normals in the equation. As a result, generating accurate normals after CAD conversion is essential to the final result. Reflection, diffusion, transparency, roughness, and metallicity are heavily normal dependent.
During the polygonal mesh conversion , normals can be incorrectly faced. Inverted faces create incorrect shaders when the model is rendered. To avoid this, 3D modelers have to manually ensure that all faces are oriented the right direction, like Maya before rendering in a game engine. Meshmatic’s Auto Face Orientation can help your entire 3D model adjust all the faces and re-generate normals for accurate render results. Learn more about the Normal tool here.
7. Organize the outliner
The outliner is the backbone of your model. It organizes every part or node in your 3D file, as well as connecting parts and parents for when you need to move or manipulate groups or individual meshes in the scene. A messy outliner will not only make the model difficult to work with, but can also cause problems during importing or saving.
In the process of converting CAD to polygonal mesh, in many cases, location, rotation and scale of all mesh are converted into separate parents. Meaning that a mesh will have multiple parent nodes that each contain one of the above properties. This multiple parent problem creates a large useless dataset that commonly leads to software crashing.
To solve part of this problem, Autodesk Maya and other software packages offer the Freeze Transform tool, which reset the mesh transform, removing the above mentioned parental dependency. These empty parent nodes can now be safely deleted without moving, rotating or rescaling of the mesh. The issue is however that applying the Freeze Transform tool to all meshes in a large file can cause crashing. As well, removing the resulting empty parental nodes manually for all meshes is a tedious process.
Meshmatic’s Roll Up tool is specifically designed to reset mesh transform and delete parental nodes for all meshes in a large 3D file in just one click, minimizing the outliner significantly.
In addition to freezing and removing multiple parents, the Roll up tool also removes empty nodes. Some empty nodes carry metadata that are not useful for the visualization but take up space, such as history, part SKU, manufacturing info, etc. Removing these empty nodes is a simple way to reduce unnecessary data complexity.
8. Combine neighbouring meshes
As discussed in the previous section, a minimized outliner is essential to an optimized workflow for VR development. Another effective way to achieve this is by combining neighbouring meshes. For example, combining five screws into one mesh – so in your outliner it shows up as one node instead of five. Combining parts will help keep your outliner more manageable, as well as making part selection and manipulation way more efficient.
Combining meshes also reduces the number of processing draw calls to the CPU and GPU. When you’ve combined five screws for example, instead of having five draw calls upon rendering, there will only be one draw call. This effectively helps improve your FPS. One last thing to watch for is that after combining meshes, the UV shells will all be moved to one new UV set, which overlaps the shells. Open the UV editor to organize the UV layouts.
9. Retopologizing model
Retopologizing is the process of improving your mesh’s edge flow with a more optimal geometry. This step is especially more important you need to reduce the face count from millions to hundreds. Retopologizing, however, can result in errors in incorrect edge flows if you’re starting to apply re-topology tool without generating LODs first. Make sure to use LOD generator or the Autodesk Maya’s Reduce Mesh tool to reduce number of faces first. Lower face count helps the software to minimize the CPU usage and speeding up the re-meshing process as well as accuracy.
10. Remove unnecessary objects
Removing parts that are not needed in your visualization is another good way to optimize your 3D model for real-time. This includes extra nodes, meshes, materials and textures – which can all increase file size and make your project difficult to render in real-time. For example, in a visualization of a car model, removing a lot of the internal parts, such as screws or wires will significantly decrease the files complexity and size, making it more performant for a real-time visualization. Removing structural parts like screws won’t affect the integrity of your model, because mechanical and physics properties do not apply in game engines.
Optimizing 3D files for VR, final thoughts
We hope you find this guide helpful when you’re optimizing 3D models for VR visualization projects. As you can see, there are many small details to consider when optimizing a 3D file for VR. As 3D files get more and more complex, the benefits of good optimization become even more apparent.
The good news is that we’ve developed a 3D optimization software, called Meshmatic, that can analyze your file and automate various optimization tasks that we have described in this article, such as:
- Instancing duplicate parts for improved real-time performance
- Generating new normals to improve final render
- Reducing face counts for improved mesh optimization
- Organizing the outliner and deleting empty nodes
Sign up today and get the latest info on Meshmatic!