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

Playing with Nanite, Lumen, and Other UE5 Goodies

Having arrived at the fourth chapter of this book, we can safely say that we’ve already had the chance to go over a few of the different rendering techniques available in Unreal. Putting that experience aside for the moment, it’s time for us to delve a little bit deeper into the new technologies that have arrived alongside the latest version of the engine: Nanite, Lumen, and hardware-accelerated ray tracing effects.

With that in mind, our goal for this chapter is going to be exploring these new rendering features. We’ll study each in their own dedicated recipe, including Nanite, Quixel Megascans, Lumen, and software and hardware ray tracing—while also looking at some extra ones, such as more realistic thin glass surfaces.

Here is what we’ll be learning next:

  • Taking advantage of Nanite and Quixel Megascans assets
  • Using software and hardware ray tracing
  • Revisiting screen-space and...

Technical requirements

As with the previous chapters, most of the things that you’ll need to tackle the recipes in this chapter are included within Unreal Engine 5. Just as before, we also make the Unreal Engine project available for download through the following link: https://packt.link/A6PL9

Something that we need to highlight is the need for special hardware in an upcoming recipe. One of the topics that we’ll cover deals with hardware ray tracing, a feature that requires a graphics card with ray tracing acceleration capabilities: any of the RTX series from Nvidia, the Radeon RX line from AMD, or the Arc category from Intel will do.

Despite that, we’ll also take a look at software ray tracing for those users that lack those hardware-accelerated features, so don’t worry if that’s you—we’ve got you covered!

Taking advantage of Nanite and Quixel Megascans assets

The fifth installment of Unreal Engine came bundled with a couple of surprises—the inclusion of the Quixel Megascans library and Nanite being two of them. The first is a repository that contains hundreds of high-quality photo-scanned assets, which mostly consist of 3D models, decals, and materials. The second one is none other than the engine’s virtualized geometry system, a feature that allows us to render extremely detailed models without breaking a sweat.

We’ll be looking at these two new additions to the engine through Quixel Bridge, a native app that runs within Unreal that allows us to view, download, and integrate any of the Megascans content directly into our projects. Let’s explore how to take advantage of them in the next few pages.

Getting ready

Something that we’ll do in this recipe is build a level using the available Quixel Megascans assets. Given how we are going to download...

Using software and hardware ray tracing

Ray tracing is a new way of rendering the contents of a scene, and one that allows us to achieve much more realistic results than were possible in the past with regard to lighting a scene. This type of technology has only been recently introduced in game engines, as it was traditionally too costly to implement in real-time environments. As a result, this technique has often been attributed to offline renderers such as the ones used in the animation industry or professional architectural visualization studios. The arrival of hardware-accelerated ray tracing graphics cards and new rendering solutions such as Lumen has enabled game studios and real-time graphics developers to tap into the potential of ray tracing, for calculating more realistic reflections, refraction, ambient occlusion, lighting, and shadows.

In this recipe, we are going to study how to implement several types of ray tracing solutions to achieve more realistic reflections, exploring...

Revisiting screen-space and planar reflections

Reflections are a very important visual effect that we can see in many places around us: in mirrors, puddles, glasses, and all sorts of other materials. Their importance has impacted the development of real-time rendering engines, which have tried to replicate this natural phenomenon in multiple ways.

We learned about the latest cutting-edge solution in the previous recipe when looking at software and hardware ray tracing. However, as realistic as that approach is, we have to keep in mind that not all devices support that technique. It is in those circumstances that we need to fall back to cheaper, more traditional solutions. Legacy techniques such as screen-space and planar reflections work on systems that lack the hardware needed to enable real-time ray tracing. Let’s look at how to enable them next.

Getting ready

All you’ll need this time around is a simple scene that contains an object where it makes sense to...

Creating an arch viz scene with realistic-looking glass and virtual textures

The team behind Unreal Engine 5 has gone to great lengths trying to expand the capabilities of the engine, especially when it comes to the rendering department. We’ve already looked at some of the new additions, such as Lumen and Nanite, but the continuous push toward allowing users to render anything they can imagine hasn’t stopped with those two systems.

We’ll be taking a look at two low-key newcomers in this recipe: virtual textures and the Thin Translucent Shading Model. The first of the two allows us to use large-resolution textures while reducing the memory footprint that they have on our machines. The second feature is none other than a new way of creating realistic-looking architectural glass.

As you can see, Unreal keeps on delivering on all fronts in order to make our lives as artists easier—so, let’s take advantage of that!

Getting ready

Given how we...

Varnishing wood through the Clear Coat Shading Model

We’ve created plenty of materials so far—woods, metals, glasses, and so on—and thanks to that, I think that we can already say that we know how to tackle many of them. Despite that, not everything that we see in real life can be described as a single material, which is what we’ve focused on up until this point.

There are special cases where a surface behaves like there are several materials stacked on top of each other. An example of that would be varnished wood, the topic of this recipe. Said material can be described as the combination of a wooden surface and a thin layer of varnish painted on top of it. The properties of those two materials differ, and that shows when it comes to the way light interacts with them. Consequently, the final look of a surface that has that material applied to it can’t be described through the standard Shading Model we’ve been using thus far—we’...

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