-
Materials define how an object looks in-game
-
Textures, transparency, colour, reflectiveness, etc
-
Shader:
- Code that defines how the game engine renders an object on the screen
- Unity has its own standard shader
-
Materials are made up of:
- Shaders (custom bodywork shader)
- Templates (for example a car texture)
- Colour tint
Materials inspector inside the Unity Game Engine:
- Materials are assets that takes on the properties of shaders:
- Shader - defines how the game engine (unity) renders the game object on the screen (code)
- Colour, lighting, viewing angle, texture,
- Material:
- Shader (for example, a car texture)
- Color/Colour tint
- Texture
There's a few options for what we can do with the material:
- Metallic scale
- Smoothness scale --> when light hits an object, how much reflection is there?
- Object (game object that the material is attached to)
- Smoothness scale =
0
: no reflection applied - Smoothness scale =
>0
: skybox affects
Creating & adding textures:
- Imported the course files (which included the
textures
) - Click the "albedo" circle to the left
- Select the texture (either premade, or make your own)
We adding a tile image as the texture (tiles/rows of rock/bricks):
- Increasing
tiling
in thematerial inspector
adds more rowsx
andy
values for this (across and up/down)
- Scrolling textures:
offset
(can be affected in script)
-
Adding depth:
Normal Map
, used theStones_Normal.jpg
file inAssets/Textures