Convert Materials to 3D Shader
There are two ways to move materials to the 3D Shader: the right click converter, which converts many materials at once, and the asset component, which works one object at a time.
The right click converter is back from version 2.81. Version 2.8 doesn’t have it, so on 2.8 use the asset component.
Converting with the right click menu
Section titled “Converting with the right click menu”- In the Project window, select the materials you want to convert, or the folders that hold them. A folder brings every material inside it, subfolders included.
- Right click and pick AllIn1 > Convert ALL materials to AllIn13DShader or AllIn1 > Convert Standard materials to AllIn13DShader.
- A dialog says how many materials are about to be converted. Pick one:
- Convert and Override switches the selected materials themselves to the 3D Shader, so everything using them changes at once. Edit > Undo takes it back.
- Convert and keep originals leaves them untouched and saves a converted copy next to each one, named
<name>_AllIn13D.
Convert ALL converts every material in the selection, whatever its shader. Convert Standard only converts materials whose shader name contains “Standard”, which leaves your custom shaders, particle materials and the like alone.
What carries over
Section titled “What carries over”Each converted material starts from the 3D Shader’s default preset and takes these from the old one:
| On the old material | In the 3D Shader |
|---|---|
| Main texture, with its tiling and offset (Base Map on URP Lit) | Main Texture, _MainTex |
| Color (Base Color on URP Lit) | Color, _Color |
| Metallic and Smoothness | _Metallic and _Smoothness |
| Normal map and its strength | Normal Map effect, _NormalMap and _NormalStrength |
| Occlusion map and its strength | AO Map effect, _AOMap and _AOMapStrength |
| Emission map and color | Emission effect, _EmissionMap and _EmissionColor |
| Render queue | the same render queue |
Each effect is turned on when the old material uses it, so a material without a normal map doesn’t get the Normal Map effect.
From the Standard shader and URP Lit, the converter also keeps the surface:
- Opaque stays opaque.
- Cutout, or Alpha Clipping on URP Lit, turns on the Alpha Cutoff effect with the same threshold, so the holes stay where they were.
- Fade and Transparent get the Transparent preset with the same blending, and stop writing depth. URP Lit’s Additive gets the Additive preset.
The lighting is set to the PBR Shading Model with the Classic light model, and Classic specular unless the old material had Specular Highlights off.
Two transparent modes don’t come out identical, because the 3D Shader doesn’t premultiply its color by alpha:
- Standard’s Transparent mode comes out as a plain alpha blend, like Fade, so highlights and reflections fade with the alpha instead of staying bright.
- URP Lit’s Multiply comes out darker wherever alpha is below 1.
From any other shader, only the properties with the same names carry over, plus the render queue. The rest, the surface included, stays at the default preset’s, so check those materials afterwards.
Moving an object through the asset component
Section titled “Moving an object through the asset component”This works on every version, 2.8 included.
- Select the object and add the asset component.
- If the object was using a Unity default, Standard shader or package material, it is swapped automatically. If it was using a custom material of yours, press New Clean Material on the component.
- Press Save Material To Folder (SEE DOC) to keep the new material as an asset, see Saving Prefabs.
To do a whole hierarchy, set one object up and press Apply Material To All Children.
What the component carries over
Section titled “What the component carries over”Properties that share a name between the two shaders are copied. From the Standard shader that means Main Texture, Color and Metallic. From URP Lit, Metallic and Smoothness carry across, but Lit keeps its texture and color under other names, so check Main Texture and Color afterwards.
Everything else stays at the 3D Shader’s default, so set it by hand and turn on the matching effect:
| On the old material | In the 3D Shader |
|---|---|
| Normal Map | Normal Map effect, _NormalMap |
| Occlusion | AO Map effect, _AOMap |
| Emission | Emission effect, _EmissionMap and _EmissionColor |
| Smoothness, on Standard | Smoothness in the PBR Shading Model, _Smoothness |
