Home › Forums › General Questions › iPhone iPad
- This topic has 5 replies, 3 voices, and was last updated 3 years, 11 months ago by andreabianchi22.
-
AuthorPosts
-
2021-01-13 at 3:23 pm #37345andreabianchi22Customer
Hello,
My app is not working on iPhone and iPad, can I fix it? Do I need to set anything? And apart from i-phone and i-pad can you suggest me some tricks to have a good performance on smartphones?
thank you2021-01-13 at 3:53 pm #37347Yuri KovelenovStaff2021-01-13 at 3:57 pm #37348jemCustomerTo elaborate on Yuri’s comment:
@andreabianchi22, you did not mention how your app is broken on iOS. For instance, does the app boot? Is it a rendering quality issue? Is it slow. Etc.In my opinion, the first thing to keep in mind when developing for iOS is the limitation of Apple’s WebGL implementation. Due to these limitations, materials are limited to 8 textures. Light sources and ramp nodes count as textures. So, keep materials simple and minimize light sources.
In general, mobile devices do not have dedicated high-speed GPU memory (like our workstations have). You can run out of texture memory quickly on mobile. Minimize the number of texture maps that are used in a scene. Keep the dimensions of individual texture maps as small as possible. If I were targeting iOS, I would target image dimensions that are small powers of 2. For instance 128px x 128px, 256, 512. Again, there is another limitation in the WebGL implementation in iOS. It does not natively support non-power-of-two texture maps. Verge3D will automatically resize the texture for you, but it is better to manually resize the textures before you build your app (IMHO) because resizing images affects quality.
Mobile devices have limited computing power, so keep the number of polys as low as possible.
You can tether an iOS device to a Mac running Safari. This will allow you to see the dev tools and console of the iPad or iPhone. There could be some helpful debug info in Safari’s dev tools console.
If you do not have access to a Mac for debugging and are working on Chrome on Windows or Linux, pop open dev tools (f12) and look at the Verge3D performance data. Verge does warn developers if their app has too many textures for Apple. You will also be able to see performance data on polys and materials.
Jeremy Wernick
2021-01-13 at 6:02 pm #37353andreabianchi22CustomerThank you very much for your help, both Yuri and Jem.
I the meantime I have tried with other devices, iPhones 14 works good, 12 quite good (just very slow) with earlier versions it doesn’t start (black display and crash before start).
I’m going to optimize the texture (surely that’s the problem) but it’s very difficult for my project to limit the texture to eight .
Just a clarification: when you say “materials have too many textures each” do you mean more texture in the same material (diffuse + normal bump + self illumination) ?
Thanks again and best regards2021-01-13 at 6:24 pm #37356jemCustomer@andreabianchi22, yes, in iOS this is a per-material limit. So, for a particular material, the diffuse, normal, metallic, etc. all count towards this limit of 8. But, some other things count as well. As Yuri pointed out each light source adds to this count as do certain shader nodes. There was an earlier forum post on this where Yuri said that these nodes use a texture slot:
- Image Texture
- Color Ramp
- Vector Curves
- RGB Curves
The environment counts as a texture slot also.
Again, look in your dev tools console. There could be some useful messages from Verge3D in there.
Jeremy Wernick
2021-01-13 at 6:44 pm #37357andreabianchi22Customervery good, thank you for your time
-
AuthorPosts
- You must be logged in to reply to this topic.