How to use parallax mapping for environments in Unreal Engine 5 | Tutorial

Tutorial / 12 October 2024


Front Wall

In the content drawer I make a new folder for my content

In this folder I make and save a new level

I also import the textures I will be using (downloaded from Ambient CG)


In the modeling mode, I add a box for the front wall – scaling is appropriately 

I add a second box to use as my Boolean object so I can make a window for the room 


I make the material for the bricks – using just the Albedo texture

I add the bricks material to the front wall


I right-click on the wall and choose “browse to asset”

I then rename the mesh


Under the attributes tab, I select “edit materials”

I drag-and-drop the bricks texture onto the active material slot and click on “assign active material”


Window

I add a rectangle and scale it to form the front part of the window 

I add a second rectangle for the rear of the window 


I right-click on the cubemap and choose “browse to asset”

I then rename the mesh and I also rename the glass mesh


I select the glass mesh

Under the attributes tab, I select “edit materials”

I change the active material slot to “alias reference” and click on “assign active material” – this will just be temporary


I select the cubemap mesh

Under the attributes tab, I select “edit materials”

I change the active material slot to “advanced flag” and click on “assign active material” – this will just be temporary


Interior Wall

I add a new box and scale it – this will be my interior wall

I make a new material for the planks texture 

I drag-and-drop the planks material onto the wall


I right-click on the wall and choose “browse to asset”

I then rename the mesh


Under the attributes tab, I select “edit materials”

I drag-and-drop the planks texture onto the active material slot and click on “assign active material”


Floor

I add a rectangle and scale it to the proper size for a floor 

I drag-and-drop the planks material onto the floor


I right-click on the floor and choose “browse to asset”

I then rename the mesh


Under the attributes tab, I select “edit materials”

I drag-and-drop the planks texture onto the active material slot and click on “assign active material”


Ceiling

I add a new rectangle and rotate it into place for the ceiling

I drag-and-drop the planks material onto the ceiling


I right-click on the ceiling and choose “browse to asset”

I then rename the mesh


Under the attributes tab, I select “edit materials”

I drag-and-drop the planks texture onto the active material slot and click on “assign active material”


Blueprints

In the project folder, I add a blueprint class and choose actor 

I open the blueprint actor and add a static mesh

I rename the static mesh and open the interior wall mesh

I duplicate the wall three times and place them to make a box


I select the front wall and activate “visible in scene capture only” – this will allow me to see the interior


I add another static mesh for the floor and open the mesh

I add another static mesh for the ceiling and open the mesh


I add a “scene capture component” cube to add a camera

I place the camera in the center 

I deactivate “capture every frame”

I also add a light and place it in the box


For the texture target of the camera, I choose “cube render target” and save it 

I right-click on the texture and select “create static texture”


Cubemap

I add a new material and rename it 


I open the material and add an InteriorCubemap 

I add a ScalarParameter and rename it to X_Tiling

I set the default value to 1

I duplicate this parameter and rename it to Y_Tiling


I add an append vector node and connect the two scalar nodes

I connect the append vector node to the tiling input


I add a StaticBoolParameter and rename it to randomize

I activate default value and connect this to the randomize rotation


I import the room texture I just made

I convert it to a parameter and rename it 


I connect the interior cube map to the UV input

I connect the room texture to the base color


I apply and save the material


I open the cubemap mesh and open the interior master material