Landscape on mobile

Hi,

Hello,

I have a problem with landscape on mobile. Whenever I try to apply and blend 3 or more textures in a landscape, fourth and next textures looks like a third texture that i put on particular landscape segment. For example if I put soil, pebbels, grass and hay, on shader model 4/5 it looks correct, but on mobile and preview builds only first three textures appears that I applied in that segment. On another segment, if order was different - different 3 textures will be used. By the landscape segment I’ve meant sections that are created automatically when you create a landscape. I made a screenshots which will better describe it




I have read documentation before even starting the project and additional few times when problems arrived. I tried weight and height blend layers (with 1 alpha blend to avid dark spots). I’m using weight blended layers (normal). Same thing happens on a blank project. Changeing sample source doesn’t work either. I’m not using World Composition, neither level streaming. It’s most default landscape possible.

Engine version 4.10
Target hardware: mobile/tablet,
Quality: tried both : maximum quality & scalable
My PC is definitely suitable for developing @ UE4.

PS: Maybe someone could send me his project, where everything works, and I’ll compare it to mine? In worst case, we’ll be able to exclude few options.
PSS: I started a topic on a answerhub, and discuss on 2nd one, yet no one could help me with it. Links below

1# Landscape on mobile. Mobile preview problem - Rendering - Unreal Engine Forums
2# Layered Landscape material on Mobile - Mobile - Unreal Engine Forums

If any of you could help me - I’ll be very, VERY grateful.
-Paul

There are big limitations for shaders on mobile. Landscape actor is also not quite mobile friendly. I am not sure if you tested this on real devices yet, but looking from your material only nvidia K1 and newest apple may handle this stuff at some decent speeds. Keep in mind that besides landscape you want a lot of game actors like decorations, enemies etc. Unreal guidelines for supported textures on mobiles etc, are for some virtual device, reality is not that great on most of actual hardware.

Then there is problem of most phones overheating when your game uses them to the max. For eg. I found out that nvidia tablet is fine with demanding games, while iphone 6 boils after 20min, and older samsung starts boiling right after game is launched. So keep that in mind, i rather have just decent quality graphics, but in game that can run more than 20min rather than best possible graphics on mobile when i barely can hold device (because its so hot) after 20min of gameplay. On top of all this you risk some angry customers/players when your game burns their hardware and damages screen.

So my advice: if you want push the limit test this on hardware that you plan to release for.

I’m constantly testing my project on the device to keep it @ 60FPS at (at the moment) high-end tablets. Usage of 2 more textures on landscape wouldn’t hurt for sure. It’s just weird I can’t run it on mobile, while Logan on answerhub showed me, that it’s possible :confused:

bump. Can any1 make a as simple as possible project with terrain and 5 textures that work on mobile preview? I’d be able to exclude few options than.
Thank you for your time.

Ok, if someone is wondering, here is official answer:

…] 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. …]

You could use texture atlases to overcome mobile texture sampler limits.

That’s a nice idea, but how would you later on use specific part of texture ? you’d need a mask for it, and that’s a texture fetch too, isn’t it ?

Just test the idea by simply using different colors for different layers. That should work. With atlas all layers can come from same texture so they only use single sampler. Layers only need 1 texture per 4 weights. So this should work. Only problem is that you have to modify texture coordinates on pixel shader which cause problems with precision and performance on gles2.0 devices.

UV manipulation in materials is not advised for mobile shaders. You solve one problem but probably create another.

Landscape should not be used for mobiles (yet, it may be fine in 2-3 years, but it is risky to implement it now).
Instead split your terrain into separate meshes use vertex color to paint terrain. This is cheaper than landscape.
If you cleverly split your landscape meshes (along roads/rivers) you can use diferen materials for different meshes.
All should have path/river bed texture so it has seamless edges (you use world coordinate mapped textures to hide edges).
But other textures than that connecting one can be different.

Much more work for you, but much less later for poor tablet.

Also keep in mind that even if game runs on mobile, but it is very heavy nobody will play it.
Game should not overheat device (i seen it done in less than 5min). It also should not kill battery in 20min.
And pushing last gen devices to the limit guarantees boiling for non tablets, and depleted battery in 20min for all of them.
There is risk of game literally damaging screen by overheating, i seen this happened, you do not want to be sued for damages.

1 Like

If current landspace system is unusable on mobile it should get some love. On iOS vertex texture fetch is avaible which mean that landspace system should work just like it work on desktop.

Right now I’ve decided to separate landscape for smaller sections. Every section contains ground + road texture, yet in each segment I can use different third texture. With some work, it looks quite allright, yet I’ll need to try vertex painting.
And what’s about temperature and battery… this is so true. Yet good level design + distance/visual culling is my savior for the moment :slight_smile:

PS: Is there a really accountable difference between landscape + textures and meshes + vertex colors ?

While packaging for es2.0 android device, output log shows error in landscape material compilation. What to do? I am using ue4 version 4.15.3

You can see the log file where it says “Cannot access field LayerWeights of structure”. How to resolve even when mobile texture samplers show only 3 ??

I have been stuck on this for days …

so… whats the solution?

Virtual Textures