alicevision / Meshroom

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

Replacing images for texturing with a single image? #1711

Open RocketGoose opened 2 years ago

RocketGoose commented 2 years ago

I'm trying to follow a similar workflow as described here http://dlib.nyu.edu/awdl/isaw/isaw-papers/21/ (but using meshroom instead of metashape) where the base images for texturing are swapped with an RTI normal map.

I've tried this method https://github.com/alicevision/meshroom/wiki/Projected-Light-Patterns for swapping textures, but it requires the same number of images in the replacement image folder as the base images folder. I only have one image (the normal map) in the replacement folder so I can't figure out how to make this work.

Is there a method for this? I also tried tried filling the rest of the replacement folder with plain black images so there would be the correct number of them, but I got this error. image

fabiencastan commented 2 years ago

Yes, currently it requieres to have an image for each camera. But that's a good point, it could make sense to add an option for that.

In the meantime, you shoud be able to create an sfmData with only the pose that you want and use that to do the texturing. That's not user friendly to do it at all, but you have 2 options:

RocketGoose commented 1 year ago

Hi, I'm returning to this project again and any help would be appreciated! fabiencastan, thanks for the suggestion, It seems to be working but I'm running into a problem with texture atlases. The second texturing node is generating a single texture atlas while the original model has 4. As you can see bellow, the new texture doesn't line up with the UVs. I've sent my current node structure in case I'm doing something obviously wrong image image

RocketGoose commented 1 year ago

So as it turned out my node setup was wrong. I'm leaving a screenshot of the corrected version in case it helps anyone.

Some issues with this approach:

  1. The resulting mesh will be missing any geometry not visible in the cameras of the new camera init
  2. When there is lots of missing geometry the final texturing step crashes after saving the new mesh, but before creating the texture. I've actually been projecting several normal map from different directions to cover most of the model and it works when most of the model is covered and there is not much missing geometry. However, if I reduce coverage (number of images in the new camera init) there comes a point where the texturing step crashes.

image