Adapting a basic material from Specular setup to Metallic

For a better understanding of the differences between Metallic and Specular workflows, we will modify the Albedo and Specular/Smoothness maps that are used on a Specular setup material, in order to adapt them to the Metallic workflow. The material to be generated will feature both metallic and non-metallic parts, with various smoothness levels.

Getting ready

For this recipe, we have prepared a Unity package containing a battery model and its original material (made with Standard Shader—Specular setup). The package includes two image files for the original Albedo and Specular/Smoothness maps which, throughout the recipe, should be adapted for use with the Metallic setup. The package is available in the 1362_04_02 folder.

How to do it...

To create a basic material, follow these steps:

  1. Import the battery_prefab Unity package into a new project.
  2. From the Project view, select the battery_prefab element. Then, from Inspector, access its material (named Battery_MAT) and change its Shader to Standard (as opposed to its current shader—Standard (Specular setup).
    How to do it...
  3. From the Project view, find the Battery_specular map and rename it Battery_metallic. Open it in your image editor (we'll use Adobe Photoshop to illustrate the following steps).
  4. Find the layer group named Specular and rename it Metallic. Then, fill the light gray layer (named Layer 2, in the Metallic group) with white (R: 255, G: 255, B: 255), and the dark gray layer (named Layer 1, in the Metallic group) with black (R: 0, G: 0, B: 0). Save the file:
    How to do it...
  5. Go back to Unity. From the Inspector view, set the modified Battery_metallic map as the Metallic map of the Battery_MAT material. Also, set None as the Albedo map for that material. This will give you an idea of how the material is coming along:
    How to do it...
  6. Now, let's adjust the Albedo texture map. From the Project view, locate the Battery_albedo map and open it in your image editor. Then, use the Paint Bucket tool to fill the black area of Layer 2, in the Albedo group, with light gray (R: 196, G: 199, B: 199). Save the file:
    How to do it...
  7. Go back to Unity. From the Inspector view, set the modified Battery_albedo map as the Albedo map of the Battery_MAT material.

Your material is ready, combining visual properties based on the different maps that you have edited and assigned.

How to do it...

How it works...

The visual aspect of the battery is a combination of three properties of its material: Metallic, Smoothness, and Albedo.

To compose the dark red part of the plastic body, for instance, we have mixed the following:

  • The Metallic map (RGB): Black (for a non-metallic appearance)
  • The Smoothness (the Alpha Channel of a Metallic map): Light gray (for a glossy appearance)
  • The Albedo map: Dark red (for a dark red color)

The light red portion, on the other hand, combines the following:

  • The Metallic map (RGB): Black
  • The Smoothness (the Alpha Channel of the Metallic map): dark gray (for a matte appearance)
  • Albedo map: red (for a red color)

Finally, the brushed metal used for the top and bottom covers combines the following:

  • The Metallic map (RGB): white (for a metallic aspect)
  • The Smoothness (the Alpha Channel of the Metallic map): blurred grey noise pattern (for a brushed appearance);
  • Albedo map: light grey (for an iron-like appearance)

Remember to organize your layers in to groups named after the property that they are related to.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.139.83.199