Skip to main content

Materials

The following section on materials will cover what is needed to know for both avatars and worlds.

Specifics for avatars and worlds will be covered in their respective sections.

Color or detail is applied to the mesh by using a material. It combines a shader and textures.

If a part of your model is a shadeless magenta, something is wrong with the material slot (typically a referenced shader is missing) or there is no material applied to that part of the model.

To create a material in Unity, right click in the project window>New>Material. The default shader is the Standard shader, which is a physically based, or PBR shader.

Shader

Component of a material which determines how it interacts with light. The 2 types of shaders you will work with in VRChat most often are PBR shaders for photorealism, and toon shaders for a toon or anime look.

Watch the video below as it will help you understand the textures section better.

TL;DR everything reflects and absorbs some light.

Textures/Maps

The 2D images a material combines which are projected onto the triangles.

Projected onto those triangles are textures (AKA maps), which are 2D images. Unity utilizes several different types of textures, combined into a material, which you can then apply to a 3D model.

Texels (texture pixels)

Texture types:
Albedo (AKA basecolor) texture

The color of the surface, but with all the shading information removed.

Normal map

A mostly blue-purple image, which fakes 3D by altering the angle (the normal vector) at which light reflects off of the surface (at a specific texel).

Originally posted by docs.unity3d.com:

A stone wall texture and its corresponding normal map texture
Occlusion (AKA Ambient Occlusion, AO) map

Puts indirect shading information into the material, simulating parts where it would be harder for light to escape. Separating the occlusion map from the albedo map allows for more intricate shading according to the lights in the scene.

Smoothness map

Controls how clear the reflections in a material are.

Unity has an idiosyncratic way of handling these, and because the industry standard is roughness maps, not smoothness maps, I would recommend using an alternative more feature packed PBR shader such as:

These shaders offer many more options than Unity's standard shader and will increase the visual fidelity of your avatar or (especially) world. Further notes on each in their respective sections.

DON’T GO OVERBOARD WITH THE SMOOTHNESS! If a material isn’t shiny (like unpolished wood or brick), don’t make it overly shiny! It will just look wet or wrong!

Metallic map

Defines which parts of the material are metallic.

Specular Map

For use with the alternative specular workflow. I would only recommend this workflow to beginners if your material comes with a specular map.

Emission map

When activated, the emission property of the material is used to define the intensity and color of light it emits. The emission map is used to define how the emission is different across the material.

Diffuse map

A base color map with balanced shading (no clearly directional light source). This is the texture you would get if you simply took a picture of a surface. If a model only has one texture then it would be considered a diffuse texture (you will find this a lot on toon shaded models).

This texture has fallen out of favor in the PBR workflow for the albedo and ambient occlusion texture combination, which allows for more variable shading of a material and better compression when using multiple albedo maps (like for different skins).

You can read a more in-depth guide on PBR shading written by Silent here.

UV mapping

Specifies how the 2D textures should be projected onto the faces.

Originally posted by Wikipedia:


The best way to think of it is that your mesh is made of paper, and you have to decide where you want the cuts in order to lay it flat.

UV stands for the vertical and horizontal axes U & V, since W,X,Y & Z are already used.

Unity Texture settings:

Types

  • Default- all the textures on a material except the normal map(s)
  • Normal- normal maps must be set to this in order to function properly
  • Sprite- if you want to have a 2d image displayed in 3D space (ie use it for a picture hanging on a wall)
SRGB

Should be disabled on grayscale textures (e.g. height, AO, metallic) or else they won’t function properly!!!

Mip Map Filtering

If the texture looks too blurry from a distance, try changing the filtering algorithm from Box to Kaiser.

MipMapping Explained

Filter Mode

Set to Trilinear for the best result.

Aniso Level

Makes textures not appear blurry when viewed from angles. I would recommend setting it to 16.

In Unity the setting is a slider but only works in powers of 2. If it is set to a non power of 2, it will go down to the next lowest power of 2 (e.g. 10 would go down to 8).

Texture compression settings

Max resolution
The maximum resolution the texture renders at.
For world textures I typically wouldn’t recommend setting it higher than 1K (1024x1024).

Crunch compression

A lossy compression algorithm. I would recommend setting it to around 20 for the best compromise between file size and quality.