Skip to content

Commit 640ab22

Browse files
committed
bump score to over 80%
1 parent ba1e75a commit 640ab22

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

articles/remote-rendering/reference/material-mapping.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,25 +55,25 @@ Additionally to the base feature set, Azure Remote Rendering supports the follow
5555

5656
## FBX
5757

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**.
5959

6060
> [!IMPORTANT]
6161
> The Azure Remote Rendering model conversion pipeline only supports **FBX 2011 and higher**.
6262
6363
The FBX format defines a conservative approach for materials, there are only two types in the official FBX specification:
6464

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.
6666
* *Phong* - Almost all materials and most content tools use this type.
6767

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*.
6969

7070
> 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.
7171
7272
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.
7373

7474
> 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.
7575
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):
7777

7878
| FBX | Azure Remote Rendering |
7979
|:-----|:----|
@@ -117,9 +117,9 @@ Roughness = sqrt(2 / (ShininessExponent * SpecularIntensity + 2))
117117

118118
`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).
119119

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.
121121
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.
123123

124124
```cpp
125125
dielectricSpecularReflectance = 0.04
@@ -138,7 +138,7 @@ Metalness = clamp(value, 0.0, 1.0);
138138
`Albedo` is computed from `Diffuse`, `Specular`, and `Metalness`.
139139

140140
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.
142142

143143
```cpp
144144
dielectricSpecularReflectance = 0.04
@@ -150,12 +150,12 @@ albedoRawColor = lerpColors(dielectricColor, metalColor, metalness * metalness)
150150
AlbedoRGB = clamp(albedoRawColor, 0.0, 1.0);
151151
```
152152

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 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.
154154

155155
This is computed from `TransparentColor`, `TransparencyFactor`, `Opacity`:
156156

157157
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
159159
if `TransparencyFactor`, then `AlbedoAlpha` = 1.0 - `TransparencyFactor`
160160

161161
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
166166

167167
### Known issues
168168

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.
171171

172172
## Next steps
173173

0 commit comments

Comments
 (0)