# Can't get Masks to Work

**URL:** <https://forums.unrealengine.com/t/cant-get-masks-to-work/1906270>\
**Category:** Asset Creation\
**Tags:** realityscan, mask, question\
**Created:** [June 17, 2024, 12:23pm UTC](https://forums.unrealengine.com/t/cant-get-masks-to-work/1906270 "2024-06-17T12:23:55Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![EccentricChris](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EccentricChris](https://forums.unrealengine.com/u/EccentricChris)\
**Post date:** [June 17, 2024, 12:23pm UTC](https://forums.unrealengine.com/t/cant-get-masks-to-work/1906270/1 "2024-06-17T12:23:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![OndrejTrhan](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ondrejtrhan/32/906565_2.png) [@OndrejTrhan](https://forums.unrealengine.com/u/OndrejTrhan)\
**Post date:** [June 18, 2024, 9:05am UTC](https://forums.unrealengine.com/t/cant-get-masks-to-work/1906270/2 "2024-06-18T09:05:09Z")

</div>

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](https://rchelp.capturingreality.com/en-US/tools/imglayers.htm)?

---

<div class="post-metadata">

**Author:** ![EccentricChris](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EccentricChris](https://forums.unrealengine.com/u/EccentricChris)\
**Post date:** [June 18, 2024, 9:30am UTC](https://forums.unrealengine.com/t/cant-get-masks-to-work/1906270/3 "2024-06-18T09:30:37Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![OndrejTrhan](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ondrejtrhan/32/906565_2.png) [@OndrejTrhan](https://forums.unrealengine.com/u/OndrejTrhan)\
**Post date:** [June 18, 2024, 9:34am UTC](https://forums.unrealengine.com/t/cant-get-masks-to-work/1906270/4 "2024-06-18T09:34:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![EccentricChris](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EccentricChris](https://forums.unrealengine.com/u/EccentricChris)\
**Post date:** [June 18, 2024, 10:29am UTC](https://forums.unrealengine.com/t/cant-get-masks-to-work/1906270/5 "2024-06-18T10:29:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![OndrejTrhan](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ondrejtrhan/32/906565_2.png) [@OndrejTrhan](https://forums.unrealengine.com/u/OndrejTrhan)\
**Post date:** [June 18, 2024, 11:25am UTC](https://forums.unrealengine.com/t/cant-get-masks-to-work/1906270/6 "2024-06-18T11:25:33Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![EccentricChris](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EccentricChris](https://forums.unrealengine.com/u/EccentricChris)\
**Post date:** [June 18, 2024, 12:44pm UTC](https://forums.unrealengine.com/t/cant-get-masks-to-work/1906270/7 "2024-06-18T12:44:40Z")

</div>

> [@OndrejTrhan](#):
>
> I suppose this: (…)\WORKING\2.Processed\layers\_mask should be more like (…)\WORKING\2.Processed\ \_mask

> 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](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/6/2/2623c39e5a983e880c84edde71fb13a68d19f69a.png)

**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.

---

<div class="post-metadata">

**Author:** ![OndrejTrhan](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ondrejtrhan/32/906565_2.png) [@OndrejTrhan](https://forums.unrealengine.com/u/OndrejTrhan)\
**Post date:** [June 18, 2024, 3:11pm UTC](https://forums.unrealengine.com/t/cant-get-masks-to-work/1906270/8 "2024-06-18T15:11:45Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![EccentricChris](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EccentricChris](https://forums.unrealengine.com/u/EccentricChris)\
**Post date:** [June 18, 2024, 3:26pm UTC](https://forums.unrealengine.com/t/cant-get-masks-to-work/1906270/9 "2024-06-18T15:26:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![OndrejTrhan](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ondrejtrhan/32/906565_2.png) [@OndrejTrhan](https://forums.unrealengine.com/u/OndrejTrhan)\
**Post date:** [June 18, 2024, 7:51pm UTC](https://forums.unrealengine.com/t/cant-get-masks-to-work/1906270/10 "2024-06-18T19:51:11Z")

</div>

About the reset: [Réinitialiser - Raccourci - #2 by OndrejTrhan](https://forums.unrealengine.com/t/reinitialiser-raccourci/1904522/2)  
After reset you can try process your data again. If everything is correct, then it should work.

---

<div class="post-metadata">

**Author:** ![EccentricChris](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EccentricChris](https://forums.unrealengine.com/u/EccentricChris)\
**Post date:** [June 25, 2024, 1:22pm UTC](https://forums.unrealengine.com/t/cant-get-masks-to-work/1906270/11 "2024-06-25T13:22:39Z")

</div>

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.

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/6/9/b69f00aa073f5a56a40b73fee7a54b4d577f8210.jpeg "How to 3D Scan All Sides of Objects - RealityCapture") ](https://www.youtube.com/watch?v=3mLBL7T-zgs&t=319s)

---

<div class="post-metadata">

**Author:** ![OndrejTrhan](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ondrejtrhan/32/906565_2.png) [@OndrejTrhan](https://forums.unrealengine.com/u/OndrejTrhan)\
**Post date:** [June 25, 2024, 2:15pm UTC](https://forums.unrealengine.com/t/cant-get-masks-to-work/1906270/12 "2024-06-25T14:15:30Z")

</div>

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](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/e/d/aed04d2de5826fbf3ff6f28018fe880d4a937e9f.png)  
then the name of the mask was:  
_KEN05921.exr.geometry.jpg.mask.jpg_  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/2/e/92e4ce7712f5212c47b564bddd9edf69b447be56.png)

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](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/e/2/fe262e488a2212ec65cea7006b6de4f992618fcd.png)

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/6/3/3636c50456cbe402a1220603ec894b602fec8243.png)

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.

---

<div class="post-metadata">

**Author:** ![EccentricChris](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EccentricChris](https://forums.unrealengine.com/u/EccentricChris)\
**Post date:** [June 26, 2024, 10:24am UTC](https://forums.unrealengine.com/t/cant-get-masks-to-work/1906270/13 "2024-06-26T10:24:03Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![OndrejTrhan](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ondrejtrhan/32/906565_2.png) [@OndrejTrhan](https://forums.unrealengine.com/u/OndrejTrhan)\
**Post date:** [June 26, 2024, 11:09am UTC](https://forums.unrealengine.com/t/cant-get-masks-to-work/1906270/14 "2024-06-26T11:09:44Z")

</div>

No, this is not possible to do in RealityCapture.  
For exporting masks you have only these options:  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/0/0/5003725275f404d184765167b346c77da1a5204d.png)

---

<div class="post-metadata">

**Author:** ![EccentricChris](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EccentricChris](https://forums.unrealengine.com/u/EccentricChris)\
**Post date:** [June 26, 2024, 3:18pm UTC](https://forums.unrealengine.com/t/cant-get-masks-to-work/1906270/15 "2024-06-26T15:18:15Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![OndrejTrhan](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ondrejtrhan/32/906565_2.png) [@OndrejTrhan](https://forums.unrealengine.com/u/OndrejTrhan)\
**Post date:** [June 27, 2024, 7:22am UTC](https://forums.unrealengine.com/t/cant-get-masks-to-work/1906270/16 "2024-06-27T07:22:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![EccentricChris](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EccentricChris](https://forums.unrealengine.com/u/EccentricChris)\
**Post date:** [July 3, 2024, 10:26am UTC](https://forums.unrealengine.com/t/cant-get-masks-to-work/1906270/17 "2024-07-03T10:26:17Z")

</div>

Thank your for all your help 🙂

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [August 2, 2024, 10:26am UTC](https://forums.unrealengine.com/t/cant-get-masks-to-work/1906270/18 "2024-08-02T10:26:46Z")

</div>

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