openMVS icon indicating copy to clipboard operation
openMVS copied to clipboard

TextureMesh - Exporting GLB with specified path generates undesired image path

Open EliDavis3D opened this issue 1 year ago • 4 comments

Describe the bug

When running TextureMesh with a mvs file in a sub directory, and the flag--export-type set to GLB, the glb will re-use the subdirectory path to save the image to (but also fail to save the image)

So if I run the command:

TextureMesh.exe --input-file sub/folder/scene_dense_mesh.mvs --export-type glb --decimate 0.5

It will:

  1. Make a glb at: sub/folder/scene_dense_mesh_texture.glb, which is expected. a. That GLB will reference a image with the path: sub/folder/scene_dense_mesh_texture.png, which is unexpected, I would expect it to just use the path scene_dense_mesh_texture.png, and save it along side the glb.
  2. Create a folder structure that is sub/folder/sub/folder
  3. There is no image in sub/folder/sub/folder (or anywhere), which is unexpected

To Reproduce

TextureMesh.exe --input-file sub/folder/scene_dense_mesh.mvs --export-type glb --decimate 0.5

Expected behavior Create a glb and png in the folder sub/folder, glb references image that's in the same folder as it.

Screenshots Inspecting the GLB image

Desktop (please complete the following information):

  • Windows 10
  • Nov 28th build

EliDavis3D avatar Jun 26 '23 18:06 EliDavis3D

if you have a fix for this problem, pls make a PR a quick solution is to use:

TextureMesh.exe --input-file scene_dense_mesh.mvs --export-type glb --decimate 0.5 -w sub/folder/

cdcseacave avatar Jun 27 '23 05:06 cdcseacave

I tried the working-folder flag and the TextureMesh command exits immediately (and doesn't produce a log file). I imagine because the images in the mvs file are relative pathing and it can no longer find them in the new working dir, so I'm unable to confirm if that solution fixes it.

image

EliDavis3D avatar Jun 27 '23 13:06 EliDavis3D

u r not using the flag correctly; it is setting the working directory, so you do not have to set it to all params; in other words you have to delete it from the MVS scene path

cdcseacave avatar Jun 28 '23 06:06 cdcseacave

Oh gotcha. Changing that helped it progress some, but then the relative pathing issue hits now. So still unable to tell whether or not that fixes the GLB image pathing issue

image

EliDavis3D avatar Jun 28 '23 16:06 EliDavis3D