You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/remote-rendering/reference/material-mapping.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,25 +55,25 @@ Additionally to the base feature set, Azure Remote Rendering supports the follow
55
55
56
56
## FBX
57
57
58
-
The FBX format is closed-source and FBX materials are not compatible with PBR materials in general. FBX uses a complex description of surfaces with many unique parameters and properties and **not all of them are used by the Azure Remote Rendering pipeline**.
58
+
The FBX format is closed-source and FBX materials aren't compatible with PBR materials in general. FBX uses a complex description of surfaces with many unique parameters and properties and **not all of them are used by the Azure Remote Rendering pipeline**.
59
59
60
60
> [!IMPORTANT]
61
61
> The Azure Remote Rendering model conversion pipeline only supports **FBX 2011 and higher**.
62
62
63
63
The FBX format defines a conservative approach for materials, there are only two types in the official FBX specification:
64
64
65
-
**Lambert* - Not commonly used for quite some time already, but it is still supported by converting to Phong at conversion time.
65
+
**Lambert* - Not commonly used for quite some time already, but it's still supported by converting to Phong at conversion time.
66
66
**Phong* - Almost all materials and most content tools use this type.
67
67
68
-
The Phong model is more accurate and it is used as the *only* model for FBX materials. Below it will be referred as the *FBX Material*.
68
+
The Phong model is more accurate and it's used as the *only* model for FBX materials. Below it will be referred as the *FBX Material*.
69
69
70
70
> Maya uses two custom extensions for FBX by defining custom properties for PBR and Stingray types of a material. These details are not included in the FBX specification, so it's not supported by Azure Remote Rendering currently.
71
71
72
72
FBX Materials use the Diffuse-Specular-SpecularLevel concept, so to convert from a diffuse texture to an albedo map we need to calculate the other parameters to subtract them from diffuse.
73
73
74
74
> All colors and textures in FBX are in sRGB space (also known as Gamma space) but Azure Remote Rendering works with linear space during visualization and at the end of the frame converts everything back to sRGB space. The Azure Remote Rendering asset pipeline converts everything to linear space to send it as prepared data to the renderer.
75
75
76
-
This table shows how textures are mapped from FBX Materials to Azure Remote Rendering materials. Some of them are not directly used but in combination with other textures participating in the formulas (for instance the diffuse texture):
76
+
This table shows how textures are mapped from FBX Materials to Azure Remote Rendering materials. Some of them aren't directly used but in combination with other textures participating in the formulas (for instance the diffuse texture):
`Metalness` is calculated from `Diffuse` and `Specular` using this [formula from the glTF specification](https://github.com/bghgary/glTF/blob/gh-pages/convert-between-workflows-bjs/js/babylon.pbrUtilities.js).
119
119
120
-
The idea here is that we solve the equation: Ax<sup>2</sup> + Bx + C = 0.
120
+
The idea here is, that we solve the equation: Ax<sup>2</sup> + Bx + C = 0.
121
121
Basically, dielectric surfaces reflect around 4% of light in a specular way, and the rest is diffuse. Metallic surfaces reflect no light in a diffuse way, but all in a specular way.
122
-
This formula has a few drawbacks, because there is no way to distinguish between glossy plastic and glossy metallic surfaces. We assume most of the time the surface has metallic properties, and so glossy plastic/rubber surfaces may not look as expected.
122
+
This formula has a few drawbacks, because there's no way to distinguish between glossy plastic and glossy metallic surfaces. We assume most of the time the surface has metallic properties, and so glossy plastic/rubber surfaces may not look as expected.
`Albedo` is computed from `Diffuse`, `Specular`, and `Metalness`.
139
139
140
140
As described in the Metalness section, dielectric surfaces reflect around 4% of light.
141
-
The idea here is to linearly interpolate between `Dielectric` and `Metal` colors using `Metalness` value as a factor. If metalness is `0.0`, then depending on specular it will be either a dark color (if specular is high) or diffuse will not change (if no specular is present). If metalness is a large value, then the diffuse color will disappear in favor of specular color.
141
+
The idea here is to linearly interpolate between `Dielectric` and `Metal` colors using `Metalness` value as a factor. If metalness is `0.0`, then depending on specular it will be either a dark color (if specular is high) or diffuse won't change (if no specular is present). If metalness is a large value, then the diffuse color will disappear in favor of specular color.
`AlbedoRGB` has been computed by the formula above, but the alpha channel requires more computations. The FBX format is vague about transparency and has many ways to define it. Different content tools use different methods. The idea here is to unify them into one formula. It makes some assets incorrectly shown as transparent, though, if they are not created in a common way.
153
+
`AlbedoRGB` has been computed by the formula above, but the alpha channel requires more computations. The FBX format is vague about transparency and has many ways to define it. Different content tools use different methods. The idea here is to unify them into one formula. It makes some assets incorrectly rendered as transparent, though, if they aren't created in a common way.
154
154
155
155
This is computed from `TransparentColor`, `TransparencyFactor`, `Opacity`:
156
156
157
157
if `Opacity` is defined, then use it directly: `AlbedoAlpha` = `Opacity` else
158
-
if `TransparencyColor` is defined, then `AlbedoAlpha` = 1.0 - ((`TransparentColor`.Red + `TransparentColor`.Green + `TransparentColor`.Blue) / 3.0) else
158
+
if `TransparencyColor` is defined, then `AlbedoAlpha` = 1.0 - ((`TransparentColor.Red` + `TransparentColor.Green` + `TransparentColor.Blue`) / 3.0) else
159
159
if `TransparencyFactor`, then `AlbedoAlpha` = 1.0 - `TransparencyFactor`
160
160
161
161
The final `Albedo` color has four channels, combining the `AlbedoRGB` with the `AlbedoAlpha`.
@@ -166,8 +166,8 @@ To summarize here, `Albedo` will be very close to the original `Diffuse`, if `Sp
166
166
167
167
### Known issues
168
168
169
-
* The current formula does not work well for simple colored geometry. If `Specular` is bright enough, then all geometries become reflective metallic surfaces without any color. The workaround here is to lower `Specular` to 30% from the original or to use the conversion setting [fbxAssumeMetallic](../how-tos/conversion/configure-model-conversion.md#converting-from-older-fbx-formats-with-a-phong-material-model).
170
-
* PBR materials were recently added to `Maya` and `3DS Max` content creation tools. They use custom user-defined black-box properties to pass it to FBX. Azure Remote Rendering does not read those properties because they are not documented and the format is closed-source.
169
+
* The current formula doesn't work well for simple colored geometry. If `Specular` is bright enough, then all geometries become reflective metallic surfaces without any color. The workaround in this case is to lower `Specular` to 30% from the original or to use the conversion setting [fbxAssumeMetallic](../how-tos/conversion/configure-model-conversion.md#converting-from-older-fbx-formats-with-a-phong-material-model).
170
+
* PBR materials were recently added to `Maya` and `3DS Max` content creation tools. They use custom user-defined black-box properties to pass it to FBX. Azure Remote Rendering doesn't read those properties because they aren't documented and the format is closed-source.
0 commit comments