MeshLab is an open-source, advanced 3D mesh processing software system.
This article will show you how to reduce the polygon/face count of a model for better performance on Sketchfab. This is especially relevant for high-resolution 3D scans/maps and heavy CAD files.
Open your model in MeshLab. For example, drag and drop the OBJ file from your 3D scan into the window or go to File → Import Mesh... and navigate to your file.
Go to Filters → Remeshing, Simplification and Reconstruction → Simplification: Quadric Edge Collapse Decimation (with texture) (if you're using a texture).
Choose a Target number of faces. Try 1 million, or 500,000 if the model quality doesn't deteriorate too much. Then click Apply.
When it finishes, Export mesh as... (e.g. OBJ) and make sure the TexCoord options are enabled if you're using a texture.
Then, you can upload the new mesh to Sketchfab.
Comments
11 comments
Thanks James for the article - this helped me successfully to reduce my image size - however a couple of pointers for anyone else wishing to reduce the file sizes for uploading to Sketchfab and avoid the minor difficulties I encountered :-
1. the version of Meshlab you used is Meshlab_64bitv1.3.3 - the latest version is Meshlab 2016.12 and the menu entries are slightly different, which initially stumped me - as there is no entry in Meshlab 2016.12 of
"Filters → Remeshing, Simplification and Reconstruction → Quadric Edge Collapse Decimation (with texture)"
the menu entry is
"Filters → Remeshing, Simplification and Reconstruction → Simplication : Quadric Edge Collapse Decimation (with texture)"
which isn't a simplication if you are looking for a menu entry beginning with Q .... !
When saving my model as an obj the file size reduced from a dae at 74+ MB to an obj at 26+ MB with the creation of an .obj.mtl config file. The mtl file references the original texture file used by my dae model - which was a png file of 49+ MB. I converted the texture.png to texture.jpg which was only 3+ MB and edited the .mtl file to refer to texture.jpg. So a total change in data size - model + texture from 120+ MB to 30+ MB
cheers, Jonno - vk2emq
Thanks for letting me know! I'll find some time to update this page with more recent screenshots and menu entries.
Thanks for posting this! Is it possible to decimate only selected portions of a 3D scene? For example, when scanning parks and outdoor spaces with drone imagery, a HUGE portion of the face count comes from trees and foliage, which usually aren't the key objects of interest. If I could just select certain objects to decimate, I imagine it would help keep the rest of the scene looking tip-top.
Yes, you should be able to use the Select Faces tool to select the portion of your scene you want to decimate, and then go through the decimation filter process as usual.
Thanks James for the reply!
Hi James, Interesting thread to read, I'm new to meshlab so just getting up to speed.
I've been producing some stl files from Catia to import into a simulation package. Unfortunately the sim package struggles with the high aspect ratio triangles that are produced on planar and straight extruded surfaces. Can you tell me if it's possible to re-mesh the stl with a maximum triangle edge length of 10mm (currently around 100mm)?
Thanks in advance,
Andy
Hi Andy,
Meshlab has quite a lot of decimation functions in the Filters → Remeshing, Simplification and Reconstruction menu. I'm no expert, but you could try some of the others to see what works best for these types of models?
It really helped to reduce the size and improve the performance, but it created a lot of new vertices which are placed in infinity... how could I remove them?
Wow that's strange. Maybe select all vertices, de-select the good ones in the middle, and delete the remainder?
I am processing hundreds of images using the same filter. Is there a way to do it automatically?
@QuingLi - you can probably do it using MeshLab's command line interface: https://github.com/cnr-isti-vclab/meshlab/blob/master/src/meshlabserver/meshlabserver.txt
Please sign in to leave a comment.