Optimizing Unreal

This post begins our series on optimizing your projects. We'll explore the significance of performance and guide you on enhancing your project's efficiency, aiming to boost it from 30 fps to 100 fps.


Why is performance important?
Performance is paramount in the gaming industry because it directly impacts the player's experience and engagement. High performance in games translates to smoother gameplay, more detailed graphics, and faster response times, all of which are essential for immersing players in the game's world. A game that runs smoothly at higher frames per second (fps) ensures a more fluid and realistic experience, allowing players to react more quickly and enjoy the game's visuals to their fullest. This is especially critical in fast-paced genres like first-person shooters or racing games, where split-second decisions and reactions can be the difference between winning and losing.

Furthermore, good performance is key to a game's reputation and success in a highly competitive market. Gamers often share their experiences online, and a game that performs poorly is likely to receive negative reviews, impacting its popularity and sales. On the other hand, a game that boasts high fps and exceptional performance becomes a benchmark in the industry, setting standards for others to follow. This is why game developers invest significantly in optimization techniques to ensure their games can run on a wide range of hardware while providing the best possible experience, ultimately leading to greater player satisfaction and loyalty.

SKELETAL MESH

Skeletal Meshes are made up of two parts:
1. Set of polygons composed to make up the surface of the Skeletal mesh (Vertex Processing )
2. Hierarchical set of interconnected bones which can be used to animate the vertices of the polygons (Skinning, Animation Processing)

Type Aspect Description
CPU Bound Animation Processing The CPU is primarily responsible for animation processing. This includes calculating bone transformations, handling animations, and updating the skeletal mesh's pose. If there are a lot of complex animations or a high number of skeletal meshes, this can become CPU intensive.
Skinning Skinning, the process of deforming the mesh according to the bone movements, can be done on either the CPU or GPU. However, in many cases, it's handled by the CPU, especially in older or less optimized setups.
GPU Bound Vertex Processing Once the skeletal mesh is posed, the GPU takes over for rendering. This includes processing vertices, applying shaders, and handling other graphical elements. The complexity of shaders and the number of vertices in the mesh can make this process more GPU intensive.
Skinning (GPU Skinning) In more modern and optimized scenarios, skinning can be offloaded to the GPU, which can handle these calculations more efficiently than the CPU, especially for complex or numerous skeletal meshes.

Anim processing

Animation processing in a game engine involves the computation and handling of animations for characters and objects. This process is key to bringing virtual worlds to life with realistic or stylized movements. In animation processing, the engine calculates bone transformations and updates the skeletal mesh's pose based on the animation data. This is essential for character movement, facial expressions, and other dynamic aspects of the game world. Efficient animation processing is crucial for maintaining smooth frame rates, especially when dealing with complex animations or a large number of animated characters.

    1. Use Multithreaded Animation Calculations: Leveraging multithreaded approaches for animation calculations can significantly enhance performance.

    2. Implement Fast Path: By enabling Fast Path, Unreal Engine can access variables directly, bypassing the need to execute blueprint virtual machines. This method is substantially faster, potentially speeding up calculations by about 2.3 times.

    3. Optimize with Animation Notifies: Implement animation notifies within Unreal's C++ environment instead of relying on blueprints. This can lead to more efficient processing.

    4. Selective Physics Updates: Avoid updating physics for elements that don't require it. This can greatly reduce the workload of the FParallelAnimationCompletionTask, enhancing overall performance. This will be discussed later in our Range Based Optimization Concept.

    5. Configure Character Settings: In the Character, make sure to enable 'Update Rate Optimizations' and set 'Component Use Fixed Skel Bounds' to true. Additionally, utilizing the Budget Rate Plugin can contribute to performance efficiency.

      OR

    6. The Animation Budget Allocator is a plugin, you can use in Unreal Engine, to constrain the computation time allotted for animation data running on specified skeletal meshes. You can use the Animation Budget allocator to reduce the cost of many animating characters, by setting a processing budget, that the Budget Allocator will dynamically throttle Skeletal Mesh Component animation ticking.

Previous
Previous

Boid Algorithm