Announcement

Collapse
No announcement yet.

Question from an artist about texture optimization

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

    Question from an artist about texture optimization

    How do I go about optimizing textures for my 3D models? Is it just enough to include different resolution maps (4k, 2k, 512 etc) ? Should I watch for number of material ids? How much performance will I gain if i use less material ids?

    #2
    Keep the number of materials as low as possible, each material you use on a mesh will add a draw call. Internally the engine can adjust the texture resolution so when you're creating your textures you can make them high resolution and then scale them down in UE4, and UE4 will also create multiple sizes so that it can switch to lower resolution versions when the object is further away.

    Comment


      #3
      Originally posted by darthviper107 View Post
      Keep the number of materials as low as possible, each material you use on a mesh will add a draw call. Internally the engine can adjust the texture resolution so when you're creating your textures you can make them high resolution and then scale them down in UE4, and UE4 will also create multiple sizes so that it can switch to lower resolution versions when the object is further away.
      I have a somewhat related question, and would love to tap into your expertise. Are Maya and UE4 all I need to make all of my graphics? I get the impression Maya can do almost anything, certainly a wide variety of polygons and polyhedrons (meshes as they seem to be called) as well as animations. But the creation of "textures" is something that is less clear. There seem to be a great many "materials" available in Maya in its default state, and it would seem that one could create almost any sort of texture one wanted but I'm not sure if there is some other application or resource of which I might like to avail myself.

      One other question: for something like an actual an in-game "map" item (meaning an image which the user can only see by interacting with an prompt like "Inventory / map" and thus see the map of something [the game world, a location whatever]) which requires no z axis nor any special treatment like animation, does it make sense to use some other application (like say Blender?) for creation of those kinds of visual assets? What about things like mini-game views (hacking a computer, or lockpicking, or sharpening a tool, etc.)? I suppose if they involve animations then Maya, but if they are something more simple like a written note item in the game, still Maya?

      Comment


        #4
        In addition to a core 3d package like Maya or Max, you do need a texturing program.

        Substance Designer and Substance painter are quickly becoming the standards for texturing. Although some people still use Photoshop, or potentially alternatives like Mari, Zbrush, or 3dCoat.

        Most artists do have sculpting applications, but you don't need it for every project. More technical artists might use Houdini for some tech art magic.

        Comment


          #5
          If you're wanting to work as a 3D artist, making the models for a level or making things like props and characters and such then you need your main 3D Software like Maya/3ds Max/Blender/Etc. and then you would benefit greatly from learning a software like Substance for doing textures, it allows you do paint directly on the model and has a lot of advanced tools for that and is very specifically targeted for texturing for games. I'd still recommend using some kind of image editing software like Photoshop so you can edit texture maps directly.

          If you're trying to make an inventory of things that are in the game (like weapons for example) then you'd render out an image of the model from your 3D software and make a big library of images of all of the items that way.
          For the actual UI stuff like buttons and frames and stuff like that, you'd create the elements in something like Photoshop. UI elements can be adjusted in the editor in different ways that you'll have to learn in terms of how to make a UI texture for a button so it can be adjusted in size and things like that.

          Comment


            #6
            Well the honest answer is do you know what optimization is referencing to in the first place?


            noun

            noun: optimization; plural noun: optimizations; noun: optimisation; plural noun: optimisations
            • the action of making the best or most effective use of a situation or resource

            Most seem to think it's making things with the lowest poly count and material fidelity where it's more about getting the best output of an available resource I mean you can't have a game if you don;t use resources even if such use has been suggested to have less than ideal performance curve..


            Unreal 4 being a closed edit environment optimization of materials is something UE4 already does well if one follows the rules and has an understanding of what options are available. In others words start doing a lot of reading . In a recent release of UE4 even lightmaps are better optimized.

            Using material functions for example one can create layer masks and apply a PBR based materiel function, which is more of a procedural type material than a defused image,so you could create high detail materials with low fidelity assets.

            Substance is cool in that you can decrease the output resolution via the material instance

            The use of texture atlas's is a great way to keep the draw calls low.

            The use of material ID's is a great way of compositing more complex objects using common use components.

            Use instancing wherever you can as a habit

            What you should not do is to decrease the fidelity of the imported asset based on the 1999 assumption that doing so is ideal as to the notion of a fit to finish result. Think it as making a movie where the last thing you want to do is capture your build assets using low resolution video. 4K might be overkill but it's the output you want that needs to serve a purpose that matters.

            As for Maya, Max or even Blender these are are general use 3d applications that do a lot of things extremely well but don't do one thing insanely great.

            For animation Motionbuilder for example does a much better job of managing animation at the data level that would take days or weeks to do in the above mentioned apps.

            Last bit of advice do not develop based on an assumption of best practice as everything has it's place with in a context beyond the idea of general use being bad.

            In this case there really is no such thing as optimization as a generalization.
            Clarke's third law: Any sufficiently advanced technology is indistinguishable from magic.
            Custom Map Maker Discord
            https://discord.gg/t48GHkA
            Urban Terror https://www.urbanterror.info/home/

            Comment


              #7
              Originally posted by FrankieV View Post
              Well the honest answer is do you know what optimization is referencing to in the first place?


              noun

              noun: optimization; plural noun: optimizations; noun: optimisation; plural noun: optimisations
              • the action of making the best or most effective use of a situation or resource

              Most seem to think it's making things with the lowest poly count and material fidelity where it's more about getting the best output of an available resource I mean you can't have a game if you don;t use resources even if such use has been suggested to have less than ideal performance curve..


              Unreal 4 being a closed edit environment optimization of materials is something UE4 already does well if one follows the rules and has an understanding of what options are available. In others words start doing a lot of reading . In a recent release of UE4 even lightmaps are better optimized.

              Using material functions for example one can create layer masks and apply a PBR based materiel function, which is more of a procedural type material than a defused image,so you could create high detail materials with low fidelity assets.

              Substance is cool in that you can decrease the output resolution via the material instance

              The use of texture atlas's is a great way to keep the draw calls low.

              The use of material ID's is a great way of compositing more complex objects using common use components.

              Use instancing wherever you can as a habit

              What you should not do is to decrease the fidelity of the imported asset based on the 1999 assumption that doing so is ideal as to the notion of a fit to finish result. Think it as making a movie where the last thing you want to do is capture your build assets using low resolution video. 4K might be overkill but it's the output you want that needs to serve a purpose that matters.

              As for Maya, Max or even Blender these are are general use 3d applications that do a lot of things extremely well but don't do one thing insanely great.

              For animation Motionbuilder for example does a much better job of managing animation at the data level that would take days or weeks to do in the above mentioned apps.

              Last bit of advice do not develop based on an assumption of best practice as everything has it's place with in a context beyond the idea of general use being bad.

              In this case there really is no such thing as optimization as a generalization.

              When i say optimize, i mean next scenario. I'm creating massive cities with enterable buildings and the goal is to have the most amount of detail with the least amount of resources, while maintaining a good framerate. My meshes and textures are done, but I see a lot of room for optimization. If I optimize my materials right ( with LODs mostly, if LOD0 has 4 materials, LOD1 will have 1 for example; are there any other ways to optimize material IDs?) i'm sure my city will be much more suited for games. Without material ID management, my city would have more than 500 materials, but with the right material ID management, I can keep that in the low hundreds. Will that result in a massive fps gain or only a minor one?

              Originally posted by darthviper107 View Post
              If you're wanting to work as a 3D artist, making the models for a level or making things like props and characters and such then you need your main 3D Software like Maya/3ds Max/Blender/Etc. and then you would benefit greatly from learning a software like Substance for doing textures, it allows you do paint directly on the model and has a lot of advanced tools for that and is very specifically targeted for texturing for games. I'd still recommend using some kind of image editing software like Photoshop so you can edit texture maps directly.

              If you're trying to make an inventory of things that are in the game (like weapons for example) then you'd render out an image of the model from your 3D software and make a big library of images of all of the items that way.
              For the actual UI stuff like buttons and frames and stuff like that, you'd create the elements in something like Photoshop. UI elements can be adjusted in the editor in different ways that you'll have to learn in terms of how to make a UI texture for a button so it can be adjusted in size and things like that.
              I'm not new to the 3D world, i'm just trying to understand things better from perspective of people who will use those assets in UE4. Thank you for your advice though. I posted my situation in the reply above, my main concerns are # of materials in a scene and how do they affect the performance (mainly framerate).


              Originally posted by darthviper107 View Post
              Keep the number of materials as low as possible, each material you use on a mesh will add a draw call. Internally the engine can adjust the texture resolution so when you're creating your textures you can make them high resolution and then scale them down in UE4, and UE4 will also create multiple sizes so that it can switch to lower resolution versions when the object is further away.

              This is probably the answer I was looking for. So ultimately, a scene with ~500 materials will perform much better than a scene with ~1200 materials? My buildings have 2-3 materials on LOD0 and 1 material on LOD1, im guessing this is good enough? Is using LOD to tackle this problem a good solution? (less material ids on higher LOD levels)
              Last edited by lukasavija; 01-08-2019, 10:54 AM.

              Comment


                #8
                darthviper107 and ZacD thanks so much! Substance looks great! Off-topic out!

                Comment


                  #9
                  So I've learned about instanced static meshes, which the devs will use to reduce draw calls and optimize the game, as one mesh will be used in a scene multiple times.. I'm currently creating LOD models that all have same geometry as LOD0 model (since my meshes are already super low poly), but they all have different number of material IDs. Since they will be using instanced static meshes for most of the objects, am I wasting my time by reducing number of material IDs for various LOD levels?
                  Last edited by lukasavija; 01-09-2019, 08:19 PM.

                  Comment


                    #10
                    You should use as few Materials as possible per mesh. Sometimes this is not possible (thinking about Characters with Eyes, Hair and Cloth) On higher LODs however, you should definitively reduce the Material Count to 1 and use a very basic Material setup. If you have a Tree with LOD0 with separate trunk and leaf material would mean to have single masked material on high LODs.

                    Comment

                    Working...
                    X