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.

Fantasy Vehicle working in iOS only if shadows are disabled

Home Forums Bug Reports and Feature Requests Fantasy Vehicle working in iOS only if shadows are disabled

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #20080
    illussimo
    Customer

    Recently I had updated my Fantasy Vehicle to Blender 2.8 and Verge3D 2.14. I had to disable shadows in the Verge3D render settings to get it working on iOS (otherwise iOS only loads a few parts of my vehicle. A known limitation of iOS..). By the way, it is now updated to 2.15, but unfortunately, this is an iOS issue, not a Verge3D issue so I still had to disable shadows. In this scene, for now, the shadows are not that important.
    https://illussimo.com/webgl/myVehicle2018/my_vehicle_2018.html
    But for another application that I am building and hope to publish by the end of next week, I have baked all the shadows and ao to make it work in iOS.
    It seems iOS makes a shadow map even for lights that have no shadow implemented and also loads lights first and only then the object textures.
    Is there a workaround for this? :unsure:
    :bye: Simone

    #20138

    Hi Simone,

    To be more precise, the iOS issue relates to the limitation on the number of WebGL texture objects assigned to a single shader (iOS maximum is 8). This includes shadow maps and vanilla textures, and also some EEVEE modes such color ramps that are baked to textures upon export. Once a WebGL shader exceeds that limit, it fails to compile (crashes) and the corresponding material does not render.

    Sorry, but the only way to make it work on iOS is to carefully review your materials and lighting.

    Chief 3D Verger | LinkedIn | Twitter

    #20257
    illussimo
    Customer

    Thanks for your quick reply.
    I have a maximum of 4 texture maps per object and mostly less. I have roughness, metalness and AO in the different channels packed in one texture for efficiency. So that should be fine.
    In one project I have nearly only used procedural textures. Some of them have colour-ramps. Do you mean that if a colour-ramp is used it is seen as a texture?
    Even then my scenes should load in iOS. And they do and work fine if shadows are disabled in the Verge3D render settings.
    Somehow it seems shadows are the bottleneck for iOS. :-(
    When I bake the shadows which even adds extra textures to my objects everything still loads and works without problems in iOS. So, for now, that seems the way to go to make things also work in iOS.
    I hide and show different shadow textures if things have moved in my scene. There is always some workaround… :yes:
    :bye:

    #20267
    dssctr
    Customer

    Hi Simone,
    I had a similar issue when I accidentally duplicated my lights to six. When I realized what i had done, I removed a single source and sneak peaked each time. At a fewer number of lights(like 3 or 4) everything worked fine. Try removing a non-essential light (if you have any)and see if this helps. If I recall, it had a greater impact than even the removal of my HDR lighting.

    Hope this helps,
    Rick

    #20272

    Do you mean that if a colour-ramp is used it is seen as a texture?

    yes, color ramps and vector curves are baked to texture

    Somehow it seems shadows are the bottleneck for iOS.

    the shadows seem to add up to your textures and thus exceed the limit of 8 textures.

    Environment is also considered as a texture. But it is more efficient to use image-based lighting provided by environment texture than to have multiple lamps.

    Chief 3D Verger | LinkedIn | Twitter

    #20284
    jem
    Customer

    Hi Yuri,
    I have run into this issue in the past. I think that there is a thread on the forum on this topic from about a year ago. I know that this is an Apple issue and I wish they would fix their software, but is there a way that we, as implementers, can see the number of textures in a material? It would be convenient if the export log showed the number of textures per material. This would be similar to a compile-time warning if I were writing in C. I could use this information to fix Apple issues before I moved to QA.
    Even if I had this information, it would not be perfect because of lights and shadows. I think that a light with a shadow adds a texture to a material at run time. I would just have to keep that in mind when I was trying to stay under the Apple texture limit of 8.

    Jeremy Wernick

    #20288
    illussimo
    Customer

    But it is more efficient to use image-based lighting provided by environment texture than to have multiple lamps.

    I already did that, but I needed additional lamps to make everything the way I want it to look.
    Maybe next year Apple will comply with WebGL standards…
    For now, with baking the shadows and unchecking (real) shadows in the Verge3D settings I got everything working fine. :yes:
    :bye:

    #20297
    dssctr
    Customer

    Hi Simone,
    Another tip I found that works with mobile textures is to convert any Blender PNGs to JPG. I converted a 4k 10MB Png texture to 451Kb jpg at 50% quality with minimal visual loss in Photoshop. This, in turn, freed up a whole lot of memory for mobile so that it ran much smoother. -Rick

    #20298
    illussimo
    Customer

    Thank you Tidlybit. Yes, that is important and I had done that (in 80% quality), but most of the textures just didn’t load in iOS when using real shadows.
    With shadows baked to textures and with real shadows turned of in Verge3D everything loads and runs smoothly. So yes, converting textures from ping to jpg, not using too many lights, and baking shadows will work fine in iOS in most cases. :yes:

    #20312

    can see the number of textures in a material

    We’ll think about it!

    Chief 3D Verger | LinkedIn | Twitter

    #20399

    can see the number of textures in a material

    We’ve just implemented this!

    more details: how-many-textures-does-this-material-use

    Co-founder and lead developer at Soft8Soft.

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