Blog Post | Beware of Many Polygons | Importing Third-Party Vehicles
Updated: December 16, 2020
There are nearly 400 unique vehicle meshes in the Virtual CRASH library (see the Vehicle's & Objects List); still, occasionally one has to go shopping on third-party vehicle model vendor sites to find the perfect match for a subject vehicle. Of course, one of the amazing features of Virtual CRASH is the ability to import vehicle meshes in .3ds, .dxf, or .obj format, and use them for your simulated vehicle models. Once a third-party mesh is imported, the final vehicle can be saved as a .vc3 file, and used in future cases. This ability to expand one’s own personal vehicle library is just one of the many amazing features of Virtual CRASH. This process is explained in the User's Guide, which can be found on the vCRASH Academy page.
So, let’s suppose you went shopping and found a great model that matches the subject vehicle in your case. You import the vehicle into Virtual CRASH, and suddenly you notice that your computer is running significantly slower, and Virtual CRASH seems to be barely puttering along. What’s going on here? The likely issue is related to the number of polygons within the imported vehicle mesh. The mesh makes up the geometrical detail of the vehicle itself. With each additional polygon, your system resources have to work that much harder to do all of the various calculations that make Virtual CRASH tick. Whether it’s a vehicle mesh or terrain mesh, one must, if possible, try to be reasonable, and manage the polygon count of imported meshes to maintain good system performance speed, otherwise simulation run time can increase, and workflow will slow. In this post, we will review how to deal with imported meshes with large polygon counts.
Are you a Virtual CRASH 5 user?
Virtual CRASH 5 now includes the amazing mesh optimizer tool - no need to use a third-party application to simplify your vehicles. Learn more >
If you are a Virtual CRASH 3 or 4 user, you will need to continue with the workflow described below.
Before we proceed, it is recommended that you download the free software application MeshLab (32-bit). This is very handy tool for manipulating terrain and vehicle meshes.
In this example, we located a mesh for a Subaru BRZ. We found the mesh available in many different formats, including .obj and .3ds.
Note, when importing .3ds files you will usually be asked if you want to import each mesh as a separate layer. Select "No" unless you want to customize each layer separately.
Opening the .3ds file in both MeshLab and Virtual CRASH 3, we found significant distortion to the various components, such as missing doors and wheels. This can occasionally happen with 3d model files, and will depend for the most part, on the process used by the model's builder to create the file.
Next, we viewed the .obj version of this mesh. Here we see a well-behaved mesh suitable for our purposes.
Note the number of polygon faces in this mesh is over 100,000. While not an extreme case, this polygon count can be reduced so as to ensure good system performance speed is maintained. You should be aiming for fewer than 50,000 faces, depending on your system resources and required level of detail.
Using the mouse scroll wheel, we can take a look at the vehicle interior to better understand the large polygon count. Here we see a very detailed interior, with various features meticulously laid out.
Does your model really need cup holders? Keep in mind, once you import your model into Virtual CRASH, you always have the option of deleting interior components to further reduce the polygon count.
The first strategy for reducing the polygon count is to decimate the full vehicle mesh. Go to “Remeshing, Simplification and Reconstruction > Quadratic Edge Collapse Decimation”
The settings shown below often work well, but you should experiment with these settings and see what works best for your model:
Here we see the result, with the polygon count reduced by a factor of two:
Here we see the interior polygons:
One can iterate and repeat the process until satisfied:
Once you are finished decimating your vehicle mesh, go to File > Export Mesh As, and save as a .3ds file. Note, the maximum number of vertices a 3ds file can have is about 64,000, so this will place a natural upper limit on the number faces. There is no such limit if you export to .dxf format, which of course is another option.
As usual, drag and drop your .3ds file into your Virtual CRASH workspace. In this case, the vehicle isn’t oriented properly for the .vcm export step.
The fastest way to properly orient the vehicle is to first select and import a random vehicle from the vehicle database. This will show you the proper orientation within your workspace. Here we see our custom model was imported rotated 90 degrees in roll and 180 degrees in yaw the wrong way. This is easily fixed.
Ensure your model is positioned at (x,y) = (0,0) and that it’s x-axis is pointing along yaw = 0 degrees.
Once this is done, you can carry on with the standard procedure of formatting the mesh for use in Virtual CRASH as described in Chapter 7 of the User’s Guide.
If you need a little extra help creating custom vehicles for your case, visit our partners at CrashAnimationStudios.com.
© 2020 Virtual CRASH, LLC. All Rights Reserved