Announcement

Collapse
No announcement yet.

What Affects the SM5 Texture Limit (Besides Actual Textures)?

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

    What Affects the SM5 Texture Limit (Besides Actual Textures)?

    Hey guys, just a quick question. What affects the SM5 texture limit (not including actual textures)?

    I have a material with 7 textures and am over the 16 texture limit, so in reality I can only have 6 textures. Does anyone know what else can contribute to the max texture count? This is a translucent tessellated material with custom displacement.

    I have a SceneTexture node that gets the CustomDepth buffer as well (so 6 textures + the SceneTexture), are there any other operations that could also be affecting it?
    Free Community Ocean & Sky Project || Join us on Discord! || Trello Roadmap

    #2
    Some info here: https://answers.unrealengine.com/que...-samplers.html

    The reason is that the engine has to use some samplers internally for lighting features. If your material is opaque you should have 13 samplers available. For static lighting, we reserve two for sampling from lightmaps and one for sampling from the distance field shadow map. For dynamic lighting, we reserve three samplers for reading from the indirect lighting cache. For translucent lighting we reserve 2 sampler for reading from the translucent lighting volume if you've selected non-directional and 4 samplers otherwise.

    In UE3 it was a bit simpler, you had 12 samplers for static lighting and 15 for dynamic lighting.
    TLM_Surface alone eats up 4 samplers.
    FREE VR Drum Kit Project
    FREE Color LUT Collection
    FREE Physics Driven Spacecraft Project
    FREE GTA Style Vehicle Interaction
    Dynamic DoF(Depth of Field)
    Camera Crossfade

    Comment


      #3
      Wow... OK well that makes sense now, I had no idea it used up so many of them for TLM_Surface.

      Well I need it to be TLM_Surface, translucent, dynamically lit material so I guess there's no way around it, I hope they increase the limit to 32 soon, they have been mentioning it recently.

      Thanks Jacky! BTW I'm planning to post the main material later today, still some issues to fix (buoyancy mainly) but I've held onto this long enough, might turn it into a community project for others to add to it as well, will update my thread with a download soon!
      Free Community Ocean & Sky Project || Join us on Discord! || Trello Roadmap

      Comment


        #4
        Originally posted by DotCam View Post
        BTW I'm planning to post the main material later today, still some issues to fix (buoyancy mainly) but I've held onto this long enough, might turn it into a community project for others to add to it as well, will update my thread with a download soon!
        Awesome!
        FREE VR Drum Kit Project
        FREE Color LUT Collection
        FREE Physics Driven Spacecraft Project
        FREE GTA Style Vehicle Interaction
        Dynamic DoF(Depth of Field)
        Camera Crossfade

        Comment


          #5
          There are a bunch of built in features that use texture samplers, mostly static lighting stuff but translucency also has a bunch since all translucent lighting has to be forward (in the same shader).

          In the upcoming 4.6, on PC D3D and consoles, you will be able to use up to 128 unique textures. This is made possible by picking shared samplers per TextureSample node instead of always using the UTexture asset settings.

          Comment


            #6
            Originally posted by DanielW View Post
            There are a bunch of built in features that use texture samplers, mostly static lighting stuff but translucency also has a bunch since all translucent lighting has to be forward (in the same shader).

            In the upcoming 4.6, on PC D3D and consoles, you will be able to use up to 128 unique textures. This is made possible by picking shared samplers per TextureSample node instead of always using the UTexture asset settings.
            Oh wow that's great news! Thank you Daniel, I will just leave the samples in the material disconnected until I get 4.6. 128 texture samples sounds awesome, maybe even a little bit too extreme! I doubt we will be hitting that limit for quite some time...
            Free Community Ocean & Sky Project || Join us on Discord! || Trello Roadmap

            Comment


              #7
              Originally posted by DanielW View Post
              In the upcoming 4.6, on PC D3D and consoles, you will be able to use up to 128 unique textures.


              I have been waiting for this for years. <3
              Attached Files

              Comment


                #8
                Yes it is quite overdue =) Unfortunately there is only so much time in a day. Better late than never right?

                Comment


                  #9
                  Originally posted by DanielW View Post
                  There are a bunch of built in features that use texture samplers, mostly static lighting stuff but translucency also has a bunch since all translucent lighting has to be forward (in the same shader).

                  In the upcoming 4.6, on PC D3D and consoles, you will be able to use up to 128 unique textures. This is made possible by picking shared samplers per TextureSample node instead of always using the UTexture asset settings.
                  Holy **** I've waited for this since the dawn of time! Is there any drawback from having more samples rather than atlasing textures together into the same sheet? Asking because I've put together my landscape material with 32 textures atlased into 3 sheets (base color, normal map, Rough, Height, AO).

                  Comment


                    #10
                    When you atlas, there will be artifacts in the mip maps (neighboring textures blend in). Also the atlased texture has to be streamed as a whole regardless of what is used, and all textures in the atlas are forced to the same format. But otherwise, no difference that I can think of.

                    Comment


                      #11
                      Originally posted by DanielW View Post
                      When you atlas, there will be artifacts in the mip maps (neighboring textures blend in). Also the atlased texture has to be streamed as a whole regardless of what is used, and all textures in the atlas are forced to the same format. But otherwise, no difference that I can think of.
                      I've gotten rid of both the bleeding caused by mip maps and the artifacts caused by using the frac node to cut up the atlas but I guess that's more performance heavy than just using separate textures so I think I'm better off importing them as single sheets later. Thanks!

                      Comment


                        #12
                        Originally posted by DanielW View Post
                        When you atlas, there will be artifacts in the mip maps (neighboring textures blend in). Also the atlased texture has to be streamed as a whole regardless of what is used, and all textures in the atlas are forced to the same format. But otherwise, no difference that I can think of.
                        If we had the option to generate the mip maps with an external tool, half the problem of texture atlas' would be gone. Using nearest in mip map generation helps, but leaves you with very pixelated mips. I still don't understand why we do not have an option to import our own mips. This is a perfect example for why we need it! Yes, the new feature for 128 texture samples will be great, but it would not surprise me if there are caveats / strengths to each method, in comparison to each other.

                        Originally posted by DanielW View Post
                        In the upcoming 4.6, on PC D3D and consoles, you will be able to use up to 128 unique textures. This is made possible by picking shared samplers per TextureSample node instead of always using the UTexture asset settings.
                        Is this related to using Texture Arrays? I may be mixing up the terms, but I recall there being a feature in the latest DirectX-versions which allows you to fetch texture samples from an array, allowing for a lot more texture samples to be used?

                        Great work anyhow! I will really appreciate the new support for many texture samples.
                        Last edited by Denny; 10-31-2014, 06:49 PM.
                        Programmer, Rigger, Animator - Demo Reel 2015 - My RnD / WIP thread - www.dennylindberg.com
                        Worked on: Kitten'd - Guardians of Valor (Android, iOS)

                        Comment


                          #13
                          Originally posted by Denny View Post
                          If we had the option to generate the mip maps with an external tool, half the problem of texture atlas' would be gone. Using nearest in mip map generation helps, but leaves you with very pixelated mips. I still don't understand why we do not have an option to import our own mips. This is a perfect example for why we need it! Yes, the new feature for 128 texture samples will be great, but it would not surprise me if there are caveats / strengths to each method, in comparison to each other.
                          You can already do this. After you import your texture, go to the details and make sure MipGenSettings is set to Leave Existing Mips and this will use the mips that were already in the texture.
                          FluidSurface Plugin: https://github.com/Ehamloptiran/UnrealEngine/releases
                          TextureMovie Plugin: https://github.com/Ehamloptiran/TextureMoviePlugin

                          Comment


                            #14
                            What material settings save texture samples? I'm trying to make a landscape material that will always be dynamically lit. I seems like statically lit uses more samples but I'm not 100% sure what the best setup would be.
                            Current Projects -Cat Interstellar
                            Lead Developer - Ionized Games

                            Comment


                              #15
                              Well, I went from being totally concerned about failing to optimize with tons of individual maps to... absolutely no concern at all

                              Thanks, Daniel!

                              Comment

                              Working...
                              X