Hi all, so I was creating my first map in Unreal Engine 4 and I came across a problem while terrain painting. In my material I was only able to add 7 textures to paint the land with but I want more to make my map as realistic as possible. But when I try to place a new material it gets rid of the old material and thus leaves the map in textured again. Is there anyway to paint the whole map using materials with 7 or more textures? Any help is appreciated.
See this post about texture limits, in any kind of material. There are ways to tweak it a bit, but even if you get it working, your landscape is going to be dragging your performance down.
Better to have a small number of carefully chosen textures.
True, but you can still get it to work.
change your texture nodes to Shared Wrap.
It should allow for the 7 layers even if you’ll get something like 40fps on the landscape tile with the 7 layers…
yes i would try this.
Yep, there’a a DX11/hardware limit on the number of texture samplers any material can use of 16 (with a couple of those sampler slots also pre-reserved for rendering info etc). The easiest way round this is to change some of your texture samplers to use “Shared: Wrap” which will set them to use the shared texture sampler library instead (limited to 128 total textures used at any one time, so use sparingly).
Another way to get round this limit if you’re using roughness or height textures in your material is to bake the roughness texture into your base colour alpha channel, or use an raomh map (a single rgb texture with roughness, metallic, height, ao baked into each of the rgba channels of a single texture)…
I’m using a landscape material with the option of up to 16 layers atm, you do get a slight fps drop with each new texture layer you paint on the landscape, but not too bad… I guess its a trade off between how varied/detailed you want your landscape or how optimised you want it to be.