alicevision / Meshroom

3D Reconstruction Software
http://alicevision.org
Other
11.06k stars 1.08k forks source link

[bug] Texture file is missing (Draft Meshing) #2292

Open freerafiki opened 8 months ago

freerafiki commented 8 months ago

Describe the bug We are using Draft Meshing to avoid using GPU (on a computer without GPU, so only choice). The reconstruction worked fine, the log is clear, yet the texture file is completely missing (nowhere to be found). The .mtl material file shows 3 texture maps and claim the textures are in texture_1001.png, texture_1002.png and texture_1003.png. These files are not there. The output path of the texturing node is correct (although it has texture_*.exr and not .png)

To Reproduce Steps to reproduce the behavior:

  1. Use Meshroom 2023.2.0 (it does not happen for example on 2021.1.0) on Windows (tested on Win 11, Laptop Surface Go, 8 GB RAM)
  2. Use Draft Meshing to avoid using GPU
  3. Reconstruct a scene (it happened for different scenes)
  4. Check Texturing folder (it's empty)
  5. Check log (everything seems to be fine)

Expected behavior I expected to see a texture file as output. Or at least some kind of error if the texture cannot be produced.

Screenshots screenshot Here the reconstruction and the texture path

Log

[12:07:59.922650][info] Load dense point cloud.
[12:07:59.973262][warning] Alembic LOAD: NO OBSERVATIONS_WITH_FEATURES: , mvg_visibilityFeatId: 0, mvg_visibilityFeatPos: 0, OBSERVATIONS_WITH_FEATURES flag: false
[12:08:00.143875][info] Found 2 image dimension(s): 
[12:08:00.143875][info]     - [3024x4032]
[12:08:00.143875][info]     - [4032x3024]
[12:08:00.493733][info] Overall maximum dimension: [4032x4032]
[12:08:00.493733][info] Load input mesh.
[12:08:01.356167][info] Convert dense point cloud into ref mesh
[12:08:01.507518][info] remapMeshVisibility based on triangles start.
[12:08:02.107950][info] remapMeshVisibility done.
[12:08:02.111292][info] Input mesh has no UV coordinates, start unwrapping (Basic)
[12:08:02.111292][info] Generating UVs (textureSide: 8192; padding: 5).
[12:08:02.111292][info] Creating texture charts.
[12:08:04.224552][info] Packing texture charts (138264 charts).
[12:08:04.960968][info] Finalize packed charts (2728 charts).
[12:08:04.973613][info] Creating texture atlases.
[12:08:04.989943][info]     - texture atlas 1
[12:08:05.027456][info] Filled with 1608 charts.
[12:08:05.029472][info]     - texture atlas 2
[12:08:05.030471][info] Filled with 301 charts.
[12:08:05.031475][info]     - texture atlas 3
[12:08:05.043026][info] Filled with 819 charts.
[12:08:05.172915][info] Unwrapping done.
[12:08:05.172915][info] Save C:/Users/Surface/Downloads/3D statua/MeshroomCache/Texturing/e947db5fa395a88492b4d6cf88434c12a8fd07e6\texturedMesh.obj mesh file
[12:08:07.407539][info] Save mesh to obj done.
[12:08:07.423304][info] Subdivide mesh.
[12:08:07.423304][info] nb pts init: 69549
[12:08:07.423304][info] nb tris init: 138264
[12:08:07.423304][info] nb points in refMesh: 69541
[12:08:07.423304][info] targetNbPts: 55632
[12:08:07.457516][info] No subdivision needed.
[12:08:07.457516][info] Number of triangle subdivisions: 0
[12:08:07.457516][info] updateAtlases
[12:08:07.543294][info] remapMeshVisibility based on triangles start.
[12:08:08.141312][info] remapMeshVisibility done.
[12:08:08.160215][info] Task done in (s): 8.243000

Desktop (please complete the following and other pertinent information):

Additional context I am teaching and the students are doing 3D reconstruction as a project. As the students do not have powerful GPUs, the Draft Meshing is a good alternative for them to get 3D model using open-source software. So the problem happened with 2 different students with two different computers (with same Windows and Meshroom versions), while last year (with older Meshroom version) it never happened and we got very good 3D reconstruction even with draft meshing. I am trying to test in my own computer, but on Linux with Meshroom 2021 everything works fine. I will download newer version and try to test it on Linux to add additional information. Thanks in advance!

cbentejac commented 8 months ago

Hi @freerafiki,

Thanks for reporting this issue.

I think your students and you ran into this problem which has been fixed in the latest release of Meshroom (2023.3.0).

We need to update the documentation you linked as it is outdated: the nodes have changed a lot since Meshroom 2021.1.0 and the PrepareDenseScene node is now needed for the texturing step to work correctly.

If you switch to Meshroom 2023.3.0, you can directly use the default "Photogrammetry Draft" pipeline: it has been updated to generate correctly the texture files. Otherwise, if you wish to remain on Meshroom 2023.2.0, the pipeline to build looks like this: photogdraft

(the "Photogrammetry Draft" pipeline in Meshroom 2023.2.0 lacks the PrepareDenseScene that fixes the issue)

Please let us know if that fixes it for you and your students!

freerafiki commented 8 months ago

Hi @cbentejac, thanks a lot for your quick answer. I looked through the issues but could not find the correct one you listed. This looks exactly the solution we needed. We will test and let you know as soon as possible!

freerafiki commented 8 months ago

Ok, so I got some feedback!

Thanks again, I see you added the scope:doc label, should I still close the issue or do you need it open for the documentation? For me it is solved and can be closed.

PS: If I find time I will try to help on the documentation side, but right now it's not the best moment!

natowi commented 8 months ago

@freerafiki thank you for the feedback. I updated the GH wiki but still have to add it to the documentation.