Reader small image

You're reading from  Unreal Engine 5 Shaders and Effects Cookbook - Second Edition

Product typeBook
Published inMay 2023
PublisherPackt
ISBN-139781837633081
Edition2nd Edition
Concepts
Right arrow
Author (1)
Brais Brenlla Ramos
Brais Brenlla Ramos
author image
Brais Brenlla Ramos

Brais Brenlla Ramos is a passionate Architect, 3D artist, Unreal Engine 4 developer and first-time author based between A Corua and his place of work in London, UK. His passion for all things 3D-related dates back to when he was playing games as a child, experiences that fuelled his later studies in architecture and computer animation. His entrance into the professional 3D world happened at the same time as his studies were finishing, with initial projects undertaken in the field of architectural visualization for different studios. Since then, he's worked on many different 3D modeling and app development projects, first as a team member, and later as the Unreal Engine 4 lead developer at a company called AccuCities, based in London.
Read more about Brais Brenlla Ramos

Right arrow

Adding Post-Processing Effects

Welcome to the last chapter of this book! We are going to continue talking about shaders in Unreal Engine 5 but, this time, we are going to focus our attention on a very specific variety: post process materials. What makes them unique is the realm in which they operate: instead of applying this type of material to 3D objects as we’ve done throughout most of this book, these shaders are meant to be used as part of the rendering pipeline. So, what is that?

Unreal, like any other rendering engine, contains a component that takes care of depicting what we’ve placed on our levels, called the renderer. The work done by this system involves calculating how lighting interacts with 3D models, understanding the depth of the scene, and sorting out which elements are visible and which ones are occluded. Together, these operations are known as the rendering pipeline. Post process materials are shaders that get injected into it, which can be used to...

Technical requirements

All of the materials that we’ll tackle rely on assets contained in the Unreal Engine, so nothing that you’ll need beyond access to the software. In any event, let me leave you with a download link to the Unreal Engine project I’ll be using:

https://packt.link/A6PL9

Using a Post Process Volume

In order to access the different post process effects that Unreal has in store for us, we will need to place a specific actor in our level. This actor receives the name of Post Process Volume, which is a container in the shape of a box that specifies its area of influence. In this recipe, we’ll learn how to enable it in our scenes and how to work with it – something that will allow us to access many of the settings that we are going to be exploring later in this chapter.

Getting ready

I’ve prepared a scene for you to use as you traverse the different recipes of this chapter — it is a very simple one, but it should help demonstrate the different post process effects that we are going to be studying in the next few pages. You can locate the file by navigating to the following directory inside the Unreal project we are providing alongside this book: Content | Levels | Chapter09. The name of the scene is 09_01_Start, and as...

Changing the mood of a scene through color grading

After taking some time to familiarize ourselves with Post Process Volume actors, it is now time to start looking at how to use the different functionalities we can find within them. The first section that we will cover is the first one that we can find if we look at the Details panel with one of those actors selected: the Color Grading section.

Color grading tools provide artists with a series of options that they can use to alter the look of the final image they render. Similar techniques have been prominent in motion pictures, for example, where the captured footage is adjusted to satisfy a particular need; be that the establishment of a stylized look or the ensuring of color continuity. What we are going to be doing in the following pages is exactly that, tweaking the default camera values to modify the look of our scene.

Getting ready

Seeing as we are going to be focusing on changing the look of our scene in this recipe...

Creating a horror movie feeling using post process materials

Welcome back to another recipe on post-processing effects! I’m quite excited about this one, as we are about to start creating our own personal effects instead of using the ones available through the engine. To do so, we’ll take advantage of a particular type of shader called Post Process Materials, which will allow us to adjust the scene as a whole. They are a peculiar kind of material, as they get applied inside of a Post Process Volume actor – so the knowledge we acquired in the previous recipes is going to come in handy. In this recipe, we’ll put this post process material to use in order to create a red pulsating effect, with the intention to create more tension in our scene. Let’s see how to do it!

Getting ready

Getting ready for this recipe means having a scene at hand where you can test the post process material we’ll be creating. If you don’t have one that you...

Working with a cinematic camera

In this recipe, we are going to take a break from Post Process Volume actors to focus instead on the Cine Camera actor. That doesn’t mean that we are leaving behind the world of post-processing effects – far from it, in fact! In this recipe, we are going to learn how to work with cameras in Unreal and how to take advantage of some of the post process effects available through them – such as depth of field, bloom, and lens flares. As you’ll see, working with virtual cameras is very similar to working with real ones, so jump on board to learn all about them!

Getting ready

We are going to continue using the same scene we worked on in previous recipes, so feel free to open the level called 09_04_Start contained in the Content | Levels | Chapter09 folder if you want to follow along using the same assets you’ll see me employing.

As usual, feel free to continue to use your own scenes if that’s what you prefer...

Rendering realistic shots with Sequencer

Seeing as we’ve had the chance to work on great-looking scenes in the past few recipes, it would be a shame to leave those to dry out and not make the most out of them. Given how we’ve put quite a bit of effort to make them shine, why not use the opportunity to create realistic-looking renders?

In this recipe, we’ll take a look at some of the options that Unreal puts at our disposal that allow us to create high-quality renditions of our levels. We’ll look at both the High Resolution Screenshot feature as well as the automated batch-rendering process we can perform through Sequencer – Unreal’s cinematic editor. On top of that, we’ll discover how to tap into Unreal’s built-in Path Tracer, an offline tool that will allow us to use the most realistic rendering system included in the engine. Let’s see how to do all of those things next!

Getting ready

If you’ve completed...

Creating a cartoon shader effect

As we’ve seen throughout this book, Unreal can be a very versatile real-time rendering engine. Proof of that is all of the different techniques we’ve been able to apply thus far, which allowed us to create a wide range of different materials. Many of them fell under the category of realistic shaders: assets that tried to mimic what we can see in real life.

Having said that, those are not the only types that the engine can tackle. In this recipe, we’ll put Unreal’s flexibility to the test by creating a post process material that allows us to render certain objects as if they were drawn in a cartoon style. This is commonly known as cel- or toon-shading, a non-photorealistic approach to displaying our models, which makes them look as if drawn by hand. Make sure to keep reading if you want to learn more!

Getting ready

There are not many requisites to tackle this recipe! Seeing as we are going to be working on a post...

Summary

And that’s the end of the book!

I hope you’ve had a great time reading it and that you’ve learned a lot from the different recipes that we’ve tackled. The intention has always been to provide you with as much detail and knowledge as possible, in a practical way, while tackling real materials that you may encounter in a real-time project.

Throughout the book, we’ve mixed a bit of practice with theory, which will have hopefully given you not just the knowledge that you need to tackle the examples that you’ve seen so far but also empower you to create any materials that you can think of and come up with variations of those. Having said that, something that I would also like to encourage you to do is to keep on using those same materials and techniques that you’ve created and try to produce new shaders by mixing and matching the different things that you’ve learned.

As a farewell note, let me say thanks and extend...

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Unreal Engine 5 Shaders and Effects Cookbook - Second Edition
Published in: May 2023Publisher: PacktISBN-13: 9781837633081
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Brais Brenlla Ramos

Brais Brenlla Ramos is a passionate Architect, 3D artist, Unreal Engine 4 developer and first-time author based between A Corua and his place of work in London, UK. His passion for all things 3D-related dates back to when he was playing games as a child, experiences that fuelled his later studies in architecture and computer animation. His entrance into the professional 3D world happened at the same time as his studies were finishing, with initial projects undertaken in the field of architectural visualization for different studios. Since then, he's worked on many different 3D modeling and app development projects, first as a team member, and later as the Unreal Engine 4 lead developer at a company called AccuCities, based in London.
Read more about Brais Brenlla Ramos