# \[Help\] Sampling a virtual textures is currently not supported when connected to the Opacity Mask material attribute

**URL:** <https://forums.unrealengine.com/t/help-sampling-a-virtual-textures-is-currently-not-supported-when-connected-to-the-opacity-mask-material-attribute/473719>\
**Category:** Asset Creation\
**Tags:** Virtual-Texturing, error-compile, opacity, unreal-engine, Shaders, question\
**Created:** [November 2, 2020, 1:03am UTC](https://forums.unrealengine.com/t/help-sampling-a-virtual-textures-is-currently-not-supported-when-connected-to-the-opacity-mask-material-attribute/473719 "2020-11-02T01:03:53Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![TWCOAO](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TWCOAO](https://forums.unrealengine.com/u/TWCOAO)\
**Post date:** [November 2, 2020, 1:03am UTC](https://forums.unrealengine.com/t/help-sampling-a-virtual-textures-is-currently-not-supported-when-connected-to-the-opacity-mask-material-attribute/473719/1 "2020-11-02T01:03:53Z")

</div>

Hi, Im new in UE4, have a big problem while I connected to opacity channel, log showed up error message:

 ![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/8/5/e8526fd02e6425ae18b7a726d838aaf71bd339ed.png)

**^^[SM5] Sampling a virtual textures is currently not supported when connected to the Opacity Mask material attribute^^**

Mask sample type was set to Virtual Linear Colour as well as ticked off sRGB. I literally don’t know what I did wrong…

Please advise!!!

---

<div class="post-metadata">

**Author:** ![NeoEngine](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NeoEngine](https://forums.unrealengine.com/u/NeoEngine)\
**Post date:** [March 5, 2021, 7:41am UTC](https://forums.unrealengine.com/t/help-sampling-a-virtual-textures-is-currently-not-supported-when-connected-to-the-opacity-mask-material-attribute/473719/2 "2021-03-05T07:41:07Z")

</div>

Hi. in the “Material Expression Texture Base” set the “Sampler Type” to Color and in the properties of the texture uncheck “Virtual Texture Streaming”.

---

<div class="post-metadata">

**Author:** ![Paul\_Hamblin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Paul\_Hamblin](https://forums.unrealengine.com/u/Paul_Hamblin)\
**Post date:** [March 25, 2022, 9:36am UTC](https://forums.unrealengine.com/t/help-sampling-a-virtual-textures-is-currently-not-supported-when-connected-to-the-opacity-mask-material-attribute/473719/3 "2022-03-25T09:36:48Z")

</div>

If you have UDIM and set it to Virtual Texture streaming it won’t recognise the other UV tiles. Also it gave me error when I tried to put as a sampler type color

---

<div class="post-metadata">

**Author:** ![PledgedRanger](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pledgedranger/32/1039255_2.png) [@PledgedRanger](https://forums.unrealengine.com/u/PledgedRanger)\
**Post date:** [August 12, 2023, 9:38pm UTC](https://forums.unrealengine.com/t/help-sampling-a-virtual-textures-is-currently-not-supported-when-connected-to-the-opacity-mask-material-attribute/473719/4 "2023-08-12T21:38:18Z")

</div>

I have the Same Exact Issue migrating my materials from UEFN and using an ms preset as a parent to my main surface material in UEFN. Any Help Appreciated.

 ![UnrealEngine5UEF Error _ BubbleBunz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/7/3/073d8d0a305fbbf8a272a9583af5c0a04e506dde.jpeg)

---

<div class="post-metadata">

**Author:** ![XxpiingyxX](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@XxpiingyxX](https://forums.unrealengine.com/u/XxpiingyxX)\
**Post date:** [August 15, 2023, 7:20am UTC](https://forums.unrealengine.com/t/help-sampling-a-virtual-textures-is-currently-not-supported-when-connected-to-the-opacity-mask-material-attribute/473719/5 "2023-08-15T07:20:28Z")

</div>

> [@PledgedRanger](#):
>
> elp Appreciated.

I just had the same exact issue when migrating. You have to go to you project settings → Rendering → Virtual Texture and check the box “Enable virtual textures for opacity mask” to be true. 🙂

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/4/4/2442a1302bbc151ed965b08e946247e64a39b80d.png)

---

<div class="post-metadata">

**Author:** ![TON14](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TON14](https://forums.unrealengine.com/u/TON14)\
**Post date:** [September 19, 2023, 1:24pm UTC](https://forums.unrealengine.com/t/help-sampling-a-virtual-textures-is-currently-not-supported-when-connected-to-the-opacity-mask-material-attribute/473719/6 "2023-09-19T13:24:40Z")

</div>

Second solution!  
Use Material attributes!

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/a/5/7a5ad1d7bd106adf25dae97652a5aebef4c66292.png)

---

<div class="post-metadata">

**Author:** ![PledgedRanger](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pledgedranger/32/1039255_2.png) [@PledgedRanger](https://forums.unrealengine.com/u/PledgedRanger)\
**Post date:** [October 18, 2023, 9:28pm UTC](https://forums.unrealengine.com/t/help-sampling-a-virtual-textures-is-currently-not-supported-when-connected-to-the-opacity-mask-material-attribute/473719/7 "2023-10-18T21:28:11Z")

</div>

In UEFN SorryI meant in UEFN

---

<div class="post-metadata">

**Author:** ![YYTSSLN](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/yytssln/32/547866_2.png) [@YYTSSLN](https://forums.unrealengine.com/u/YYTSSLN)\
**Post date:** [August 12, 2024, 11:29am UTC](https://forums.unrealengine.com/t/help-sampling-a-virtual-textures-is-currently-not-supported-when-connected-to-the-opacity-mask-material-attribute/473719/8 "2024-08-12T11:29:48Z")

</div>

it work,thanks.After the project starts ray tracing, some vegetation materials are lost and an error is reported
