A few questions in regard to texture compression, reflections, and deployment


Total noob here. Thank you so much devs for making Unreal basically free, I love it! I’ve been using basic blue prints and following tutorial and documentation, but there some areas I am having trouble understanding.

Texture compression:
My device (Samsung Note 3) apparently uses ATC compression.

Does this format support reflections? When I play my sample on the phone, I get no reflections. Displacement/bump mapping works fine, but any amount of metallic is removed. This isn’t a huge issue because emission/glowing works and my texture will be simple, but having a pool of water here and there reflecting the sky would be nice.

What exactly does Android (ALL) do? Does it create all possible version of the texture files then selects the appropriate ones at run-time based on the device? What texture compression do you guys as professional use when deploying Android to the play store or for mass distribution?

I can “play” the sample to the device fine, but I have no idea how to manual install the “apk” and “obb” file to my phone. The key is that I work remotely often and will not always have my phone physically attached to the machine when I am developing. I will need to build then download these files to the phone, but I am not sure how to get them to work.

The texture compression format doesn’t have any bearing on the rendering. If you aren’t seeing any reflections, you might have “Fully Rough” checked on your materials. The docs recommend keeping this checked for any materials you can because it lets the shader skip a relatively expensive image-based lighting reflection calculation. Of course, you will lose the image-based reflections. You will also need to make sure you have a reflection capture in each area of your level for the materials to get the reflections from. You can look through the Mobile Temple demo for some examples. There are a few shiny metal objects in the level.

For texture compression I think you usually want to pick the best one a device supports. You can build an APK for each different texture compression and then you can upload multiple APKs to the Play Store. ETC1 should work for all Android devices as long as you don’t need an alpha channel.

Thanks CaptainScience! I really like the multiple apk option and if I’m not mistaken there is a developer section of the play store where I can test these files without needing my phone to be physically attached to the computer.

As far as reflections, I am also happy compression has no impact on them. My only problem now is getting them to work. Right now, I have a yellow floor with some metal trim (It’s one of the starter materials). I have edited the material with matellic and roughness constants so the floor is blue with clouds on it because it is 100% reflective. When I run the level on my phone however, the floor is yellow again, and the metal trim only reflects light (with a nice bloom/aboration effect). It looks like all reflective surface beautifully reflect light intensly and dark shadows very subtly. However, there is absolutely no texture/sky or even object reflection. I even tried deleting the spear reflection capture and applying a box reflection capture. I will see if I can find that “fully roughed” option because my water looks like flowing blue concrete.

Thank you again for the help, the apk/compression issue was really my main concern. I can live without reflections.

“Fully Rough” should be in the options on the left bottom side of the Material editor. Although if it was on, you should see it in the editor too and not just on the phone.

It could be an issue with the graphics driver on your phone. The reflections need some special cubemap lookup extensions that aren’t part of the basic OpenGL ES 2 specification. Just doing a quick search through the code right now I found this in the “PrecompileGLSLES2” function inside “OpenGLShaderCompiler.cpp”:

Which is exactly the extension I am talking about, and depending on the hardware/drivers in your phone this could be related to the issue you’re having, but at the very least it tells me there is still some more compatibility work that needs to be finished for Android. All the shader code for phones goes through a HLSL to GLSL conversion process, and there are a lot of different edge cases and vendor-specific issues that needs to be dealt with. If reflections aren’t working on your phone, they could still be working on lots of other devices.

So my new guess is that it is probably a device-specific issue that you’ll have to deal with until your phone gets updated drivers or Epic adds a work-around to the GLSL shader compiler. If you wanted to know for sure it may take some digging through Android log files and taking a look at the actual shader code generated for your phone.

Hey guys, that workaround/comment was added on 8/2013, when we supported only very few devices; I’ll add a task to get it working correctly. Great catch!

This particular patch is used in the editor for determining the instruction and cycle counts only. We apply different shader fixups for Android at runtime based on the GPU.

Reflections should work for any GPU, but may not have roughness control depending on support of the textureCubeLod / textureCubeLodEXT functions. The Note 3 with ATC support has an Adreno 330 which should work properly if you have a reflection probe in the level to capture it:

Please try SunTemple on your device; it has metallic reflections you can use to confirm it is working on your device.

I will try SunTemple. Thank you. I’ll post back the results.