# Landscape Grey Sectors While Painting

**URL:** <https://forums.unrealengine.com/t/landscape-grey-sectors-while-painting/39392>\
**Category:** Feedback & Requests\
**Tags:** unreal-engine\
**Created:** [August 22, 2015, 7:25pm UTC](https://forums.unrealengine.com/t/landscape-grey-sectors-while-painting/39392 "2015-08-22T19:25:08Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maximum-Dev](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Maximum-Dev](https://forums.unrealengine.com/u/Maximum-Dev)\
**Post date:** [August 22, 2015, 7:25pm UTC](https://forums.unrealengine.com/t/landscape-grey-sectors-while-painting/39392/1 "2015-08-22T19:25:08Z")

</div>

Hello,

Epic is probably aware of this bug because it’s been around since the start.  
But I’m just making a thread for it maybe it will get sorted out.

Summary:  
When painting landscape layers there is this grey square bug happening randomly on sectors of the landscape we paint.  
It happens almost all the times when having more than 1-3 really simple layers.

Tried:  
Painting the entire landscape with each layer individually, then trying to paint and mix them as we want. Still the square happens, less, but still there.

> **[Gray sectors while painting landscape](https://forums.unrealengine.com/showthread.php?80276-Gray-sectors-while-painting-landscape)**
>
> This issue is really hindering my progress. I’ve tried painting over the whole landscape first to get some layer data, and then painting on the textures I want, but it keeps just graying out in chunks and won’t stop. How do I fix this issue?

> **[Landscape painting squares](https://forums.unrealengine.com/showthread.php?80242-Landscape-painting-squares)**
>
> Hello, There’s a bug in layer painting when we have a number layers painting on top of each other. I have 12 layers there and just to make sure I did fully paint the terrain 12 times with every layer but this bug always happens. And my client is...

> **[\[Poll\] - Affordable Landscapes](https://forums.unrealengine.com/showthread.php?78569-Infinite-Affordable-Landscapes-Make-your-requests&p=361684&viewfull=1#post361684)**
>
> Hello dear Unreal Engineers! We’re proud to present you the most popular landscape package available on the Marketplace. Aiming to address all your landscape needs! Purchase here\] Note: Due to heavy load of content I have broken everything down...

And I can probably paste a hundred other links where people have the similar problem.

[![](https://i.imgflip.com/px7kt.jpg) ](https://i.imgflip.com/px7kt.jpg)

Can we get a little attention on this?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_5cee3492](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_5cee3492](https://forums.unrealengine.com/u/anonymous_user_5cee3492)\
**Post date:** [August 23, 2015, 10:02am UTC](https://forums.unrealengine.com/t/landscape-grey-sectors-while-painting/39392/2 "2015-08-23T10:02:24Z")

</div>

It’s a problem with too many textures samples (more than 16) for certain components, because, as far as I understand, UE4 compiles landscape material separtely per component given the amount of different layers. If you paint on a component all the layers (on different places) you will probably end with shader compiling (unless you have already done it) and if there are a lot of samples, including base color, masks, roughness, displacement or normal, it won’t compile because it will exceed 16 samples. If you check console you should see some errors. Reducing samples, removing normals when they are superflus or reducing the amount of layers can be a good start 🙂

---

<div class="post-metadata">

**Author:** ![Maximum-Dev](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Maximum-Dev](https://forums.unrealengine.com/u/Maximum-Dev)\
**Post date:** [August 23, 2015, 4:35pm UTC](https://forums.unrealengine.com/t/landscape-grey-sectors-while-painting/39392/3 "2015-08-23T16:35:44Z")

</div>

Thanks for the explanation but with less samplers than 16 too.  
I CAN reproduce it where it happens with 3-4 diffuse/normal map only. (No roughness)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_5cee3492](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_5cee3492](https://forums.unrealengine.com/u/anonymous_user_5cee3492)\
**Post date:** [August 24, 2015, 10:03am UTC](https://forums.unrealengine.com/t/landscape-grey-sectors-while-painting/39392/4 "2015-08-24T10:03:00Z")

</div>

How lany different layers do you have?

---

<div class="post-metadata">

**Author:** ![Maximum-Dev](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Maximum-Dev](https://forums.unrealengine.com/u/Maximum-Dev)\
**Post date:** [August 24, 2015, 10:18am UTC](https://forums.unrealengine.com/t/landscape-grey-sectors-while-painting/39392/5 "2015-08-24T10:18:18Z")

</div>

^ Had a typo in previous post.

> [@](#):
>
> I CAN reproduce it where it happens with 3-4 diffuse/normal map only. (No roughness)

Ever since I started I’ve been working somewhere between 2 to 12 layers and the bug was always there on every map I worked on.

---

<div class="post-metadata">

**Author:** ![Chosker](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/chosker/32/710746_2.png) [@Chosker](https://forums.unrealengine.com/u/Chosker)\
**Post date:** [August 28, 2015, 7:50am UTC](https://forums.unrealengine.com/t/landscape-grey-sectors-while-painting/39392/7 "2015-08-28T07:50:23Z")

</div>

> [@Maximum-Dev;362403](#):
>
> Thanks for the explanation but with less samplers than 16 too.  
> I CAN reproduce it where it happens with 3-4 diffuse/normal map only. (No roughness)

so is it 3 or 4? and do you have any other textures in your material? like a general overlay or something?  
with 4 layers using only diffuse+normal it really should be fine, but I suspect you’re using more than just this.

---

<div class="post-metadata">

**Author:** ![Maximum-Dev](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Maximum-Dev](https://forums.unrealengine.com/u/Maximum-Dev)\
**Post date:** [August 28, 2015, 8:38am UTC](https://forums.unrealengine.com/t/landscape-grey-sectors-while-painting/39392/8 "2015-08-28T08:38:45Z")

</div>

> [@Chosker;366448](#):
>
> so is it 3 or 4? and do you have any other textures in your material? like a general overlay or something?  
> with 4 layers using only diffuse+normal it really should be fine, but I suspect you’re using more than just this.

Not really. I will repro the issue and attach an example level when I have time.  
But after all, one should not simply limit their creativity just to prevent a bug right? you should be able to have like 10 different layers or even more. It’s the compiling bug thats needed to get fixed, not reducing the texture maps and keeping them around 4-5 at most.

---

<div class="post-metadata">

**Author:** ![Chosker](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/chosker/32/710746_2.png) [@Chosker](https://forums.unrealengine.com/u/Chosker)\
**Post date:** [August 31, 2015, 4:50pm UTC](https://forums.unrealengine.com/t/landscape-grey-sectors-while-painting/39392/10 "2015-08-31T16:50:20Z")

</div>

> [@Maximum-Dev;366462](#):
>
> Not really. I will repro the issue and attach an example level when I have time.  
> But after all, one should not simply limit their creativity just to prevent a bug right? you should be able to have like 10 different layers or even more. It’s the compiling bug thats needed to get fixed, not reducing the texture maps and keeping them around 4-5 at most.

it’s not a bug per se, it’s a graphics hardware limitation (texture sampler limit) coupled up with a rather naive (or not powerful/flexible enough) implementation of terrain texturing.

the problem is the way it handles its texturing.  
I don’t know how it is in other modern game engines, but traditionally the method was to use vertex colors’ RGBA channels as texture blending channels. this means you could only ever paint 4 “layers” of textures.  
UE3’s landscape system allows painting more layers because it uses multiple splat textures’ RGBA (every 4 painted layers use a new splat texture, so 12 layers already mean you use 3 splat textures) - every landscape vertex is mapped to one pixel in the splat texture.

in the traditional method, some engines were able to blend quite a larger number of textures across the whole terrain (but still, always a very small amount of textures blended per vertex). I can only guess what kind of trickery they used to overcome the texture sampler hardware limitations but I don’t know for sure how it was done. I know many games have quite more than 4 textures per terrain, but never did I see more than 4 textures blended in one same place.  
I can think of several games that allowed painting of virtually unlimited textures per terrain (maybe there was a limit), usually strategy games like the Age of Empires games (not sure if the 3D ones had it tho, and the 2D ones would be irrelevant), Might & Magic Heroes 6 had unlimited, and Warcraft3 had a big amount.

but in UE3/UE4 the separation was done per component. you can blend a lot of textures in one point, but paint more textures in a component than you should and you’ll just surpass the hardware limitation and the shader will not be able to be compiled.  
and the problem is, communicating this limitation was never done properly by the editor (neither UDK nor UE4). not that it’s an easy thing to communicate either.

with the new neat SM5 trick they made recently you can paint up to 128 textures, but only applies to SM5 hardware (PC only). for all other platforms the problem still persists.  
personally I’d prefer a system that blends less textures per vertex, but allows more variety across the board. it’d probably be more performant as well.

---

<div class="post-metadata">

**Author:** ![Maximum-Dev](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Maximum-Dev](https://forums.unrealengine.com/u/Maximum-Dev)\
**Post date:** [September 5, 2015, 8:23pm UTC](https://forums.unrealengine.com/t/landscape-grey-sectors-while-painting/39392/11 "2015-09-05T20:23:20Z")

</div>

Hey guys,

@Chosker, thanks for the well written explanation. 🙂

The good news is I’ve got a job to do for a client and so far I’m having 5 layers and that grey sector issues is not happening anymore in 4.9. I’ll try increasing the layer count as I go and report back.

---

<div class="post-metadata">

**Author:** ![trupelo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@trupelo](https://forums.unrealengine.com/u/trupelo)\
**Post date:** [February 7, 2016, 7:01am UTC](https://forums.unrealengine.com/t/landscape-grey-sectors-while-painting/39392/12 "2016-02-07T07:01:02Z")

</div>

I had the same problem and RyanB’s reply on another thread related to the same topic gave me the answer.  
In your landscape material, select all texture samples and set the ‘Sampler Source’ to ‘Shared:Wrap’.

---

<div class="post-metadata">

**Author:** ![Jules86](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Jules86](https://forums.unrealengine.com/u/Jules86)\
**Post date:** [November 18, 2017, 9:46pm UTC](https://forums.unrealengine.com/t/landscape-grey-sectors-while-painting/39392/13 "2017-11-18T21:46:07Z")

</div>

> [@trupelo](#):
>
> I had the same problem and RyanB’s reply on another thread related to the same topic gave me the answer.  
> In your landscape material, select all texture samples and set the ‘Sampler Source’ to ‘Shared:Wrap’.

Thanks mate, I’ve been having the grey tile issue and this solved it for me.

---

<div class="post-metadata">

**Author:** ![roberteker](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@roberteker](https://forums.unrealengine.com/u/roberteker)\
**Post date:** [December 4, 2018, 10:12am UTC](https://forums.unrealengine.com/t/landscape-grey-sectors-while-painting/39392/14 "2018-12-04T10:12:44Z")

</div>

> [@trupelo](#):
>
> I had the same problem and RyanB’s reply on another thread related to the same topic gave me the answer.  
> In your landscape material, select all texture samples and set the ‘Sampler Source’ to ‘Shared:Wrap’.

It’s 2018 and I followed a simple tutorial for the open world asset that ships with Unreal Editor and I had to search the forums to find this solution to alleviate the bug.

---

<div class="post-metadata">

**Author:** ![GalakGun](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GalakGun](https://forums.unrealengine.com/u/GalakGun)\
**Post date:** [February 21, 2019, 3:19am UTC](https://forums.unrealengine.com/t/landscape-grey-sectors-while-painting/39392/15 "2019-02-21T03:19:41Z")

</div>

THIS WORKED FOR ME! you also have to set the textures as well!

---

<div class="post-metadata">

**Author:** ![Exdraz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Exdraz](https://forums.unrealengine.com/u/Exdraz)\
**Post date:** [February 26, 2019, 8:07am UTC](https://forums.unrealengine.com/t/landscape-grey-sectors-while-painting/39392/16 "2019-02-26T08:07:13Z")

</div>

> [@trupelo](#):
>
> I had the same problem and RyanB’s reply on another thread related to the same topic gave me the answer.  
> In your landscape material, select all texture samples and set the ‘Sampler Source’ to ‘Shared:Wrap’.

You are awesome \*\*[trupelo](https://forums.unrealengine.com/member/130811-trupelo), you save me 3 days of work! Thank you so much! \*\*

---

<div class="post-metadata">

**Author:** ![zombyra22](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/zombyra22/32/940759_2.png) [@zombyra22](https://forums.unrealengine.com/u/zombyra22)\
**Post date:** [July 19, 2021, 4:10am UTC](https://forums.unrealengine.com/t/landscape-grey-sectors-while-painting/39392/18 "2021-07-19T04:10:50Z")

</div>

[trupelo](https://forums.unrealengine.com/u/trupelo) You are a lifesaver, thanks. This should be in the unreal documentation.

---

<div class="post-metadata">

**Author:** ![Playasene94](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/playasene94/32/1092119_2.png) [@Playasene94](https://forums.unrealengine.com/u/Playasene94)\
**Post date:** [December 29, 2021, 3:30pm UTC](https://forums.unrealengine.com/t/landscape-grey-sectors-while-painting/39392/19 "2021-12-29T15:30:33Z")

</div>

The Problem still persists in UE5. I get the DefaultMaterial even if i use simple material color blend and apply to the landscape. In the Editor and on Android it shows up correctly but in Windows it does not.

---

<div class="post-metadata">

**Author:** ![Thornscale](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/thornscale/32/574055_2.png) [@Thornscale](https://forums.unrealengine.com/u/Thornscale)\
**Post date:** [September 22, 2022, 9:29pm UTC](https://forums.unrealengine.com/t/landscape-grey-sectors-while-painting/39392/20 "2022-09-22T21:29:46Z")

</div>

UE 5.0.3 in 2022, and this is still a problem.  
Fortunately, the fix described in this thread does work.

Select all texture samples and set the ‘Sampler Source’ to ‘Shared:Wrap’. in your landscape material.
