We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

iPhone iPad

Home Forums General Questions iPhone iPad

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #37345
    andreabianchi22
    Customer

    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 you

    #37347

    most likely your materials have too many textures each, AND/OR you are using many lights in your scene. Apple devices are notoriously limited with regard to WebGL.

    Chief 3D Verger | LinkedIn | Twitter

    #37348
    jem
    Customer

    To 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

    #37353
    andreabianchi22
    Customer

    Thank 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 regards

    #37356
    jem
    Customer

    @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

    #37357
    andreabianchi22
    Customer

    very good, thank you for your time

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.