Post Process Pixelization
Learn how to quickly create a Pixel Shader effect for your Unreal Engine project.
Tezenari
Apr 5, 2023
Updated 3 years ago
Learn how to quickly create a Pixel Shader effect for your Unreal Engine project.
Tezenari
Apr 5, 2023
Updated 3 years ago
You can effortlessly integrate a pixelation shader into your project to add a unique, retro visual style. Let me show you how —
Create a new material
Begin by creating a new material and giving it a suitable name, such as M_Pixelization_PP. This naming recommendation is based off established naming conventions in the industry.
Configure the material settings
Open the material, navigate to its details panel, and change the Material Domain to “Post Process”
Setup the node sequence
In the material’s graph, lay out the following node sequence —
Assign the material
Lastly, insert the new material into the Post Process Material array of the Post Process Volume present in your level. Add a Post Process volume to your scene if you don’t have one already.
OptionalDo not forget to also enable the “Infinite Extent” option to ensure the Post Process Volume affects the whole level.
Experiment
With the material set, the pixelization effect should be active. Adjust the PixelSize to suit your needs.
Environment is "Log Cabin" by Gabro Media
Here are some frequently asked questions from the community —
The above implementation was the quick and easy method to achieve a pixelated look and feel. However, as you may have noticed, the sizing of the pixels change depending on the Aspect Ratio of your screen.
To maintain uniformly square pixels, it's essential to consider the aspect ratio in your implementation, as demonstrated below —
Take a look at this comparison illustrating the results before and after taking the aspect ratio into account —
Keep in mind that adding a Post Process effect such as this could potentially affect performance, particularly in intricate scenes, since it applies the effect to the final rendered image.
To strike a balance between quality and performance, consider adjusting the screen resolution, screen percentage, or even incorporating Nvidia DLSS into your project. Additionally, make sure to profile your project to identify any assets that inherently impact performance.
A blurry scene can be due to the Motion Blur setting found in the Project Settings. This setting essentially simulates a blurring of objects in motion, giving a sense of movement.
Unfortunately, this negatively impacts the pixel shader and should be disabled to improve clarity.
Yes, and no. While lowering the screen resolution can result in a pixelated appearance, the visual quality might not be as impressive.
For instance —
That said, the this is a great method for achieving the pixelated look while also being more performant.
To reduce the rendered resolution —
While effective in creating a pixelated appearance, this does not replace traditional pixel-based assets. Pixel-based assets are specifically crafted to ensure that each pixel contributes to the overall image and style. The Post Process Pixelization method, on the other hand, simply modifies the final rendered image. It does not take into account the individual assets within the scene, which may lead to loss of detail or unintended visual artifacts.
With these steps, you can create a custom pixelation effect in Unreal Engine, adding a nostalgic visual touch to your project. Experiment with the PixelSize scalar parameter to control the level of pixelation and achieve the desired look.