Game textures have specific requirements to render properly in-game. When creating textures in Unreal Editor for Fortnite (UEFN) with imported images make sure the source image file uses the power of two for height and width. This increases the compatibility and stability of your island across platforms.
Compressed file formats for graphics processing units (GPUs) must use power of two textures across all consoles, PCs, and mobile. Textures that don’t conform to the power of two rule will become unstable on lower-end platforms and possibly cause game crashes. Power of two is also used in texture streaming to lower texture resolution on platforms with less memory.
Texture streaming helps with:
-
Changing a texture’s resolution.
-
Determining how quickly a game loads.
-
Increasing the visual quality of the game.
-
Saving GPU memory.
What Power of Two Is
Computers and consoles manage and process data in limited chunks rather than all at once. This is a similar principle to how backgrounds are rendered using World Partition.
When the chunks of game data respect the power of two rule, the data chunks establish a set of hard-coded, physical restrictions on media. Unless these restrictions are conformed to, the game engine will waste resources trying to properly render assets.
Power of two is a way to optimize game data and render images to efficiently display visual experiences.
Examples of acceptable image sizes are: 256x256, 512x512, or 1024x2048. Textures that don’t use the power of two will not be optimized and cause both instability and poor island performance.
Power of two textures allow UEFN to use three key features:
-
Texture compression: Reduces memory size by approximately eight times at a minimal visual cost.
-
Mipmapping: The automatic generation of lower-resolution variants
-
Texture streaming: Shows a lower-resolution variant before higher-resolution data can be streamed into memory.
Combined, these features allow even a high-end asset with 4K textures to render on any platform. This is because the textures will have high-quality variants at a reduced resolution.
For example, a 4000x4000 texture with no alpha layer would require 64 megabytes of memory. This would have to be loaded at once and will still display at 4000x4000 even if it was causing aliasing on a small billboard, far away from the player. Texture sizes that are too large can crash devices that do not have enough memory.
By contrast, a 4096x4096 version of a texture that uses Default compression will consume only 8 megabytes, stream progressively, and produce less aliasing at a distance. Texture sizes that are too large will also increase its package size but will not cause the gameplay to crash.
Texture Sizing Requirements for UEFN
To ensure that all islands work well on all target platforms, UEFN enforces certain requirements on texture assets.
If your project contains texture assets that do not conform to these requirements, those textures will fail validation, and you will be blocked from uploading your project.
-
If your texture is assigned to the UI texture group, its dimensions must be less than the maximum size of 2048x2048. However, the texture’s dimensions do not need to be powers of 2. (UI textures do not typically stream, so that they will always appear as sharp as possible.)
-
If your texture is _not _assigned to the UI texture group, its dimensions must be less than the maximum size of 4096x4096. In addition, if it contains more pixels than the minimum threshold (1024x1024, or 1048576), it must be streamable. This means that;
-
Each of its dimensions must be a power of two (for example, 256x256, 512x512, 1024x1024, and so on).
The image does not have to be square, as long as each dimension is a power of two. For example, 256x512, 512x1024, 256x1024, and so on.
-
-
Its Never Stream property must be disabled.
-
It must be set to generate mipmaps.
-
The total memory cost of all non-streaming textures in your project must be less than a preset maximum budget. The memory cost for your project is determined by adding up the memory cost of all textures whose Never Stream property is enabled. This includes:
-
All textures whose dimensions are not powers of two (and that have not been padded or stretched to powers of two using the Padding and Resizing property). The Never Stream property is always automatically enabled for these textures.
-
All other textures whose Never Stream property has been manually enabled.
-
Every texture has a Texture Group setting that indicates its expected usage. You can set this group, and the other texture properties referred to above, by double-clicking the texture asset in the Content Browser to open the Texture Editor.
Resizing Textures
In UEFN, old imported textures that use uneven dimensions or bloated sizing can be scaled according to the power of two. Find and fix failing textures by following the steps below:
-
Open the Content Drawer or the Content Browser, and make sure to select your project’s root content folder, located in FortniteGame on the left-side file tree panel.
-
Under All, find the folder named YourProjectName Content.
-
Type
NeverStream==true&&TextureGroup!=UI
in the search bar at the top of the Content Drawer. This runs a query to identify any affected assets.
All assets that appear in this filtered view are impacted. Though this takes a while to fix, it will improve your level’s performance.
There are two ways to update affected textures that aren't in the UI group.
Option A uses UEFN’s bulk editing capabilities to group textures and edit them in one step. This is the quickest way to automatically correct your textures by padding them to the correct aspect ratio; however, this padding could result in unnecessary memory usage.
Option B takes a little longer but will make the best use of your memory budget if you need multiple affected textures resolved. This option will let you edit and re-upload textures to avoid unnecessary padding.
Option A
-
Click the hamburger menu in the Content Browser next to the search bar and select Textures. All textures are isolated in the Content Browser.
-
Click the Settings icon and turn on Columns. All textures are now listed in columns in the Content browser.
-
Search through the Dimensions column for any asset that is not using the power of two sizing.
-
Select all Textures that don’t conform to the power of two rule.
-
Right-click in the Content Browser and select Asset Actions > Edit Selection in Property Matrix. This opens the bulk editor tool where all the selected textures will be itemized in the Component Editor tab.
-
Select all texture file names in the Root section.
Click image to enlarge.
-
Open the Texture option in the Pinned Columns tab.
-
Select Pad to Power Of Two from the Padding and Resizing dropdown menu. A progress bar appears at the bottom of the editor window.
The textures have all been converted to power of two and will work across platforms now.
Option B
-
Double-click the texture to open the texture editor.
-
In the search bar at the top of the Details panel, enter the name of your source file. The result will showthe file path on your PC that will be used as the texture's original source file.
Click image to enlarge.
-
Resize the texture to the closest power of two size using an image editor such as GIMP or Paint.NET 5. You can even use Paint if the texture doesn’t feature an alpha layer.
-
A power of two size includes 256, 512, 1024, etc.
-
For example, a 500x500 texture should be 512x512, and a 600x256 texture could be 512x256.
-
Changes in aspect ratio should not have adverse effects on your island.
-
-
Right-click the texture in the Content Browser and select Reimport.
If the original texture image is missing from your files:
-
Right-click the texture in the Content Browser then select Asset Actions > Export to get a new copy.
-
Resize the texture to the closest power of two size. Then in the Content Browser right-click the texture and select Reimport With New File. When the file imports, double-click the texture to open the texture editor.
-
In the Details search bar, type Never Stream then set the option as False. If it cannot be set to False, then make sure the Imported specification at the top shows your image has a power of two size.
-
In the Details panel, search for the Mip Gen Settings option. Then in the dropdown menu, select From Texture Group.
-
In the Details panel, search for the Compression Settings option, then select Default (DXT1/5) from the dropdown menu.
Once you’ve completed these steps, check to see if you have successfully removed the restricted texture by searching NeverStream==true&&TextureGroup!=UI
in the Content Browser search bar again. The asset(s) you have updated should no longer appear here now.
Change an Individual Texture
Use the directions below if you only have one texture that doesn’t follow the power of two rule.
-
Double-click the texture to open the texture editor.
Click image to enlarge.
-
In the Details search bar, type Power of Two Mode. Then in the Padding and Resizing dropdown menu, select Pad to Square.
-
Search for the Never Stream option and set it to False.
-
Search for the Mip Gen Settings option. Then from the dropdown menu, select From Texture Group.
-
Search for the Compression Settings option, then from the dropdown menu, select Default (DXT1/5).
Once you’ve completed these steps, check that you’ve successfully removed the restricted texture by searching NeverStream==true&&TextureGroup!=UI
in the Content Browser search bar. The asset(s) you updated should no longer appear in the list.
Finding Invalid Textures
Texture assets that do not conform to the requirements laid out above are marked in the Content Browser by an error icon. Hovering over the asset shows more detail about the specific problem at the top of the tooltip:
Click image to enlarge.
Conforming Invalid Textures
The best way to fix invalid textures that you’ve imported from external files is to edit them in the original application that you used to create them, and then reimport the asset. You can also use another dedicated image editing application to edit the textures before reimporting them into UEFN.
Make sure the dimensions of each image are less than the maximum dimensions outlined above. If you’re not using the image for UI, make both the image height and width powers of two. The image does not have to be square, as long as each dimension is a power of two.
As an alternative, the UEFN offers a built-in way to make your texture sizes conform with UEFN requirements automatically. To do this:
-
In the Content Browser, select one or more invalid textures.
-
Right-click on a texture thumbnail and choose Conform Texture from the contextual menu.
The editor attempts to adjust the properties of the selected textures to avoid validation problems, and writes its results to the Output Log.
This operation has the following effects:
-
If the texture is in the UI texture group, and its dimensions are larger than the maximum permitted, the texture’s Compression > Advanced > Maximum Texture Size setting is adjusted to limit the maximum resolution of the texture that can be loaded at runtime.
-
If the texture is not in the UI texture group, and its dimensions are larger than the maximum permitted, the texture’s LOD Bias setting is adjusted so that the largest mipmaps of the texture are discarded. This effectively limits the maximum resolution of the texture that can be loaded at runtime.
-
If the texture is not in the UI texture group, and its dimensions are not powers of two, the texture’s Padding and Resizing setting is set to Stretch To Power of Two.
-
If the texture is not in the UI texture group, its Never Stream setting is disabled.