Can't get Masks to Work

Hi All

I’m assuming its something I am doing wrong, but despite following along with the Reality Capture video tutorial I can’t get masks to work.

I have a set of images of an object which I have turned over to capture both sides. I import those images, align, filter out the base, export the depth and mask using the default settings and place them in the same folder as the images. I then repeat for the other side.

All good so far, however when I try to copy the folder into a new project it doesn’t appear to link the images correctly and also imports some of the masks as images into their own right, rather than as a linked mask. I try disabling these images and running the alignment and then get the error “Unsupported Camera Model”, which I don’t if I try to align the original images without creating masks

Can anyone point out what I might be doing wrong, or point me in the direction of any other tutorials in case it is just me misinterpreting the workflow in RealityCapture’s video?

Thanks

Hello @EccentricChris,
is the naming convention correct for the masks? Are the masks in the same folder as the images? Can you check also this Help page if you missed something:
RealityCapture Help?

Thank you for your advice, I’ve narrowed it down to the naming as I thought just keeping it to the export default worked.

I’ve gone to the help page linked and given I have 180 images I am going to want to do the folder renaming but the help page isn’t hugely clear. How do you go about renaming the folders so the masks then work?

Folder with masks should be called _mask and the masks inside has the same name as the original image files, ike:

  • Images used for alignment and meshing:
    …\layers\ _geometry\DSC_0001.jpg
  • Images containing a mask:
    …\layers\ _mask\DSC_0001.png

Unfortunately that hasn’t worked. I have exported via the depth and layer mask into a folder named “_mask” and have a “_texture” (for 16bit tiffs) and “_geometry” (for the RC converted 8bit tiffs).

Then when I drag the texture folder into RealityCapture and inspect an image no masking layer appears, if I drag all three folder then it again adds the other files as images rather than linking them

Just for an example on my current file naming

Texture:
20240513_X-001

Geometry:
20240513_X-001

Mask:
20240513_X-001.jpg.depth.exr
20240513_X-001.jpg.mask

And an example of my file path

(…)\WORKING\2.Processed\layers_mask

It seems like you are doing something wrong.
In the folder named _mask, do the masks have the same name as masks? Or with the mask extension? Is _texture and _geometry working for you?

In your example you are not following the naming convention I sent you before.

I suppose this: (…)\WORKING\2.Processed\layers_mask should be more like (…)\WORKING\2.Processed\ _mask

and if you have masks file there, then it should be named 20240513_X-001.exr.

If you want to use this file name: 20240513_X-001.jpg.mask, then it should be in the same folder as original images and imported into new project in one step.

Blockquote

I have tried both these formats and that hasn’t made a difference

“and if you have masks file there, then it should be named 20240513_X-001.exr.”

When I use the default RC export setting it is creating the “depth.exr” and “jpg.mask” and I appear to be unable to change that in the Depth and Mask Export persona settings. See below for settings used. (Note Export Location has been deliberately changed for data security reasons).

image

If you want to use this file name: 20240513_X-001.jpg.mask, then it should be in the same folder as original images and imported into new project in one step.

This was the way I attempted to import the images into a new project to begin with. This caused my original problem of brining the mask files in as images rather than a linked layer to the texture/geometry images.

I am sorry for that. Of course, the mask should have PNG format, not ERX.
The mentioned workflow should work. Can you provide the application reset and then try to import the images and masks again?

Apologies, what do you mean by “Can you provide the application reset and then try to import the images and masks again?”

About the reset: Réinitialiser - Raccourci - #2 by OndrejTrhan
After reset you can try process your data again. If everything is correct, then it should work.

Thank you for your continuing help @OndrejTrhan

Unfortunately that didn’t help

However what I was finally able to work out was that it was to do with the geometry files. When Importing 16Bit Tiffs that RC converts into geometry files and then creating the masks I get the error described as above.

However if I convert and import the images as 8 but JPGS prior to RC import (and thus don’t need to go through the RC geometry conversion) than the mask workflow in the below video works.

So my follow up question is, is there a way to get masks to work when using RC to convert a set of geometry files, if so is there any documentation for this workflow. Or if i want to use these higher quality images for texturing am I unable to use the Mask feature.

Hi @EccentricChris,
after transforming the images to 8bit using RealityCapture, are you changing the name of the files?
I tried this, and the name of the file was:
KEN05921.exr.geometry.jpg
image
then the name of the mask was:
KEN05921.exr.geometry.jpg.mask.jpg
image

For this case the images were read separately after import.

I suppose this could be a problem as the name needs to be shortened to a proper way (only one layer addition is accepted): KEN05920.jpg or KEN05920.exr.geometry.jpg for geometry layer and to KEN05920.mask.jpg or KEN05920.exr.mask.jpg for mask layer.
And original image can be used as texture layer and named: KEN05920.exr.texture.exr
image

image

For formats named like this it works for importing them all together.

I suppose there is no other documentation as Help and using proper naming conventions.

That does look like the problem " .exr.geometry.jpg.mask.jpg" matches the file extension I have, and the problem you have replicated was the same as mine.

One final question then as I can’t obviously see in the help documentation, as I am importing a large amount of files, is there a way to change the file extension at the export stage from RC, or will I have to either do it manually or using an alternative renaming software (e.g. AntRenamer)

No, this is not possible to do in RealityCapture.
For exporting masks you have only these options:
image

So in practice then without the use of additional software it is not feasible to use masks when using the 16Bit texture files 8bit geometry file workflow?

With proper naming convention it is possible to use the masks also for 16bit images.
But after convert from 16 to 8bit they need to be renamned.

Thank your for all your help :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.