I am new to Unreal Engine and video game development. I am trying to figure out how to paint textures onto a landscape and for some reason after the first stroke my brush begins to erase the texture off of the landscape. Can anyone tell me how I can avoid this?
Look at your texture samplers in the landscape material. Make sure they are set to shared:wrap. If you are using too many samplers, it can show like this.
It helped a bit. But, the third texture I still cannot get to show up without it squaring all texture off from the landscape. Does that mean that a material is limited to two sets of textures that make up of a blend of two materials?
It comes down to the number of samplers. There’s limits on how long a program a GPU can run on a given pixel, how many textures you are sampling, etc.
I grabbed this once upon a time, but you should double check: A sampler is something that tells the graphics card how to sample the textures (linear filtering, point filtering, wrap addressing, etc). The 16 sampler limit is a d3d11 limit and not something we can change. HOWEVER you can use fewer samplers in your material with the shared sampler setting to use up to 128 unique textures.
W/o looking at the material I couldn’t say for sure but you are likely running into some kind of limit on the landscape material.
On the material, what’s the material stats, the little window at the bottom say? It ought to look like this?
Base pass shader: 533 instructions
Base pass shader with Surface Lightmap: 517 instructions
Base pass shader with Volumetric Lightmap: 533 instructions
Base pass vertex shader: 58 instructions
Texture samplers: 3/16
Texture Lookups (Est.): VS(3), PS(46)
Virtual Texture Lookups (Est.): 15
Virtual Texture Stacks: 2
User interpolators: 16/16 Scalars (4/4 Vectors) (TexCoords: 8, Custom: 8)
You also have one in your material-instance window, what is that one?
Are you using a market-product or a thing from te web?
Shader Count: 14
Base pass shader: 176 instructions
Base pass shader with Surface Lightmap: 211 instructions
Base pass shader with Volumetric Lightmap: 257 instructions
Base pass vertex shader: 111 instructions
Texture samplers: 3/16
Texture Lookups (Est.): VS(0), PS(12)
User interpolators: 2/4 Scalars (1/4 Vectors) (TexCoords: 2, Custom: 0)
Hmm. It says this.
Unsure, sorry. I see a box that says ‘limit layers’. Could be that, I am not using UE5 so it could be a UE5-ism but that checkerbox pattern is pretty distinct.
What about a setting to let X number of layers be painted in? In UE4 it looks like this:
Yeah, that did not do it either. I am going to try UE4 and see what it does.