Set maximum size of 3D textured objects

Hi everyone, as maybe many of you will know the Sketchfab site allows you to share 3D models in an easy way. The free version is limited to objects up to 50 MB in size. I would like to know if there is a way in WebODM to set the resolution so that the maximum size of the .obj file and the tezture together do not exceed 50 MB.
I tried to reduce the “mesh-size” parameter with a consequent reduction in the size of the .obj file, but the texture size remains roughly unchanged and too large. Do you know how it can be done to reduce them?

1 Like

You can just use a program such as GIMP to resize the texture images (just keep the proportions).

1 Like

Thanks a lot, I didn’t know it was so easy! :slight_smile:

1 Like

Look to these tools for additional info on mesh manipulation:

Another thing to look at would be swapping out the PNGs for JPGs. The PLY is text, so it is as simple as a conversion to JPG, and replacing references to the PNG textures with JPG references. Those references are in the odm_textured_model_geo.mtl. So you could do as follows:

  1. Batch convert the PNGs to JPGs. Lots of easy ways to do this. On Windows, Irfanview has pretty easy-to-use batch functionality under the File menu.

  2. Edit the odm_textured_model_geo.mtl in your favorite text editor. Find and replace all the references to the PNGs and change them to the new JPG name, e.g. odm_textured_model_material0000_map_Kd.png becomes odm_textured_model_material0000_map_Kd.jpg, odm_textured_model_material0001_map_Kd.png becomes odm_textured_model_material0001_map_Kd.jpg, etc…

With default JPG settings in Irfanview, you might see a 70% reduction in size for the textures with no resolution change. You can probably get even better improvements, but that’s without any (noticeable) quality loss.


Thanks so much for sharing/posting this. It was a major help!

1 Like