# How to apply mask to any actor?

**URL:** <https://forums.unrealengine.com/t/how-to-apply-mask-to-any-actor/1226812>\
**Category:** FX\
**Tags:** unreal-engine, question, Blueprint, CPP\
**Created:** [July 12, 2023, 7:32am UTC](https://forums.unrealengine.com/t/how-to-apply-mask-to-any-actor/1226812 "2023-07-12T07:32:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [July 12, 2023, 7:32am UTC](https://forums.unrealengine.com/t/how-to-apply-mask-to-any-actor/1226812/1 "2023-07-12T07:32:02Z")

</div>

How to apply mask to any actor?

If I want to make any actor invisible when they go into a Volume or Collider.

Is there a generic way to apply the mask? Or is there another method to get it?

In other words, it should work with all types of actors.  
But without editing the original material of the actors.(For obvious reasons. Because they can be hundreds of different actors. That’s why modifying the material of each one is not an option).

Thank you very much!!

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [July 12, 2023, 7:55am UTC](https://forums.unrealengine.com/t/how-to-apply-mask-to-any-actor/1226812/2 "2023-07-12T07:55:13Z")

</div>

Use the ‘hidden in game’ node 🙂

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/c/c/0cc9b6b1abd6406cfa55676e1cdc91c01cb6f4cd.png)

![hidden](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/a/2/fa265394f06b341995979de15aff124237dc9dab.gif)

---

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [July 12, 2023, 11:03am UTC](https://forums.unrealengine.com/t/how-to-apply-mask-to-any-actor/1226812/3 "2023-07-12T11:03:47Z")

</div>

Hi @ClockworkOcean

From your answer I assume that it is not possible to apply a mask in a generic way.

I will use your method for this specific case because it is a thousand times easier than modifying the original materials.

But it’s a shame because with the effect of the mask it would be more spectacular.

I guess it’s not possible to have everything in this world.

Thank you very much for your help!! ❤

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [July 12, 2023, 11:49am UTC](https://forums.unrealengine.com/t/how-to-apply-mask-to-any-actor/1226812/4 "2023-07-12T11:49:58Z")

</div>

It may be possible to do something else. Are you expecting a kind of fade or crossover as the objects intersect?

I think, that would need to be implemented in the material of the actor that disappears, which is specifically not what you want.

For instance, this

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/0/2/10216ddfc41d03e02dac7a054f9339c273dac4da.jpeg "UE4 Object Mask l Unreal Engine 4.26 (Tutorial)") ](https://www.youtube.com/watch?v=wJgT9s_SQaU)

Although it looks like the box is making another mesh invisible, it’s actually happening in the material of the mesh.

---

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [July 12, 2023, 12:05pm UTC](https://forums.unrealengine.com/t/how-to-apply-mask-to-any-actor/1226812/5 "2023-07-12T12:05:30Z")

</div>

Yes, exactly, that was the idea at first.

But the problem is precisely that. Implementing that effect in each material of each actor is too much work, I think it’s not worth it.

I also think that it violates my first law of programming (you will not repeat code and you will always use inheritance and polymorphism). 😄

So I think your example is the best solution. 👌🏾

Thank you so much!! ❤

---

<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 11, 2023, 12:05pm UTC](https://forums.unrealengine.com/t/how-to-apply-mask-to-any-actor/1226812/6 "2023-08-11T12:05:53Z")

</div>

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