Layered Landscape material on Mobile

Hello guys. I am having a problem with a Landscape Material on Mobile. As you can see in the pictures the Layer Blending looks fine on Desktop, but on Mobile Preview there is actually no blending.

My engine’s version is 4.7.5

Hello romfeo,

I just set up a test project with the same landscape material blending approach you are using. The first thing you will want to make sure is that your project is set up for mobile platforms. To check this within your own project, go into your ‘Project Settings’ and look under the ‘Target Hardware’ section and be sure it is set to ‘Mobile/Tablet’ and ‘Scalable 3D or 2D’

Target Hardware

The next place I suggest looking is your landscape material properties. There are options you will want to check/uncheck under ‘Usage’ and ‘Mobile’ sections.

Landscape Material Properties

After checking all of these settings, hopefully are able to see your blending like in the picture below.

Mobile Landscape Preview

If you are still having issues after following the provided suggestions, please let me know and we can continue to troubleshoot your issue.

Cheers,

Hello and thanks for your comprehensive answer. My problem is solved

Hi,romfeo,
I blend four textures too, but only see three textures on mobile preview.Are there any other Settings? Thanks

Same issue here, did you solve it?

Could you show me how you have your material set up, and what device you are deploying to when testing?

Are you having issues strictly in the Mobile Previewer, or when you launch to the device as well?

Thanks,

I have same issue: When blending more than 3 layers, foruth and more and showing as third on mobile preview. Any solution ?

Hey P4BL0S,

Be sure you are working within guidelines for textures and materials on the mobile platform. I would also try setting one of your blend modes to Alpha Blend if you are using Weight Blended material layering.

Materials for Mobile Platforms

Landscape Materials

Both of these documentations provide information on the limitations and workarounds you will need to keep in mind when creating Landscape Materials. Let me know if you have further questions.

Thanks,

Thank you Andrew.

I have read documentation before even starting the project, and section you have mentioned - additional few times when problems arrived. No solution yet. I’m doing everything step by step, and in shader model 4/5 it works flawlessly, no dark spots with 1 layer at alpha blend and so on. I do believe, that it might be something with my project/world setting. But same thing happens after I try it on blank project. Its about a week I’m trying to figure this out, or work around it and nothing. Pleasae, any help would be just terrific !

ps. I know, 1 layer should be alpha blended to avoid black spots, yet i tried every possible combination with no effect.

-paul

Try using the Custom UV input and plugging your Layer Blend node into the Custom UVs to see if that addresses the issue. There is a limitation of 5 Texture Samples when creating Mobile Materials, which it seems you are within that number.

What device are you deploying to when testing the shader?

Thanks,

I’m not sure if I did everything correct. At this stage, terrain is black and statistics says I’m using Mobile texture samplers 3/8. That’s weird.

I tried also other combination with custom uv (connecting layerblend to Base Color, and landscapecoords set to LCCT Custom UV0 and connected to custom UV0 port). With that i could see terrain, but still only 3 textures.

I’m testing it on htc Nexus 9 (but same problem appers even on mobile preview at editor).

Thanks for you time Andrew,

-Paul

EDIT: upgrade to 4.10.1 does nothing.
deleting terrain and creating new one does not help.
trying different project template also fails :frowning:

Try one more thing for me. Return to your original set up by using the Base Color input, and instead of having all of your texture samples sharing a single ‘Landscape Layer Coordinate’ node, give each one its own respective one.

If this does not work, I will test this issue on a similar device and return with my findings. Let me know if you have further questions or comments.

Cheers,

I just tried what you have aksed for. Problem is still there.
Well, you could just set preview rendering lvl to ‘mobile / android /ios’ and the problem is even there. Same on the device itself or mobile preview (PIE).

Is it possible, that there is something wrong with my editor? Maybe simple reinstall would help ?

All the best,
-Paul

Hey P4BL0S,

So I am not seeing what you are reporting, and just created a new landscape and material from scratch. I think I found what you could be missing, so follow along with the images and steps below to see if you can get your own material to work.

Steps to Follow

  1. Create new landscape material using 5 texture samples.
  2. Add a Single LandscapeCoords and plug-in to the UV’s of each respective sample.
  3. Make sure each Texture Sample is using the Shared:Wrap Sampler Source
  4. Add a ‘Layer Blend’ node.
  5. Make the first four blends ‘Heightmap’ and the fifth one an ‘Alpha’ blend.
  6. Add a ‘Feature Level Switch’ node.
  7. Connect nodes as seen in Material Editor Graph.
  8. Check ‘Fully Rough’ under material properties.
  9. Save and Apply to newly created Landscape.
  10. Launch Mobile Previewer (PIE).

Mobile Landscape Material

Mobile Preview

If you are still experiencing the issue, or have further questions please let me know. Be sure to test this in a new blank project.

Thank you,

Hi Andrew,

Thanks for helping me at this. We’re getting close… but it’s not it yet. I’ve made to reconstruct scene at blank project, where 5 textures mix at one. The only thing i had to do different was setting preview weight to 0.5 at layer blend. Otherwise terrain would be black.
Yet when I’m starting to paint the landscape, problem persists. It only renders 3 textures at mobile preview & at the device.
I’ve tried using both non-weight and weight blended layer info. Still the same. Screenshot is from version, where I set my alpha-blended texture to no weight-blend style. When i set it up to weight-blended, i was drawing ‘black’ through textures.
And right after that testing, i got editor crash. Just to mention. I’m not sure, what may be important here.

Hopefully you got one more idea for me :smiley: Thank you very much for your patience and help Andrew.

-Paul

Edit: I found also something werid about alpha blending layer. When I apply alpha blended layer to whole terrain, and then paint with another texture, everything is ok, yet when I paint with more then that, the alpha blending texture is becoming black.

So instead of me recreating the same thing again, could you provide me with this project so I can test it on my end?

I also noticed in your last two images, the Alpha Blend is not set as a Non-weight blended layer which could be part of the problem for that issue.

In order to test your project correctly, zip your Config, Content, and .Uproject files into a folder and attach it to your response please.

I will do what I can to get this working, but if this ends up being a bug I will enter it into our system and return with that information as well.

Thanks,

I tried both combination with Alpha Blend layer. While non-weight is working correctly (it smoothly appears over different textures), normal weight-based layer causes terrain to be black if more than 2 textures are applied to the terrain. Just look at 2 last screenshots from previous post or screen below. Number 5 is alpha blended, weight-based layer.

I’m sending a link to .zip file with content you’ve asked for. I uploaded it to my dropbox, because it’s too big file to attach it here:

Take a look at it, and see what you can do.
Thanks Andrew,
-Paul

If you have not taken a look at it yet, the documentation we have on Landscape Materials explains the different blend types and why the fifth layer needs to be an Alpha Blend.

Landscape Materials

I managed to get that part working fine in your project, and was able to see all five layers painted when Playing in Editor (Regular Mode) and this is expected.

The issue you are experiencing is that Mobile devices do not support SM5 features DX11, and the shared wrapped texture samples is only available for that shading model.

If you are honestly developing for mobile, I would also recommend scaling down the size of your texture samples. Mobile devices cannot hold a large amount of 2048x2048 textures at the same time, so you could see some textures being completely blurred out since they cannot be loaded into memory as there is not enough space.

In other words, what you are seeing is actually not a bug, but a limitation of the mobile development platform and of the shader model you are working within. Since you cannot use the shared:wrapped option, your material is now using up to 9/16 texture samples, which also exceeds the max allowed for the mobile platform as well (ES2).

Materials for Mobile Platforms

I would look into optimizing your material by way of deleting texture samples that cover a broader range of surface type. For example, instead of having a couple of rock/dirt type layers, use a single rock texture sample which already has a bit of dirt in it, so when blending you get some good transition.

You could also use a different layer blend node to see if that helps as well. My initial answer to the users post resolved his issue, so perhaps that will help you as well. This will entail understanding how you want to have your material layered specifically and connecting those nodes in the correct order from bottom to top.

If you have further questions please let me know.

Thanks,

Any help would be really really appreciated! You’re my last hope about this Andrew.

-Paul

This is a current limitation of the engine and landscape components. Since you are using a feature level switch, it is behaving as if it were deployed to ES2 (Mobile) Platforms when previewing. To that end, have you attempted to deploy this to the device itself to see if it behaves differently there?