TwinStickShooter Mobile problem with materials

Hello,

I am new in Unreal Engine 4 and I tryed to develop TwinStickShooter from the tutorial. The game works fine in desktop, but when I export it in Android device the materials, the color of the enemy and the lighting don’t render. Why does this happen?

This is a good source of information to look to when developing or deploying to any mobile devices: General Mobile Development for Unreal Engine | Unreal Engine 5.3 Documentation

For the materials, you would want to check that they are not exceeding the max texture sampler count for mobile.

For the lighting, you would need to know that spot lights are not supported if using stationary or movable, only static spot lights. Point Lights can have up to 4 that affect any surface, but they do not shadow cast. If you’re using a directional light, make sure that it is either static or dynamic unless you’ve enabled the option for Combined Static and CSM shadowing so that stationary direcitonal lights are supported.

You will also want to take an in-depth look at your project log where you deployed this because the log would contain information about any materials or issues that will not be supported or if there are other warnings/errors you run into along the way. Project Folder > Saved > Logs.

Thank you very much for the informations. One more question please, I compiled all the materials from the option in material editor (mobile stat) and no erros found. Also, the materials appeared this time in Mobile preview. Is it possible that device that I tested, have the problem? I compress the file in DXT, I also try to comress it in ETC and ATC, but black screen appears.

It’s possible depending on your device. The mobile preview gives a broad overview for most devices, but there are still some features that do not take specific devices into account. It’d probably be best to post in the AnswerHub in the Packaging and Deployment section with the known details and issue you’re seeing. We can better help with specific issues there.

The log is still probably the best place to see if something is causing that specific one not to render on mobile. With the mobile stat you still have to keep in mind that you cannot use all 9 texture samplers as some are reserved, just like with non-mobile texture samplers you get 16 but can only use 13 of them IIRC.

ok I’ll try to find the problem in log file. Thanks!

0]LogEngine: Initializing Engine…
[2016.09.28-20.49.52:281] 0]LogMaterial: Missing cached shader map for material MAT_LevelColorationLitLightmapUV, compiling. Is special engine material.
[2016.09.28-20.49.53:043] 0]LogMaterial: Missing cached shader map for material ShadedLevelColorationLitMaterial, compiling. Is special engine material.
[2016.09.28-20.49.53:613] 0]LogMaterial: Missing cached shader map for material ShadedLevelColorationUnlitMateri, compiling. Is special engine material.
[2016.09.28-20.49.53:852] 0]LogMaterial: Missing cached shader map for material VertexColorMaterial, compiling.
[2016.09.28-20.49.56:016] 0]LogMaterial: Missing cached shader map for material VertexColorViewMode_ColorOnly, compiling.
[2016.09.28-20.49.58:222] 0]LogMaterial: Missing cached shader map for material VertexColorViewMode_AlphaAsColor, compiling.
[2016.09.28-20.49.58:512] 0]LogMaterial: Missing cached shader map for material VertexColorViewMode_RedOnly, compiling.
[2016.09.28-20.49.58:693] 0]LogMaterial: Missing cached shader map for material VertexColorViewMode_GreenOnly, compiling.
[2016.09.28-20.49.59:415] 0]LogMaterial: Missing cached shader map for material VertexColorViewMode_BlueOnly, compiling.
[2016.09.28-20.50.00:590] 0]LogMaterial: Missing cached shader map for material RemoveSurfaceMaterial, compiling.
[2016.09.28-20.50.01:923] 0]LogMaterial: Missing cached shader map for material DebugMeshMaterial, compiling.
[2016.09.28-20.50.02:802] 0]LogMaterial: Missing cached shader map for material M_InvalidLightmapSettings, compiling.
[2016.09.28-20.50.02:915] 0]LogMaterial: Missing cached shader map for material GizmoMaterial, compiling.
[2016.09.28-20.50.03:465] 0]LogInit: XAudio2 using ‘Speakers (Realtek High Definition Audio)’ : 2 channels at 48 kHz using 32 bits per sample (channel mask 0x3)
[2016.09.28-20.50.04:165] 0]LogInit: FAudioDevice initialized.
[2016.09.28-20.50.04:223] 0]LogInit: Texture streaming: Enabled
[2016.09.28-20.50.04:287] 0]LogMaterial: Missing cached shader map for material BaseColor, compiling.
[2016.09.28-20.50.04:320] 0]LogMaterial: Missing cached shader map for material CustomDepth, compiling.
[2016.09.28-20.50.04:428] 0]LogMaterial: Missing cached shader map for material CustomStencil, compiling.
[2016.09.28-20.50.04:489] 0]LogMaterial: Missing cached shader map for material FinalImage, compiling.
[2016.09.28-20.50.04:634] 0]LogMaterial: Missing cached shader map for material LightingModel, compiling.
[2016.09.28-20.50.04:762] 0]LogMaterial: Missing cached shader map for material MaterialAO, compiling.
[2016.09.28-20.50.04:928] 0]LogMaterial: Missing cached shader map for material Metallic, compiling.
[2016.09.28-20.50.05:018] 0]LogMaterial: Missing cached shader map for material Opacity, compiling.
[2016.09.28-20.50.05:070] 0]LogMaterial: Missing cached shader map for material Roughness, compiling.
[2016.09.28-20.50.05:171] 0]LogMaterial: Missing cached shader map for material SceneColor, compiling.
[2016.09.28-20.50.05:317] 0]LogMaterial: Missing cached shader map for material SceneDepth, compiling.
[2016.09.28-20.50.05:380] 0]LogMaterial: Missing cached shader map for material SeparateTranslucencyRGB, compiling.
[2016.09.28-20.50.05:399] 0]LogMaterial: Missing cached shader map for material SeparateTranslucencyA, compiling.
[2016.09.28-20.50.05:452] 0]LogMaterial: Missing cached shader map for material Specular, compiling.
[2016.09.28-20.50.05:480] 0]LogMaterial: Missing cached shader map for material SubsurfaceColor, compiling.
[2016.09.28-20.50.05:531] 0]LogMaterial: Missing cached shader map for material WorldNormal, compiling.
[2016.09.28-20.50.05:606] 0]LogMaterial: Missing cached shader map for material AmbientOcclusion, compiling.
[2016.09.28-20.50.05:673] 0]LogMaterial: Missing cached shader map for material CustomDepthWorldUnits, compiling.
[2016.09.28-20.50.05:722] 0]LogMaterial: Missing cached shader map for material SceneDepthWorldUnits, compiling.
[2016.09.28-20.50.05:773] 0]LogMaterial: Missing cached shader map for material HDRColor, compiling.
how can i fix this?

Finally the problem was solved! I had to choose a material with 5 samples only and then to re-complile lighting! Thanks a lot!