Mobile materials bugged

To any developers, please read through this issue and the updates.

I’m getting an issue where the mobile materials display stretched, as if the coordinate was based off world position. On PC it works perfectly fine but on mobile, not so much. I originally thought it was the classic LOD Bias texture settings for mobile but tweaking those don’t change anything.

PC Preview

http://i.imgur.com/SvHZsO7.png?1

IPhone 5

http://i.imgur.com/gDh65RF.jpg

I should mention the hole is at point [0,0,0]

Also, notice the missing texture on the HUD ( Top left ), that image among other pieces of HUD are bound to material instances of an unlit material, the other HUD elements are played in an animation together and they all have a dark shade on them; Only on mobile.

So my second question is: Why is that one missing and why are the other HUD elements darker than what they should be?

Is it still just a case of limited memory and changing the LOD Bias or something else?

Note: These textures aren’t large at all, the largest is the grass at 1024x1024

Update

So after a few experiments I’ve found the the mobile tiling method must be being forced to clamp, even though they are set to wrap. Any reasons for this?

Clamped setting matches the mobile artifact:

http://i.imgur.com/BFzQEkk.png?1

In regards to the darker textures on mobile, I’ve had to come to a hacky workaround where I use a Feature Level Switch and set the old shading model to tweak the color with an SCurve node at a power of 0.5 and restore the brightness by multiplying it by 1.5.

Node setup:

http://i.imgur.com/DvA38VS.png?2

Update

So after some more experimenting, I found that the models that didn’t have baked lighting appeared correctly, I then thought it might be how I’ve set up my lightmap settings, but it turns out it was the way I’d set up my lighting.

I was trying to cheat my way into having static lighting mixed with the movable lighting, I’d do this by setting the light source to static > compiling > then setting it to movable.

This achieved the best looking lighting with dynamic shadows. However, because the textures force their way into being clamped on mobile, this is no longer an option.
Guess I’ll have to stick with stationary lighting, where my movable objects don’t cast shadows.

It would be great if the devs could fix:

  • Material tiling forced into being clamped when blending Static and Movable lighting when compiling to mobile.
  • Widget materials appearing dark on low end shading.

Update

So this deserves an update after it’s mention on the twitch stream:

I am still using an IPhone 5s for testing.

Texture clamping persists on an odd selection of my textures, I can’t seem to find a common setting or type, regardless, is frustrating having > ES2 working perfectly and having a clamped nightmare on my mobile, the preview seems to tile the textures properly though. So perhaps it’s something to do with the IPhone.

My water shader material disappears on the IPhone too, Its made up of panning normals and is translucent > ES2 which uses the Depth Fade function; Depth Fade doesn’t work on ES2 leaving it fulling opaque in the mobile preview.

In the case of widgets, I can deal with the SCurve of them but the big issue is just more inconsistency of items in my menu disappearing on mobile. An example is a button with a text child; the button brush disappears and the text stays, I printed the alpha, visibility ect. of anything associated with the button and the numbers were what they should be. After I added another section to my menu, the same thing happened to a Border widget, and when I checked the button again… it’s now visible all of a sudden.

These widgets all use animations and the mobile preview also shows the missing elements.

Hi DGouse,

Material tiling forced into being clamped when blending Static and Movable lighting when compiling to mobile.

We’ve seen problems similar to this texture stretching before but I haven’t seen such a clear-cut example that makes it obvious that it’s texture clamp mode being processed incorrectly. Would you be able to make your project available for me to take a look at? Also, are you using Metal or OpenGL ES? There’s a checkbox under the project settings which determines which will be packaged but if you enable Metal it’ll be used on any device which supports it (which the iPhone 5s does). I believe this issue only happens with Metal but it would be great to confirm that.

Depth Fade function; Depth Fade doesn’t work on ES2

Not all devices have the hardware support needed to make Depth Fade work well, but all Apple devices do have the necessary support. I’ll check that and open a ticket to make sure it’s fixed for 4.10 or sooner.

Widget materials appearing dark on low end shading.

This is an issue with gamma correction and I have a ticket open to fix that also for 4.10. Until then your hack is the best solution.

When we have fixes for these things I’ll post back here with the github commits, in case you want to apply the fixes before 4.10 is out.

Cheers

Hey ,

Metal or OpenGL ES?
I can confirm that disabling Metal does fix the clamping issue.

Would you be able to make your project available for me to take a look at?
If you can give me your email address I can share the project with that.

I still get my water disappearing on the 5s, and the same widget is disappearing.

I’m currently using the release branch 4.8.3, but I’ll probably jump on the promoted branch from now.

Thanks for a response!

Hi, glad to hear it’s Metal only. We’ll take a look at it and the other two issues. My email address is .porter at epicgames dot com.

Cheers

Are you using MobileHDR or is it disabled? With it enabled Depth Fade should work but I can see that Depth Fade would not work correctly if MobileHDR is disabled. The reason is that we use the HDR framebuffer to store the depth on iOS and there’s no where to store the depth if you don’t use HDR.

We’ll have a look at the GUI border alpha problem on ES when we get the project.

Due to Australia being so far behind on internet speeds, it’ll be a few days before I have it uploaded. Once you get the project you can switch the game state in the game instance blueprint so that it can start in the menu or in game.

In meantime I found that my water was missing because Depth Fade returns 0 on the phone, so I just fixed it with a feature level switch.

Also ever since I stopped using metal, my gui has lines of pixels around the edges (where it would normally be transparent), it’s as if the alpha is opaque beyond the UV space and then bleeds along the edges. Trying different compression methods on the textures doesn’t fix the issue.

Yeah with MobileHDR on, depth fade works perfectly, thanks!

PC as well, I’ve only looked at both previews and I can’t see much in game with the pawn missing.

I tried the promoted branch, after building everything my pawn stopped spawning, leaving everything frozen and broken…

So now I’ve installed the 4.9 release, same thing happened, but this time my trees’ LOD models all render at the same time, I had to re-import and override to fix that. Then when I built the lighting, it bakes all the nice bounce lighting but there’s no direct sun light and shadows. I tried both static and stationary area shadows.

Regarding the trees’ LODs, please open your foliage material and make sure the “Dithered LOD Transition” checkbox is checked. That will solve the problem. We’ve fixed that for 4.9.1.

Is the lighting bake issue mobile only or also when you run on PC?

Hold up, static light works just fine now, its only stationary which is having issues.

Have you actually tested textures of size of power of 2? In my HTML5 project, materials were bugged until I changed my textures.

That mystery has been solved, read 's answer. By habit I always make my textures to the power of two.

oh, right, sorry

I still can’t get my Pawn to spawn properly since the update. I got the construction script to print it’s location and display name: The name is unique as normal and the location is where the spawn point is as normal. However if I try and print on begin play, nothing comes up.
The other preset pawns seem to work, and I really don’t know where to go from here.

Ok, so I was using a huge plane for the aiming to be at the ball’s height, for some reason in this version of the engine, I can’t have the plane so huge.

Hi,

We have tested your content in 4.9 version and ES2/Metal works correctly. Could you confirm that moving project to 4.9 fixes issue for you?

One note on conversion, some materials get their ‘Material Domain’ set to ‘User Interface’ instead of ‘Surface’ so you will need to switch them back. It’s an another separate issue not related to Metal.