Using Height Maps and Pixel Displacement

Let’s start by looking at what we can accomplish when we use HDRP, the goal being to make a 2D object look 3D.

In this specific case, we are going to create a material that we will apply to a plane.

The key terms to achieve this are “Height Map” and “Pixel Displacement.”

Let’s give a definition for a height map.
A two-dimensional raster image is used to store surface elevations that can later be applied to a three-dimensional object.

To get this type of image we just need to have the texture we want to use and bring it into graphics software, like Photoshop. Go and change the saturation so that only black and white remains.

Let’s move to Unity and select the material to which we need to add the new height map.

To do that we’ll have to go change the “Displacement Mode” parameter and select the “Pixel Displacement” item.

In doing so we should have in the sub-menu of the material “Surface Inputs” the entry and the space to insert the height map.

Finally, we only need to change its Amplitude to notice the difference.

See you in the next article 🚀

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Andrea Alicino

Andrea Alicino

38 Followers

Unity developer and C# programmer. Currently looking for games industry employment.