openphotogrammetry / meshroomcl

MeshroomCL: An OpenCL implementation of photogrammetry with the Meshroom interface
Other
169 stars 8 forks source link

Why is meshroom exporting so many image textures? #36

Closed Logancolon1 closed 2 years ago

Logancolon1 commented 2 years ago

I was just wondering if this is supposed to happen. After all of the processing was done, I noticed that my model has a ton of textures. I scrolled to the bottom and I had counted 729 textures! Everything about the model looks fine, but when I go to upload a scan to sketchfab as a zip file, it says that the file is too large (because of the 729 textures). Is there a way that I can reduce the number of texture files? image

revisionarian commented 2 years ago

Hi @Logancolon1, thanks for trying out MeshroomCL! We realize that in some cases, MeshroomCL will generate many texture files. We plan to release a new version of MeshroomCL soon that will allow the user to specify how many texture files they want to output, and will consolidate the many small textures into a few larger ones.

In the meantime, there are many workarounds that you can use to reduce the number of texture files. Probably the easiest thing to do is to apply a smoothing filter to the mesh immediately before texturing. You can do this in MeshroomCL by changing the "Smoothing Iterations" attribute in the MeshFiltering node from 0 to 5, for example. This operation will smooth away tiny, bumpy noise in your mesh, so that fewer individual texture patches are necessary to color the model. I made a model with MeshroomCL earlier today, for example, and changing the "Smoothing Iterations" from 0 to 5 reduced the number of texture files from 189 to 26. Changing the "Smoothing Iterations" to 10 resulted in 15 texture files, and decimating then smoothing resulted in only 7 texture files.

From your screenshot, it looks like you might be a Blender user. If you want, you can edit the 3D mesh produced by the MultiviewStereoCL or MeshFiltering nodes in MeshroomCL in Blender (smoothing, decimating, filling holes, etc.), and then put that edited mesh back in place for the TexturingCL step.

If you feel that the texture files produced by MeshroomCL are too large, you can always reduce the resolution of the PNG files using any image editor (Photoshop, GIMP, etc.). For example, it is simple to batch process the texture files and scale them all by 50% to reduce the total texture data by about 25%.

Let us know if these solutions work for you, or if you have further questions. If you want to send us your output 3D model file and textures, we can consolidate them for you, as the next version of MeshroomCL will do.

Logancolon1 commented 2 years ago

Changing the smoothing iterations worked perfectly! Thank a lot for the advice!