text
stringlengths
0
17.2k
The Animation Budget Allocator is a Plugin for Unreal Engine, that you can use to throttle animation evaluation and quality, on multiple characters to reduce the performance cost of your projects entire animation system.
For more information about optimizing animation systems with the Animation Budget Allocator, see the following documentation:
Animation Budget Allocator
System for constraining the time taken for animation data by dynamically throttling Skeletal Mesh Component ticking.
Debugging Tools
Animation Optimization
Rewind Debugger
Animation Insights
Pose Watch
Animation Budget Allocator
Remarks
Adding Detail Textures
When viewing a Material very closely, you will notice that the textures used in the Material can break down and become pixelated. To optimize performance, textures are often scaled to a resolution that looks good from moderate distances, but may not hold up to close scrutiny.
To address this issue, you can use what is known as a detail texture to prevent a Material from looking pixelated when it is viewed very closely.
Detail texturing allows you to give the illusion of more detail in a texture by layering a highly repeated diffuse and normal texture over the object's original diffuse and normal textures. This gives the illusion of greater detail at close range than usually would be possible.
Here is an example of detail texturing in action.
On the left side (labeled 1), the Material uses a detail texture to add additional high-frequency details to the surface. On the right side (labeled 2) the Material does not use a detail texture. Note that the image on the left appears sharper and more detailed than the image on the right.
If you search in the Palette or context menu for "detail texturing", you will find a Detail Texturing Material Function. While this is not the only way that you can apply detail textures to Materials, it is the fastest from a workflow perspective, since all the logic is contained within the Material Function. All you need to provide is texture inputs.
In order for the Detail Texturing Material Function to work correctly, you will need to convert the Textures you want to use as the Detail Textures from regular Texture Samples into Texture Objects. Use the following steps to do this.
Find the Texture Sample you want to use as a detail texture.
Right click on the Texture Sample node and select Convert To Texture Object from the context menu.
The Texture Sample is converted to a Texture Object.
There are two ways you can configure a Material to use Detail Texturing, and both of these are documented below. The main difference between the two methods is whether to use the premade Detail Texturing Material Function, or to create the detail texturing logic manually in the Material graph. Neither option is better or worse, as they produce the same results in the end. The method you choose to use depends on the needs of the specific Material and project.
All of the content used in the following sections is available in the Unreal Engine Starter Content. While the techniques that are shown here will work with any Textures, if you want to follow along, make sure your project includes the Starter Content.
Create a new Material to use for testing. Right-click in the Content Browser and choose Material from the Create Basic Asset section in the context menu. Give the Material a descriptive name like DetailTexturing.
Open the Material by double-clicking the asset in the Content Browser. The Material Editor opens.
Find the following four textures in the Starter Content. Drag them from the Content Browser into your Material graph.
When completed, your Material Graph should look like this:
Right-click in the Material graph and search for "Detail Texturing" in the context Menu. Click on DetailTexturing under the Misc category to add the Material Function to your graph.
A DetailTexturing Material Function is created in the Material Graph.
In this example the T_GroundGravel_D and T_Ground_Moss_N will be used as detail textures. In order to connect detail textures to the Material Function they must be converted to Texture Objects. Right-click on T_GroundGravel_D and T_Ground_Moss_N and convert them to Texture Objects.
Connect all the nodes as shown below. The two brick textures should connect to the Diffuse and Normal inputs, and the two Texture Objects should connect to the DetailDiffuse and DetailNormal pins. Pass the Diffuse output into Base Color and the Normal output into the Normal input on the Main Material Node.
Additonal values are needed to control the scale and intensity of the textures. You could use either a Constant Material Expression or Scalar Parameter for these inputs. This example uses three Scalar Parameters named Scale, Diffuse Intensity, and Normal Intensity. The default value in all three of these nodes is set to 1.
Connect the Scalar Parameters to their corresponding inputs. When completed, your Material Graph should look like this.
By adjusting the values in the Scalar Parameters, you can modify how the Detail Textures will look. Here is an example of what happens when you set the Scale to a value of 1, then 5, and finally 10. The detail texture tiles more times across the mesh, meaning the texture itself appears smaller or finer.
If for whatever reason you cannot use the Detail Texturing Material Function, you can build this functionality inside the Material Graph using Material Expression nodes and the directions below.
Duplicate the first Material in the Content Browser by right-clicking the thumbnail and choosing Duplicate from the context menu. Rename the new Material DetailTexturing_02 and double-click to open it in the Material Editor.
Delete everything except the four textures. You also need to convert the two Texture Objects back to Texture Samples. Right click each Texture Object node and choose Convert to Texture Sample from the context menu.
When completed, the Material Graph should look like this.
After you add all the nodes to your graph, begin connecting them as shown. The image below shows the correct configuration for the Base Color portion of the graph. When completed, the Material Graph should look like this.
Click image to enlarge.
The logic created in the Base Color section to control texture scale can be reused with the normal maps. Connect the nodes as shown below.
Click image to enlarge.
With the Base Color and Normal map now all connected together, the Material is now ready to be compiled, saved, and used.
Click image to enlarge.
The following section covers some tips and tricks on different ways you can use detail texturing in your Materials.
When dealing with large surfaces, such as terrain, you may notice that even though your textures tile seamlessly there is noticeable repetition that weakens the appearance of the texture, especially when viewed in the distance.
To fix this, you can modify the Detail Material that was created previously to allow it to display one texture when the camera is close and another texture when the camera is far away. This is often referred to as distance-based texture blending. You can implement this by following the instructions below.