top of page

- Material Basics -

    Greetings and welcome to the Rendering Section of our Documentation. We will have a brief explanation on how rendering works in Unreal Engine to a very basic degree. There are a few reasons for this;

  • Being a 3D Engine, materials alone is a massive concept by itself. So big that it is kind of out of UF2D's scope since it is 2D based despite being a Framework of Unreal Engine.

  • UF2D comes with already more than enough materials and properties such as the complex within yet easy to use Palette System.

    We might eventually cover some stuff such as Niagara and have examples for cool effects but for now we will do the basics. ^-^

 1- Textures


    Textures are our images; raw data we use in Unreal Engine which we import into to use for various places. Aside from a few exceptions, they are not used alone and mostly used in Materials and Sprites. There are many adjustments we can do in its Editor but it is strongly suggested to make the changes in an external image editor.

  • There are 2 ways of importing a file into Unreal Engine. Easy way is just dragging out of screen into the Content Browser. Other way is simply [RMB] clicking on an empty place in a folder at Content Browser and selecting the file.

  • One of the important feature of Unreal Engine we need to use is "Applying Paper2D Texture Settings" into the images we upload to make sure they are pixelated. Otherwise important features like Palette System won't work.

 2- Materials

    Materials are what a Scene Component needs to have in order to be visible in the scene. Every object that Players can see MUST have a material applied to them. 

  • Making materials is easy. Just [RMB] click on an empty space in a Content Browser and select "New Material.

  • Video to the right shows how we make a simple emissive material with a 3 Vector node, cute at best!

  • As mentioned before, we won't go deep into how to make a useful material but instead, will be focusing on what they are.

 3- Material Instances

  • In Unreal Engine, Material instancing is used to change the appearance of a Material without incurring an expensive recompilation of the Material. We could say a Material Instance is a child of a Material that can't have extra code but can change its parameters runtime.

  • Let's do it the wrong way to understand it. We will be having 2 cubes with 2 different materials.

  • One thing we might notice is, two Materials here are doing the same thing.

  • For having proper optimization, making things easier for developers and being able to change values runtime, that's why Material Instances are way better in such cases.

  • Now let's do it the right way. First we will convert the 3 Vector Node in the Material to a "Parameter" by [RMB] clicking on it and selecting the said option. Then we will [RMB] click on the material itself and select "Create Material Instance".

  • When we open the Instance, we can see in the menu there is a parameter named "Color". Now we can have many instances of the same material with different properties without the compiling going on!

 4- Materials of UF2D

  • There are many materials that are already prepared to be used in UF2D. They are still work in progress both functionality and number wise so keep checking the folder that contains them!

  • In the right you will see that the Material Template folder contains 2 sub folders, named "Basic" and "Palette". "Basic" contains non-palette material instances whereas "Palette" contains the ones that mostly Fighters and Projectiles use.

  • In UF2D, base materials are named with "_Mat" tag whereas instances are with "_MI" so we can easily distinguish between the files. 

  • We will be using those Materials in the sections to come so don't worry if you don't understand them yet!

  • "NoPal" tag states that the default colors of the Sprite will be used. These materials are mostly used for Stages, Projectiles, Companions and Effects.

  • "Lit" and "Unlit" tags are for whether the material will make the Sprite get affected by the lighting of the stage or not.

  • "Translucent" is not only used for translucency purposes. All sprites need to have that property or else they can't have render sorting/priority.

  • "Masked" ones are used rarely only for Stage Sprites so they can have proper Dynamic Shadows if used. "Additive" ones are useful for effects like Fire and "OS" tags are for not having two-faced sprites if really needed.

  • "PalGrid" tag ones are the Material Instances that demand one texture grid to get the colors to index them, and another one to apply desired colors to said indexes. More about palettes in the next section!


    That's all for the Material Basics of Unreal Engine. Next section will be about the Palette System! Thanks for your time and reading!

bottom of page