The Best of the Basics : Unity Materials

I’m starting a series on some of the basics of Unity. With VR development, it’s easy to get sucked down the rabbit hole of all the frameworks and development associated with it. I’ve found myself neglecting some of the foundational knowledge needed for game development in Unity. This series is to help address that!

Materials, Shaders, Textures and Meshes

These four components work together to produce rendering for our games. (What about the Render Pipeline?) Well that too I guess, but for now, let’s focus on these four.

We start with our foundation, the Mesh. Meshes are the skeletal structure of our objects and are comprised of a bunch of polygons. 

Next, we have the Material. These are 2D images that wrap themselves around objects like a sheet of paper and can be used to add color, smoothness and how metallic a game object is. 

Along with Materials are Textures. These are image files that contain information about how the surface of a material should look. Materials can use references to Textures that will tell the Shader more detailed information about how the basics color, reflectivity and roughness of the Material should look. 

The Shader are scripts that apply properties contained in a Material to a Mesh. They will help determine the surface color of each pixel rendered based on the lighting and Material configuration. They can also be used to transform our materials to create cool effects, like the cartoon effects found in Borderlands.

In order to render our 3D objects onto a 2D screen, we must choose a Render Pipeline. In Unity, you might recall that we have a few choices of pipelines. There are the Built-In Render Pipeline, Universal Render Pipeline (URP), and High Definition Render Pipeline (HDRP). Which one is best depends on your specific use case. Since I primarily focus on VR development, I use the URP thanks to its ability to customize it based on my projects needs and it is highly optimized for performance.

As long as we use a Shader that is compatible with the URP, our project should render just fine!

Add Your Heading Text Here