Announcement

Collapse
No announcement yet.

[Feature Request] Set Texture Max Size Per-Platform?

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

    [Feature Request] Set Texture Max Size Per-Platform?

    We have both a PC and Android version of our game, and we want to scale the textures down from 4K to something like 1K or even 512 during building. I'm 99% sure this functionality existed in UE3, but hasn't been brought across to UE4 yet (or if it is, it's somewhere really obscure).

    We've come across a number of Answerhub posts that have been answered, but they all advise changing the LOD bias of the texture in a new DeviceConfiguration.ini file. The problem is, that seems like a runtime only option. We actually need the ability to scale the physical size of the textures down to 1K instead of 4K, so that our deployable package isn't over 3 GB in size (which is insane).

    The only workaround I can find right now, is creating a duplicate of our project and force re-importing everything at a smaller resolution, which is of course mega-super-impracticalTM. Is there not a way to do this in the Content Browser or in the cooker?

    Alongside this, I've also (as the artist) force mip-maps off for a lot of these textures for better visual quality (don't worry, this is a very specific use-case), and I'm not sure that the scaling setting will therefore have any effect anyway.

    #2
    Hi TheJamsh,

    Thank you for your request. I have entered a feature request, UE-10160 to be taken into consideration.
    Adam Davis | Marketplace Support | Epic Games
    How to report a bug? | Installation & Setup issues? | Answerhub Bug Reports | Twitter

    Comment


      #3
      You can do this now. You can make an AndroidEngine.ini (in Project/Config/Android) that sets the LODBias settings for the texture groups in the SystemSettings section.

      When cooking for Android, it will read the AndroidEngine.ini file and use the max size to chop mips out at cook time.

      Coming in 4.8 will be Texture Group settings in DeviceProfiles, this will allow for the proper runtime mip selection.

      Josh
      Josh Adams | Epic Games | Platform Team Lead

      Comment


        #4
        Originally posted by Josh Adams View Post
        You can do this now. You can make an AndroidEngine.ini (in Project/Config/Android) that sets the LODBias settings for the texture groups in the SystemSettings section.

        When cooking for Android, it will read the AndroidEngine.ini file and use the max size to chop mips out at cook time.

        Coming in 4.8 will be Texture Group settings in DeviceProfiles, this will allow for the proper runtime mip selection.

        Josh
        Ah okay thanks Josh. We saw the setting but the name was confusing, it looked like something that operated at runtime rather than cook time. So the higher mips don't get packed at all?

        Comment


          #5
          Also Josh, what happens if the textures are set to have No Mip-Maps?

          Comment


            #6
            Update, this doesn't seem to work Josh, textures are still built out at maximum size regardless of that setting. My textures are imported at 4K with no mipmaps.

            They're 4K because we want both a PC build and an Android build from the same project, so on Android export I want it to make the max texture size 1K or something.

            Comment


              #7
              Actually I realize I've oddly never tried this in UE4... It may have gotten lost when we switched over to DerivedData. I will investigate. Sorry about this.

              As for textures with NoMipMap, those won't get resized.
              Josh Adams | Epic Games | Platform Team Lead

              Comment


                #8
                The large mips should get stripped based on the LODBias set in the [SystemSettings] section of the .ini...
                Josh Adams | Epic Games | Platform Team Lead

                Comment


                  #9
                  Ah okay, the problem then is probably because I've forced those textures to not have Mips (it was cheaper in this case than streaming them all in/out all the time, 4K textures are slow to move around )

                  Would it be possible to add some kind of feature to the cooker that allows you to re-size the textures on export (even those without mips?) Sorry for the delayed reply!

                  Comment


                    #10
                    Originally posted by Josh Adams View Post
                    Actually I realize I've oddly never tried this in UE4... It may have gotten lost when we switched over to DerivedData. I will investigate. Sorry about this.

                    As for textures with NoMipMap, those won't get resized.
                    Why can't you just set the texture size per image in the texture editor, instead of having to modify .INI's?

                    I changed one last night for "world", it worked once.. Opened it again got in a twist and I have to delete restart and add it again.!

                    Comment


                      #11
                      Apologies for necroing, I was trying to figure this out and came across this same question a bunch of times but it was never answered. I ended up finding out the answer by trial and error.

                      Go to Window -> Developer Tools -> Device Profiles.

                      The Windows, iOS and Mac profiles and their texture groups control the maximum size mipmap copied to the package. The other profiles control the maximum mipmap size presented on the specific device at runtime.

                      So you can include the maximum size asset for the device without wasting space on mipmap levels that will never display, then refine on each device the image size most appropriate for the amount of memory or screen res available.

                      I've just tested it on iOS and managed to reduce my desktop 4k textures down to mobile-friendly 2k in the IPA, which I am very happy about. I'll be doing more testing to make absolutely sure though.
                      Last edited by Antidamage; 06-25-2018, 06:30 AM.

                      Comment

                      Working...
                      X