Unreal Engine 5 Parallax Occlusion Mapping Walkthrough for Beginners

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Hey, what’s up, everyone? In today’s video, I’m going to show you how to use Parallax Occlusion Mapping, a technique that makes flat surfaces look more detailed and three-dimensional. This is a great way to add realism and immersion to your game world, without sacrificing performance. You’ll be amazed by how much depth and detail you can achieve with this technique. If you want to download a PDF guide with all the steps and screenshots of this tutorial, you can find the link in the description below. Let’s go First step is to download our texture There’s a lot of websites that you can download textures from, But for this purpose I’ll use polyhaven.com It’s great and it’s absolutely free Go assets Textures Over here choose texture you want I’ll go with this texture Over here choose the texture resolution Higher the better but more heavy on your hardware On the second dropdown make sure to choose zip And over here make sure to select only textures we need This is Diffuse or sometimes called albedo Displacement map normal You can choose between direct x or open gl I’ll go direct x And Roughness map It looks something like this Hit download For some reason sometimes it downloads everything In that case just refresh the browser and hit download again Unpack the textures and drag and drop the whole folder into unreal engine Now we need to create material so we can apply textures Go to content folder Right click and select material Name it Double click to open it To start right click and type Parallax Now hit CTRL + SPACE to open drawer Got to the textures folder and drag and drop textures to the material graph Diffusion, roughness, and normal to the right And displacement map on the left Right click on displacement map And click convert to texture object Now we can connect it to the heightmap texture pin Now connect uvs to uvs And RGB to base color Roughness to roughness And normal to normal Also, we need to add height ratio Minimum and maximum steps For this we will use scalar parameter Just right click and type scalar Rename it And connect to the pins on the right Sometimes you will see that people use constant for this purpose It’s the same functionality, nothing wrong But with scalar parameters You can adjust things like material properties while the game is running. A constant value of 1 is just a fixed number that doesn't change and is useful for situations where you always need the same value. So, use it according to your needs. Ok Next step is to create heightmap channel Just right click and type in constant 4 vector Or hold 4 on keyboard and left click Connect to heightmap channel pin Select it And on the left side change Red channel to be 1 Ok one thing to do is to add texture coordinates This will allow us to change the texture size Very useful To do that right click type text coordinate Also add multiply node And one scalar parameter Rename it something like tiling And connect it to the UVs As you see in the graph Click apply and save Let me create one simple level Go add plane If we take our material and drag it to the object Nothing happens We want to access all the parameters from the graph to be in the details panel on the right This is why scalar parameters are awesome Let me show you Right click on our material Click create material instance Now drag and drop material instance to the object And double click to open it You can see our parameters from the graph here So we can easily change values in the real time Awesome right? Lets enable it and change it For example I’ll go with these values Ok, it’s far from over But you can see if I turn off and on height ratio that we got our effect Another useful thing to add is to add reference plane This will push parallax up or down To do that go to the master material And create one scalar parameter and connect it to the reference plane Hit apply Now when we open our material instance we can see option here You can change the value to see the effect If I enable or disable height ratio you can see the difference Last thing to do is to add proper shadows to our material Right click and select static bool make it true And connect to the render shadows We want our shadows to follow our sunlight Right click and select sky atmosphere light direction This light index over here indicates which light to follow If you go to your directional light or our sun in this case And type in index You can see the index So if you have multiple lights make sure to type in index you want And type it in the material Connect it to the light vector We need to add shadow quality to make the effect look better Right click Scalar parameter Name it shadow quality And connect to shadow steps Also make another scalar parameter Name it shadow penumbra And connect it to shadow penumbra Hit apply Open material instance Enable penumbra and quality And type 1 And 32 Before I show one cool trick about pixel depth and making it look better we have last step in our shadow procedure We need to manually add shadows to our texture Just add one linear interpolation node One multiply node Connect shadow to alpha To A pin connect rgb For multiply Connect rgb to A pin And multiply to B pin on linear interpolation node Add value of 0.2 or 0.3 here And connect to the base pin Ok, shadowing is over Hit apply I’ll add one sphere to the scene And if you zoom in you can see that transition between sphere and plane is a bit ugly To make it more immersive go to material And just connect pixel depth offset with pixel depth offset Hit apply And you can see how nice it looks next to sphere But we have this strange shadow here that makes things ugly We have easy fix for that Select plane in the outline Type in shadow And deselect this cast shadow option And our problems are gone And if I move the sphere you can see how awesome this blend with the material Now if you hit CTRL L you can move sun around and see the shadow effect properly And that's how you create Parallax Occlusion Mapping in Unreal Engine 5 I hope you learned something new and useful from this video If you like this tutorial feel free to check out my other beginner-friendly tutorials about Unreal Engine Thanks for watching and I'll see you in the next one! Bye Bye!
Info
Channel: EZ Unreal
Views: 5,127
Rating: undefined out of 5
Keywords: unreal engine 5, unreal engine, parallax occlusion mapping, parallax occlusion, unreal engine tutorial, parallax occlusion mapping ue5, parallax mapping, ue4 parallax occlusion mapping, unreal 4 parallax occlusion mapping, unreal engine 4 parallax occlusion tutorial, unreal engine 4 parallax occlusion, unreal, unreal engine paralax mapping, unreal engine 5 beginner tutorial, unreal engine 4, what is parallax occlusion mapping, parallax occlusion mapping & bump-offset, ue4
Id: pQfEhYOt-yQ
Channel Id: undefined
Length: 9min 17sec (557 seconds)
Published: Fri Sep 01 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.