This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

Hi, I have a problem when exporting to iOS: my app works but textures won't show up.

I had a similar problem when exporting to Android, but found out that I need to disable etc textures for Android within the 'Vram Compression' section in project settings. Now I can successfully export with textures for Windows Desktop and Android.

Is there a similar problem for iOS textures? I found this in this thread:

Now I can make iOS build with etc2 files (enable etc2 compression and disable pvrtc)

But this doesn't work for me. I found that newer iOS devices should support etc 2, and for broader support pvrtc should work as well. I believe I have tried all combinations of possible vram compression formats though, and I can't get anything to work.

Any ideas? Thanks.

Godot version Godot v3.4.4 stable official
in Engine by (15 points)

1 Answer

+1 vote
Best answer

Which rendering backend are you using? This will determine which backends work, and restrictions on texture sizes. GLES3 mandates support for non-power-of-two textures, but GLES2 doesn't. Therefore, if you're using GLES2, make sure all your textures use power-of-two sizes, especially if they have mipmaps or repeat enabled.

Both iOS and Android support ETC2, but only when using the GLES3 renderer. When using the GLES2 renderer, the only VRAM compression algorithm supported on both Android and iOS is ETC1.

In Godot 3.x, PVRTC can be used on iOS, but it involves additional steps since Godot does not include a PVRTC compressor. (PVRTC is only supported on iOS, not on Android due to hardware limitations.)

by (12,908 points)
selected by

Thank you, confirmed this works as described. I'm now building for Android and iOS using GLES3 with ETC2 textures, and they all show up.

One problem remains though, I want to support all major platforms (PC, MAC, Linux, Android and iOS), but for some nodes I am currently using the editor to set a Texture to the Material of a MeshInstance. To get the build to work on iOS I had to manually change the Texture's LoadPath to a .etc2.stex instead of the .s3tc.stex as it was previously. Is there a way to set this dynamically, or manually for each platform, so it looks for the relevant texture for each of the exports?

I solved it, after searching a bit it seems you can't use the editor if you want to export for several platforms, you have to load the texture by code. So for now I'm doing something like this:

extends MeshInstance 

func _ready():
    var texture = load("res://textures/texture.png")
    material_override = SpatialMaterial.new()
    material_override.albedo_texture = texture
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.