Guide to Making a Beautiful Game: Vertex Displacement in HDRP
Hello all!
Today, I will be going over vertex displacement! It’s some neat stuff!
Height Maps
Height maps are the key component to making this happen. They are basically images that say where the depth is in your picture. It’s a greyscale image where the lighter parts are raised and the darker are lowered. Look below:
To make a height map, you can use a program like njob. This program is free and easy to use. Just drag in the image you want to convert, then tell it to make the map for you.
Applying Vertex Displacement
- Select the object you wish to apply this to.
- Add a material to the object.
- With the material selected, look at the inspector.
- Under Surface Options, click the drop down menu beside Displacement Mode.
- Click Pixel Displacement. This will open more options.
- Under Surface Inputs, drag in your original picture where it says Base Map and the height map in Height Map.
- Now, look at your picture and manipulate the Amplitude a little and see how the image changes shape but stays a flat object!
That was how to set up Vertex Displacement. This kind of feature can make your roads look amazing!
Next, I will go over Tessellation! Now I will actually change the object with our height maps
Thank you for your time!