Unreal Engine 5: Building Worlds With Quixel Megascans
Learn how to craft Landscapes using Unreal Engine 5 and leverage the power of Quixel Megascans for high-quality textures and assets. Discover the step-by-step process of applying complex material blends and adding intricate details to create captivating gaming environments. By Matt Larson.
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress, bookmark, personalise your learner profile and more!
Create accountAlready a member of Kodeco? Sign in
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress, bookmark, personalise your learner profile and more!
Create accountAlready a member of Kodeco? Sign in
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress, bookmark, personalise your learner profile and more!
Create accountAlready a member of Kodeco? Sign in
Contents
Unreal Engine 5: Building Worlds With Quixel Megascans
20 mins
- Getting Started
- Understanding Quixel Megascans
- Navigating the Unreal Engine 5 Landscape Editor
- Landscape Mode
- Using the Scuplt Tools
- Sculpting Tools
- Using Quixel Bridge to Add Megascans
- Installing the Plugin
- Exploring the Quixel Bridge Catalogue
- Finding Textures for Your Landscape
- Finding and Adding 3D Assets
- Blending Multiple Landscape Textures
- Creating a Landscape Material
- Building the Landscape Layers
- Combining the Samples
- Material Tiling
- Duplicating the Files to Blend the Layers
- Creating a Material Instance
- Painting the Landscape
- Playing the Level
- Where to Go From Here?
- Credits
Using Quixel Bridge to Add Megascans
At the moment, this ocean surface looks bland and unnatural. By using Quixel Megascans, you can apply high-quality textures to make for a more interesting environment.
Quixel Bridge is a plugin for Unreal Engine. It quickly connects you to the Megascans library so you can browse for Assets, including 3D models and textures to include in your project.
Installing the Plugin
First, you need to enable the Quixel Bridge plugin. So, go to Edit ▸ Plugins, and in the search bar, enter Bridge to quickly find Quixel Bridge. Click the checkbox next to the plugin to make sure it’s enabled.
Then, close the Plugins window.
Exploring the Quixel Bridge Catalogue
Next, go to Window ▸ Quixel Bridge to open the interface to search, and find Megascan Assets in the Quixel library.
Examine the left side of Quixel Bridge to see the Megascans categories available from 3D Assets and Surfaces, as well as grouped Assets in Collections.
Finding Textures for Your Landscape
Now, you’ll find some Surfaces to use for textures on your Landscape.
Search for the Asset that will serve as a texture for the oceanic trench walls by adding the words Beach, Cave and Wall into the search bar.
The next step is to add the Beach Cave Wall to your project.
To add it:
- Select the Asset by clicking it.
- Click Download.
- Click Add to add this to your current project.
This returns you to the Unreal Engine editor and opens a view into the Content Browser, which organizes each Quixel Asset into a separate folder. However, if the Content Browser is already open, you’ll have to close the Bridge Window first. Here, you can see that three different textures and one Material are now part of your project.
In addition to having interesting trench walls, it would be great if the trench floor was filled with a texture of rocky debris. Return to Quixel Bridge, and search for another surface called Rocky Ground. Download and add it to the project as well.
Finding and Adding 3D Assets
It’s easy to incorporate Quixel Megascans 3D Assets into your levels. Fitting the underwater theme — and perhaps the lost city of Atlantis — try searching for Roman statues and building components.
Next, download some nice models and add them to your scene. To do this, drag the models into your scene to add a bit more content.
Blending Multiple Landscape Textures
Great! Now, it’s time to apply these textures on the landscape.
Any Material can be used with a Landscape Actor. But when you want to have better control of properties — including the periodicity of the texturing and being able to paint multiple different textures on the Landscape — then you need to turn to Landscape-specific Material nodes.
The first to learn and apply is Landscape Layer Blend. This allows you to make a blended Material combining multiple layers of Materials on your Landscape. Then, you’ll create Material Instances to customize the blending of different, complex textures from albedo, normal and other images.
Creating a Landscape Material
Start by opening the Content Drawer in the UE5 editor, and go to the Materials folder. Then, right-click an empty space to bring up the Add pop-up menu. Choose Material from the Create Basic Asset section, and name it M_Landscape_Blend.
Double-click M_Landscape_Blend to open the Blueprint. Now, add the Landscape Layer Blend node into the graph by right-clicking in the graph to the left of the existing node and searching for a LandscapeLayerBlend node type.
Select the added LandscapeLayerBlend. On the left-hand side in the Details panel, add two Layers to this node. Expand each of the layers, and name them Layer 1 and Layer 2.
Next, click and drag from the output of the Landscape Layer Blend to extend, and then release to create a new node. Nw choose to add a node type of BreakMaterialAttributes to the graph. This node type breaks out the different types of Material attributes that can then be wired into the Material node. Connect the Base Color, Metallic, Roughness, Normal and Ambient Occlusion types from the Break Material Attributes node to the final node.
Save the Material M_Landscape_Blend, and close this window for now. The BreakMaterialAttributes node will display an error — ignore that for now, as it depends on the following steps.
Building the Landscape Layers
M_Landscape_Blend depends on MaterialFunction sheets, each of which is fairly complicated.
Instead of building a complicated graph for each Material into M_Landscape_Blend, you’ll develop a Material Function that can package parts of the Material graph into a reusable unit for each of the Materials of the Landscape.
Right-click in the Content Drawer under the Materials folder to create a new Material Function. Name this MF_Layer_1, and double-click to open it.
After the Blueprint opens, start by adding a parameter TextureSampleParameter2D for the first of the texture types, and give it the name Albedo.
Repeat this to add three more TextureSampleParameter2D nodes below the first, and name these Metallic, then ORD and finally Normal for three different 2D textures. The Quixel surface Assets provide a basic albedo texture, which is basically an image without shadows or highlights. Quixel also provides a normal texture, which describes a normal map and provides additional information that improves the lighting and shadows on the textures without adding geometry.
Quixel surfaces provide a packed ORD texture that maps RGB values as R values describing Ambient Occlusion, G values describing Roughness and B values as World Displacement. Given the complexity of these textures, the Material Function Blueprint helps map the 2D texture sampling to a final output result.
Combining the Samples
Right-click the background to the right of the Albedo node to create a new one. Then, search to find the MF_MapAdjustments node type that allows you to choose how to take various outputs from different TextureSampleParameter2D nodes to be used in the texture mapping.
Wire each output as shown to create the mapping for the TextureSampleParameter2D input textures provided by Quixel Assets.
The RGB outputs from the Albedo and Normal maps and the Metallic texture inputs should be directly passed as the respective inputs into MF_MapAdjustments node.
The ORD outputs should break the R value for AO (ambient occlusion) and the G value for Roughness.
Here’s the resulting Blueprint: