# UDIM Mask method using IF statement Stops working after 4th tile

**URL:** <https://forums.unrealengine.com/t/udim-mask-method-using-if-statement-stops-working-after-4th-tile/2475733>\
**Category:** Asset Creation\
**Tags:** unreal-engine, question\
**Created:** [April 25, 2025, 2:46pm UTC](https://forums.unrealengine.com/t/udim-mask-method-using-if-statement-stops-working-after-4th-tile/2475733 "2025-04-25T14:46:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oriphen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Oriphen](https://forums.unrealengine.com/u/Oriphen)\
**Post date:** [April 25, 2025, 2:46pm UTC](https://forums.unrealengine.com/t/udim-mask-method-using-if-statement-stops-working-after-4th-tile/2475733/1 "2025-04-25T14:46:04Z")

</div>

Hello,

Im using a UDIM for a skeletal mesh.  
The face has 7 different textures.

And I’m masking each tile out in a single material to apply different effects like hue shifting, or using vector colour for whole tiles etc.

I’m just doing IF statements against the isolated U and V channels in texcoord as the alpha to a lerp.

Its working great.

I get to tile number 5 which is 1011 Or (U0, V1)  
The first tile in the next row.

I apply the format but this time I cant get the mask to show up.

I know The UV and textures are fine because if I just plug the texture straight in to base colour everything is where it should be.

Can someone elude to me what I’m not understanding?

I have thought about UV wrapping but not sure how or where this is applied or how it alters UV Space to apply maths to it.

This is a healthy mask

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/1/b/31b0cbd8f1fd0bb9e98ff1c0cb55e5769f07667a.jpeg)

This is the problem mask the Eyelashes should be White

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/f/d/efd11eba8dd0bc817b76a9b6176764f5b83267d3.jpeg)  
Here is how the mask is achieved.  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/a/8/da8c6b1835f7a021c0f13cd86c0ede0605b7f6df.png)

The values in the IF are saying anything before 0 and after 1 in U space should be 0 and anything in between is 1

Then anything before 1 and after 2 are 0, in V space and anything between 1 and 2 are 1.

Which is visualized _poorly_ like this:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/e/2/7e27b69b7efc7efe071d4f1e5759126d7eb0b567.png)

---

<div class="post-metadata">

**Author:** ![Oriphen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Oriphen](https://forums.unrealengine.com/u/Oriphen)\
**Post date:** [April 26, 2025, 5:14am UTC](https://forums.unrealengine.com/t/udim-mask-method-using-if-statement-stops-working-after-4th-tile/2475733/2 "2025-04-26T05:14:22Z")

</div>

I have discoved the UVs were flipped somehow in the UV map for the vertices in tile 1011.  
Putting an 1-x node after tex coord has solved the issue but I will go back into editor and Fix the vertices in the UV later. So this material can be reused.

---

<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:** [May 26, 2025, 5:14am UTC](https://forums.unrealengine.com/t/udim-mask-method-using-if-statement-stops-working-after-4th-tile/2475733/3 "2025-05-26T05:14:26Z")

</div>

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