-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS uses more RAM than other platforms when using large AtlasTextures #36105
Comments
Lossy (= WebP) image compression will still upload the image uncompressed to the GPU, so high memory is usage is expected. In other words, lossy compression only helps decrease the amount of storage space required for the texture. You need to use VRAM compression to decrease memory usage. It seems that on iOS, only PVRTC is available; you need to encode it manually using the reference PVRTC encoding tool. |
are you using one big atlas? |
nope... IOS uses memory more than other platforms |
it would be better not to use atlas if you can then. |
Same behavior here, except more extreme. iOS - 1.18GB Getting memory crash on Xcode. |
@Valeryn4 @HEAVYPOLY Please upload a minimal reproduction project to make this easier to troubleshoot. |
@Calinou https://www.dropbox.com/sh/tb5zoez4mih6h45/AABrDG5lPFTu15L8mz33Fr5Ca?dl=0 here's the project, open the autosave.hp from top left hamburger file menu (or draw a bit and compare memory consumption). You can press N to create new layers which will accentuate the difference. On an empty canvas with 1 screenshot of the viewport (1920X1920 viewport size): iOS - 400mb Same setup without the screenshot: screenshot method: I've tried turning on PRTVC compression in project settings, importing all textures with VRAM compression, and built Godot and export templates from commit e9a8e1a1 from today |
If you enable PVRTC in the project settings, you also have to specify the path to the command line Imagination Technologies PVRTC encoder in the Editor Settings. This is because Godot doesn't include a PVRTC encoder. Otherwise, textures will still be uncompressed in the final project. That said, PVRTC support was broken before 3.2.4beta3. |
Thanks, just tried with the Imagination Technologies encoder added and doesn't seem to change memory usage. Another weird note: This is a drawing app, I have sub viewports that represent each layer in a canvas. I take screenshots after every stroke to save the stroke to the layer. If I disable the screenshot, on OSX the memory doesn't change if I add empty layers/viewports. on IOS, ram jumps up 200mb for each empty layer/viewport (1920X1920) What could be happening here? |
Ok, here is a much more stripped down reproduction project: https://www.dropbox.com/sh/l0qpxwzyats3o0f/AAAcyNeZXSB7Oo6mep7GxwnAa?dl=0 it's just a color rect and the required iOS icons/textures. Also not sure if this is related, failed to create frame buffer: |
I'm also facing this error message. Did you learn anything useful about it? |
Good day! 2D projects in IOS consume more memory in x2 / x3. For iPhones, you have to hide the load under intermediate scenes =( |
Note that seeing the "did receive memory warning" message won't let you know the exact cause of the high memory usage, as the error message is printed regardless of the cause of the memory warning: godot/platform/iphone/view_controller.mm Lines 93 to 96 in f0cfe3a
|
There is no such warning on iphone X and ipad pro 4.. |
found out experimentally in IOS. also found out: |
On old iOS devices, you should render at a lower resolution (such as 540p). See https://github.com/godotengine/godot-demo-projects/tree/master/viewport/3d_scaling for an example of this. Asking a 2014 phone to render a modern game in 1920×1080 is asking a lot from it – no matter how high-end it is 🙂 |
DOF Disable, Far 20-30 meters, disable all shadow, disable water shader. I managed to get 60+ FPS at a resolution of 1600x900 on an iPhone 6. |
Unfortunately real shadows are a performance killer on mobiles and even some older desktops :I |
Games that aim to run on all kinds of devices shouldn't shy away from adding "potato settings", such as disabling shadows for all lights entirely. (You can set Specular to 0 to make the light leaking a bit less noticeable.) See Fortnite for an example of this – it does this even on desktop when Performance mode is enabled 🙂 |
anyway. |
In practice, as I found out, blur reduces performance several times more than shadows. That's if Force Vertex Shadow is worth it. |
Yep, blur is also a performance killer :( |
20.02.2024 MEM use on IOS
|
Godot version: 3.2
OS/device including version: IOS (iphone 6, iphone x)
Issue description:
Im use big atlas 2048x2048, LOSSY 0.7
IOS uses too much memory.
More than android and windows
I do not like the fact that applications on iOS (arm, arm64, x86, x86_64) weigh minimum ~40 mb
(*.a file weight 193mb, all arch)
p.s. andoid apk size min ~15-20mb
android ~200mb peak (Im used cat /adb shell "cat /proc/meminfo")
windows ~190mb
apple in xcode ~300mb (Memory warnings appear)
The text was updated successfully, but these errors were encountered: