# Unity to USD to Simplygon

As USD (Pixar's Universal Scene Description) (opens new window) is the intermediate communication layer between Unity and Simplygon we have to follow the rules of USD. From a scripter's point of view there are a few things to keep in mind, such as how data is represented in Unity, compared to USD and Simplygon.

# Unity to USD material channel mapping

When developing the Simplygon UI for Unity we decided to go with Unity's material channel names when setting up the material casters, for example Albedo, Specular, Emission, Metallic and Smoothness that are part of Unity's standard shader. This would (from our point of view) be easier for most Unity users as it does not require knowledge about USD.

These material channel names are only applied in the top-most UI layer of the Simplygon Unity plug-in and does not match the ones in the exported USD or Pipeline. The values that get saved in the Pipeline are pre-defined USD channel names. This also means that it is possible to save out Pipeline files from the Simplygon UI, load the file via script and run the optimization on an exported scene. See the conversion table below.

Unity, Simplygon UI USD (Universal Scene Description) Simplygon API
Albedo diffuseColor diffuseColor
Specular specularColor specularColor
Emission emissiveColor emissiveColor
Metallic metallic metallic
Smoothness roughness roughness
Normal Map normal normal

If we look closer at the conversion table we can see that Simplygon is preserving the USD material channel names throughout the optimization. Material channels that are not supported by USD will get discarded.

Below we can see that the material channel names in the Unity standard shader match the ones in the Simplygon UI.

Unity channel mapping