Color Space
Colors in Unity are often managed in sRGB.
In USD, colors are linear.
Color space is considered when specifying a single color or texture.
Color Space in Unity
There are multiple places to specify color space in Unity.
Project Settings
Select [Edit]-Project Settings from the menu.
In Player - Other Settings, under Rendering, you can select “Color Space.”
The default is “Linear”.
This unifies the rendering process with Linear.
This can be changed to “Gamma” for Built-In, but should be handled as “Linear.”
Texture
In the Inspector, when you select a texture in the Project window, if sRGB (Color Texture) is checked, the texture will be treated in sRGB.
In Unity, textures representing “color,” such as Base Map (Diffuse Map) and Emissive Map, are generally handled in sRGB.
HDRIs such as hdr/exr are passed directly to the renderer as linear.
Normal maps, metallic and smoothness maps, etc., are not colors and are passed to the renderer as linear.
In Unity, textures are automatically converted to linear when passed to rendering.
Therefore, users and developers do not need to be aware of color space.
sRGB Color
For the color of the material, it is to be specified in sRGB.
The color (sRGB) specified in the Base Map can be confirmed to be the same color (sRGB) in the rendering result.
These complex differences in color space are unified linearly at rendering time (linear workflow), and the flow is converted to sRGB, which is appropriate for the display when it is displayed.
Color Space in USD
All colors in the USD format are linear and unified.
This conversion by color space is automatic in the Omniverse Unity Connector’s importer and exporter.
Linear Color
For color, it is converted and passed so that it is in a linear color space.
The exporter in the Omniverse Unity Connector converts sRGB colors on Unity to linear and passes them to USD. Importers in the Omniverse Unity Connector convert linear colors in USD to sRGB and pass them to Unity.
Texture
For each material texture, you can select auto/raw/sRGB as the color space.
The color space of this texture is specified as follows, as is the case on the Unity side.
Texture Type |
Color Space |
---|---|
Albedo Map |
sRGB (auto) |
Emissive Color Map |
sRGB (auto) |
Normal Map |
raw |
Roughness Map |
raw |
Metallic Map |
raw |
Ambient Occlusion Map |
raw |
Opacity Map |
sRGB (auto) |
Note
The Opacity Map of a material exported from the Omniverse Unity Connector uses the A of the RGBA texture specified in the Albedo Map.