CodeBlanks Logo Icon CodeBlanks

Albedo and color

Learn to give a surface its base color with the Albedo channel.

Albedo and color

Albedo represents the pure base color of a surface without embedded direct light or shadow. It reflects the inherent pigment and pattern of the object.

// Setting material Albedo base color to red
mat.color = Color.red;

The Albedo channel can receive a solid tint color or be mapped with a detailed 2D image Texture.

Texture tinting

When a Texture2D image is mapped to Albedo, the selected tint color multiplies with the texture pixels. Pure white leaves the image unaltered, while other colors tint it.

// Shifting tint color to blue via code
mat.SetColor("_Color", Color.blue);

This mechanism allows deriving mossy green or volcanic red variations from a single neutral stone texture.

Practice Print channel and color info

Assign "Albedo" to channel and "Blue" to color. Print Channel: Albedo | Color: Blue to the console.

Starter code

Player.cs
using System;

class Program
{
    static void Main()
    {
        // channel ve color değerlerini tanımlayıp yazdır
    }
}

Sample solution

Player.cs
using System;

class Program
{
    static void Main()
    {
        string channel = "Albedo";
        string color = "Blue";
        Console.WriteLine("Channel: " + channel + " | Color: " + color);
    }
}

Expected output

Channel: Albedo | Color: Blue

Questions and answers

Review the lesson questions together with their answers. To test yourself, solve the lesson interactively.

1 Which channel in a material stores pure base color or main texture devoid of lighting and shadows?

  • Occlusion
  • Emission
  • Tessellation
  • Albedo Correct answer

Explanation: Albedo is the channel storing the pure base color and primary texture of a surface in PBR material workflows.

2 Set material color

Question
material.____ = Color.green;
Answer
material.color = Color.green;

Explanation: In Unity, the 'color' property is used to alter the main Albedo color of a material.

3 Albedo terms

Term Meaning
Albedo Pure base surface color without shadow
color Color applied to the Albedo channel
Texture 2D pattern image mapped to material
Tint Blending texture with color multiplier

All lessons in Intermediate