Announcement

Collapse
No announcement yet.

Instanced Static Mesh on mobile?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Instanced Static Mesh on mobile?

    I've used an Instanced Static Mesh in my project, but it doesn't seem to get rendered on iPad or in the mobile preview.

    This documentation page says that Static Meshes are supported on mobile, but other types of mesh are not supported. Is an Instanced Static Mesh a separate thing from a Static Mesh for the purposes of that list?

    If so, is this a temporary restriction or a permanent one?

    I would naively have thought that mobile would be exactly where the benefits of using an Instanced Static Mesh are most useful?

    #2
    Hey shadowphiar, we currently don't suppport it on ES 2 (mobile).

    We could probably use EXT_instanced_arrays, but that introduces the additional complexity of the devices who don't support it (e.g. Apple supports it but some Android devices might not), so we'd have to add a path to handle when it isn't supported... We'll add it to our list to investigate.

    Comment


      #3
      OK, thanks for the definitive response. I'll look at doing my geometry in a different way for now.

      Comment


        #4
        Originally posted by RCaloca View Post
        Hey shadowphiar, we currently don't suppport it on ES 2 (mobile).

        We could probably use EXT_instanced_arrays, but that introduces the additional complexity of the devices who don't support it (e.g. Apple supports it but some Android devices might not), so we'd have to add a path to handle when it isn't supported... We'll add it to our list to investigate.
        Have you any plans to implement this feature on ES2 at this moment?

        Comment


          #5
          This was added on 4.4.

          Comment


            #6
            Originally posted by RCaloca View Post
            This was added on 4.4.
            Hey, this does not seem to be working for me. I've my test scene in which I load in a couple thousand of the same object. On PC all is good with 13 static mesh draw calls. However when running on my mobile (Samsung Galaxy Note3) I get all the static mesh instances added (and rendered fine) but they are not batched, resulting in a good 4k draw calls.

            I am running the latest, non-preview, (4.6.1) and I am fairly sure this phone supports the capability, in that other engines it does work.

            Has anyone else had success with this on mobile?

            Comment


              #7
              Originally posted by Xenogenik View Post
              Hey, this does not seem to be working for me. I've my test scene in which I load in a couple thousand of the same object. On PC all is good with 13 static mesh draw calls. However when running on my mobile (Samsung Galaxy Note3) I get all the static mesh instances added (and rendered fine) but they are not batched, resulting in a good 4k draw calls.

              I am running the latest, non-preview, (4.6.1) and I am fairly sure this phone supports the capability, in that other engines it does work.

              Has anyone else had success with this on mobile?
              Try this app to find out if your phone supports the EXT_instanced_arrays extension:

              https://play.google.com/store/apps/d...vdree.glesinfo

              I tested it on a phone with a snapdragon 801, which although quite recent and fast apparently does not support the extension. So maybe yours doesn't either? Those other engines might use some form of software instancing instead of hardware instancing.

              Comment


                #8
                Does instanced static meshes work on iOS? Anyone was able to check?
                How to create first person shooter game from scratch. Lots of tutorials: http://www.shootertutorial.com - celebrating 50th Tutorial!

                My Marketplace Assets

                Comment


                  #9
                  Originally posted by intoxicat3 View Post
                  Does instanced static meshes work on iOS? Anyone was able to check?
                  Just scroll up a bit, RCaloca already stated it is supported on iOS.

                  Comment


                    #10
                    Originally posted by Arnage View Post
                    Try this app to find out if your phone supports the EXT_instanced_arrays extension:

                    https://play.google.com/store/apps/d...vdree.glesinfo

                    I tested it on a phone with a snapdragon 801, which although quite recent and fast apparently does not support the extension. So maybe yours doesn't either? Those other engines might use some form of software instancing instead of hardware instancing.
                    Ah yep. That answers it. I should have checked rather than assumed. Would be nice to see a software solution similar to other engines as it does make a massive difference (for my situation anyway as I am not doing much else to chew up the CPU). Anyway, thanks again.

                    Comment


                      #11
                      On 4.6 we have support & some fixes for software based emulation. Not sure if it was also on 4.5.

                      Comment


                        #12
                        Originally posted by RCaloca View Post
                        On 4.6 we have support & some fixes for software based emulation. Not sure if it was also on 4.5.
                        Thanks RCaloca, awesome work. Do you know if it's something that the engine automatically falls back to trying to do in software if the hardware extension is not supported, or is this something we need to enable. I could not really find any answer in the docs related to the software emulation.

                        Comment


                          #13
                          Originally posted by Xenogenik View Post
                          Thanks RCaloca, awesome work. Do you know if it's something that the engine automatically falls back to trying to do in software if the hardware extension is not supported, or is this something we need to enable. I could not really find any answer in the docs related to the software emulation.
                          The engine will use hardware instancing on Desktop & iOS Metal devices currently (so Android, iOS 5 and lower use emulation).

                          Comment


                            #14
                            Originally posted by RCaloca View Post
                            The engine will use hardware instancing on Desktop & iOS Metal devices currently (so Android, iOS 5 and lower use emulation).
                            so with emulation is it limited in that draw calls will not be reduced? If they are supposed to then currently they are not... at least in my testing.

                            Comment


                              #15
                              Originally posted by Xenogenik View Post
                              so with emulation is it limited in that draw calls will not be reduced? If they are supposed to then currently they are not... at least in my testing.
                              Only if you render hundreds of objects probably, reducing 50 draw calls to 30 or 20 might not be enought to show up as perf loss.

                              Comment

                              Working...
                              X