Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Unreal Engine 4 Shaders and Effects Cookbook
Unreal Engine 4 Shaders and Effects Cookbook

Unreal Engine 4 Shaders and Effects Cookbook: Over 70 recipes for mastering post-processing effects and advanced shading techniques

Arrow left icon
Profile Icon Brais Brenlla Ramos Profile Icon John P. Doran
Arrow right icon
$19.99 per month
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.6 (5 Ratings)
Paperback May 2019 524 pages 1st Edition
eBook
$9.99 $55.99
Paperback
$69.99
Subscription
Free Trial
Renews at $19.99p/m
Arrow left icon
Profile Icon Brais Brenlla Ramos Profile Icon John P. Doran
Arrow right icon
$19.99 per month
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.6 (5 Ratings)
Paperback May 2019 524 pages 1st Edition
eBook
$9.99 $55.99
Paperback
$69.99
Subscription
Free Trial
Renews at $19.99p/m
eBook
$9.99 $55.99
Paperback
$69.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Unreal Engine 4 Shaders and Effects Cookbook

Chapter 2. Post-Processing Effects

Welcome to the chapter on post-processing effects! Here are some of the things that we are going to be doing in the next few pages:

  • Using a Post Process Volume
  • Changing the mood of a scene through color grading
  • Setting up a cinematic shot using depth of field
  • Applying cinematic effects to our games
  • Mimicking a real-life camera using Bloom and Lens Flares
  • A horror movie pulsating effect with post process materials
  • Adjusting anti aliasing and other rendering features

Introduction


As you probably already know, Unreal combines many different pipelines in order to create whatever it is you are after—a video game, an app, an architectural walk-through. From animation to rendering, there are many different fields of study that we could be looking at. However much we would like to do so, the topics are just too wide to be tackled here. But even though we are not going to be looking at all of them, there is one important aspect that we need to pay attention to. It is one that directly affects the material and the rendering pipeline—we are talking, of course, about post-processing effects.

At their core, post-processing effects are a rendering pass that happens after our materials have been constructed but before the whole scene is outputted to the screen. They are like a layer that we can insert between what we have created and what the user experiences, so they are very powerful tools that enable us to modify and correct what we have previously done. Throughout...

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 Post Process Volume, a container in the shape of a box that specifies its area of influence.

Thankfully for us, every setting that we are going to be tweaking in this chapter can be modified using the previous actor. Having all of the post process effects grouped in one place makes our lives easier—so, let's start looking at all of the different options that we can play with!

Getting ready

I've prepared a scene for you to use as you traverse through 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 using in the next pages. You can locate the file by navigating to the following directory inside the Unreal project we are providing: Content/UE4ShadersAndEffects/Maps/Chapter02.

The name of the scene is...

Changing the mood of a scene through color grading


After we've taken some time to familiarize ourselves with the post process volume actor, it is now time to start looking at how to use the different functionalities we can find within it.

The first section that we will be covering is also the first one we can find if we look at the details panel for the actor and that is the Color Grading tab.

The reason these options exist in Unreal is similar to why they exist elsewhere, like in movies or videos. The end goal is to provide artists with a series of tools that they can use to alter the look of the final image. Similar techniques have been prominent in motion pictures, for example, where the captured footage is adjusted to satisfy a particular need be that the establishing 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 of the default camera values to modify the look of our scene.

Getting ready

In this recipe...

Setting up a cinematic shot using depth of field 


In this short recipe, we are going to take a break from the post process volume actor to focus instead on the Cinematic Camera one. That doesn't mean we are leaving behind the world of post processing effects, far from it, in fact. The beauty of this recipe resides partially in learning that the previously used post process volume has a companion in the shape of this handy camera. Both of them have access to some of the post processing functionalities that Unreal offers, and learning when to use each one can be quite useful.

The other part that we want to cover as well is the setup of a proper camera, pretty much as we would do if we were working with a real one. This is especially useful as some of the most used visual effects we can introduce directly relate to this actor, so it makes sense to master it before moving forward. 

Getting ready

You should really see this coming by now! Yes, we have a scene already set up for you, and you can find...

Applying cinematic effects to our games


We took some time aside in the previous recipe to learn about the other type of actors that have access to the post processing effects in UE4 – the cameras. In particular, we focused our attention on the cine camera actor, a specific type that has the potential to use certain cinematic effects. Taking it from there, we will continue to look at some other cinematic techniques available to us while still using that same camera actor. We'll take a look at Grain, Vignetting, Chromatic Aberration, and more. 

The reason we continue to use a camera and not the post process volume is because some of the effects we are about to include come from the world of cinematography. While they definitely can be used on the volume as well, it does make sense at this stage to continue to use the camera if only to just replicate how things would also be happening in real life. After all, Unreal bases much of its capabilities in the realm of reality, and these are another...

Mimicking a real-life camera using Bloom and Lens Flares


The post processing effects that we are going to covering in this recipe are going to deal with lights. Daily life has probably taught every one of us about the different consequences that light introduces in our vision: as in what happens when we look at a very bright spot or how our eyes adapt to sudden changes in lighting. If you have also dealt with a camera in the past, the chances are you've also seen how certain camera effects can start to show if we have a light source in our sights. This is what we are going to be covering in the following pages: namely, two of them known as Bloom and Lens Flares. Replicating those effects in Unreal is easy and can add a bit of flavor to your scenes, as long as they are use in a subtle way. Let's take a look at them!

Getting ready

The scene we are going to be using in order to introduce the previous camera effects can be found in the following folder: Content / UE4ShadersAndEffects / Maps /...

A horror movie pulsating effect with 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 we already have available through the engine. To do so, we'll take advantage of a particular type of shaders called the Post Process Materials that, to be honest, are quite self explanatory. They are the ones to be used when we need to adjust the scene as a whole. They are applied inside the post process volume, and not on a particular 3D model. Because of that, the way we create them is somewhat different to that of a standard material, so we'll be taking a look at how they are structured. This recipe will be the foundation which will let us create more complex effects later on, so let's jump right in!

Getting ready

We are going to start this recipe by loading a specific level, one which might feel familiar. Dive into the following folder and select the specified...

Adjusting anti aliasing and other rendering features


Welcome to the last recipe of this chapter! So far, we've had the opportunity to play around with most of the settings that both the post process volume and the cine camera actor have to offer. We don't want to say goodbye to this topic though without looking at some of the final technical adjustments we can perform on our scenes at a global scale. That being the case, we will focus our attention now on several important values such as the following:

  • Supersampling
  • Screen Space Reflections
  • Ambient Occlusion
  • Motion Blur
  • Anti Aliasing

All of the previous topics are often viewed more from a technical point of view rather than an artistic one. They can have a great impact on the visual quality and feel of the scene, and we don't want to downplay the part that they have on that regard. However, more often than not, they are values that we have to adjust keeping in mind the performance that we are after. It's not so much a question of whether we want...

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Create stunning visual effects for 3D games and high-quality graphics
  • Design efficient Shaders for mobile platforms without sacrificing their realism
  • Discover what goes into the structure of Shaders and why lighting works the way it does

Description

Unreal Engine 4 is a powerful game engine, one which has seen a recent boost in widespread adoption thanks to its ease of use and the powerful rendering pipeline that it packs. Seeing as how it's relatively easy to create stunning presentations and visuals, Unreal has quickly become a strong contender in industries where this kind of software had been previously denied entry. With that in mind, this book aims to help you get the most out of Unreal Engine 4 - from creating awe-inspiring graphics to delivering optimized experiences to your users. This is possible thanks to a mixture of hands-on experience with real materials and the theory behind them. You will immediately know how to create that material that you want to display, and you'll also end up with the knowledge that will let you know how to control it. All of this will be done without losing sight of two key components of any real-time application - optimization, and efficiency. The materials that you create will be light and efficient, and they will vary depending on your target platform. You'll know which techniques can be used in any kind of device and which ones should be kept to high-end machines, giving you the confidence to tackle any material-related task that you can imagine. Hop onboard and discover how!

Who is this book for?

This book is for developers who want to create their first Shaders in Unreal Engine 4 or wish to take their game to a whole new level by adding professional post-processing effects. A solid understanding of Unreal is required to get the most from this book.

What you will learn

  • Master Unreal Engine s rendering pipeline for developing real-time graphics
  • Use physically based rendering (PBR) for building materials and lighting solutions
  • Build optimized materials for games targeting multiple platforms
  • Understand Unreal Engine s node and functions for creating desirable effects
  • Design and build production-ready shaders
  • Explore Unreal Engine s Material Editor for building complex materials and textures

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : May 27, 2019
Length: 524 pages
Edition : 1st
Language : English
ISBN-13 : 9781789538540
Vendor :
Epic Games
Languages :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : May 27, 2019
Length: 524 pages
Edition : 1st
Language : English
ISBN-13 : 9781789538540
Vendor :
Epic Games
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 179.97
Unreal Engine 4 Shaders and Effects Cookbook
$69.99
Hands-On Artificial Intelligence with Unreal Engine
$43.99
Blueprints Visual Scripting for Unreal Engine
$65.99
Total $ 179.97 Stars icon
Banner background image

Table of Contents

9 Chapters
Physically Based Rendering Chevron down icon Chevron up icon
Post-Processing Effects Chevron down icon Chevron up icon
Opaque Materials and Texture Mapping Chevron down icon Chevron up icon
Translucent Materials and More Chevron down icon Chevron up icon
Beyond Traditional Material Uses Chevron down icon Chevron up icon
Advanced Material Techniques Chevron down icon Chevron up icon
Using Material Instances Chevron down icon Chevron up icon
Mobile Shaders and Material Optimization Chevron down icon Chevron up icon
Some Extra Useful Nodes Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.6
(5 Ratings)
5 star 40%
4 star 0%
3 star 40%
2 star 20%
1 star 0%
Chris Jul 28, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I'm about halfway through the book, but I wanted to write a review while it was still fresh in my mind.One of the other reviews is correct: this book would be useless if you didn't have a computer nearby. It would probably have been possible to design in such a way as to make it readable as a standalone book if it included more complete graph photos, and indeed, consisted mostly of photos. For the print version, I'm sure this would up the cost of the book drastically.To get maximum value from the book, you should download the included assets and work along with the book. You can either go step-by-step from the starting point (which the authors conveniently create for each section of each chapter), or open the completed files for that chapter, which is the final result of taking all of the steps in the chapter and applying them. This gives you some versatility in how you want to work alongside the book. In the beginning, I was meticulously taking every step myself, but as the material graphs grew larger, I found it easier to open the finished file and deconstruct each element as the book describes them.The included assets, scenes, and materials are extremely high quality. It's nice to know I'm breaking down something that is professional quality.A couple of other caveats: I am using the digital version from the publisher's site. I glanced at the paperback and kindle versions scans, and they truly look horrible. Packt needs to get its stuff together or it's going to ruin its reputation on here.Another caveat: I am a professional programmer but am otherwise a beginner with gaming / 3D development. I got serious about Unreal a few weeks ago and have been obsessively going through tutorials. To get the most use out of this book, I would also recommend you get to the point of feeling comfortable with Unreal and the basics of materials and textures.Overall, I recommend this book if the above circumstances fit yours. If you're looking for something that can be read without a computer, or don't plan on taking advantage of the well-constructed sample files, you'll find this useless.
Amazon Verified review Amazon
AJ Aug 24, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
In my opinion, one of the most important things in game development is making it look nice. This booked helped with that. I’m not great with post processing but this book made me more comfortable with it. Truly appreciate it!
Amazon Verified review Amazon
Taranis Sep 04, 2020
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
The majority of the book is about how to do something, not why it works that way with UE. It is not useful for people without solid foundation in UE shaders. The organisation of the content is poor, with little consideration about progression. A lot of the recipes are not so useful in real project.
Amazon Verified review Amazon
pAckmAn4000 Aug 23, 2019
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
It's good for those who learn UE4. It gives good overview of UE4 capabilities in PBR, materials and shaders. Though, the reason for 3 stars is the quality of printing. Normally it wouldn't bother me as long as I can read the text. But here they wrote a book about visual effects and printed it in greyscale. Seriously? It's really hard to see the difference between metallic and matt material on a picture in this book, let alone many much subtle details.
Amazon Verified review Amazon
Kristóf Morva Nov 07, 2019
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
I always wanted to gain some deeper knowledge in shaders, both in general and in Unreal Engine. Sadly, this book does not provide it, for multiple reasons.The core issue is, although it does describe how to set up specific materials, it does not explain all the nodes that were used to achieve it and the reason they were used; so although you can set up some cool effects that are described here, it does not teach you how to actually do your own materials.I don't even understand who is the target of this book. I generally read books on buses, airplane, etc, whenever I can't have my laptop. However, more than half of this book only covers how to set up the project, which material sub-graph should be copied to which part and which links should be connected. But like sometimes in 70+ steps! "42. Create a new Text Coord, copy the D subgraph after it, and connect them". And 70 of it. Now, if I was at my computer, reading a list of these would be the last thing I'd do; a YouTube tutorial is much more interactive, has a comment section for discussion, and much easier to follow.This way, this book is not readable if you're not at your computer, but why would you read it if you're at your computer when there are much better alternative interactive resources available.Let's say you ignore the parts where there are 5 pages of raw text, which describe how to connect the graphs and create the nodes, so that you can just look at the final graph and an explanation of why and how things happen. Sadly, you can't do that either.First of all, the full graph is not always included, instead, you get something like: "For the full graph, look in the material asset". Once again it's proven that you can't read it without a computer at hand.Secondly, although each recipe is broken into different sections, those sections are totally useless. Some reasoning and explanation are in the section of building the material (so you have to read the material constructing even if you're on an airplane and it's totally irrelevant), and the others are semi-randomly spread through the last 2 parts of each recipe which do not have any obvious separation between each other.I'm pretty sure the guys who wrote it are professionals, and there are surely a few things you can learn from it. But it's extremely high-level, not well organized at all, and just in general, not an easy nor a good read.That's just my opinion tho, you might still like it.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.