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/overview/features/color-materials.md
+35-24Lines changed: 35 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,46 +13,56 @@ ms.topic: article
13
13
14
14
Color materials are more efficient to render than [PBR materials](pbr-materials.md) because of their simpler shading model. They also support different transparency modes.
15
15
16
-
## Common material properties
16
+
## Color material properties
17
17
18
-
These properties are common to all materials:
18
+
The following material properties are exposed in the runtime API, for instance on the [C# ColorMaterial class](/dotnet/api/microsoft.azure.remoterendering.colormaterial) or the [C++ ColorMaterial class](/cpp/api/remote-rendering/colormaterial), respectively.
19
19
20
-
***albedoColor:** This color is multiplied with other colors, such as the *albedoMap* or *:::no-loc text="vertex"::: colors*. If *transparency* is enabled on a material, the alpha channel is used to adjust the opacity, with `1` meaning fully opaque and `0` meaning fully transparent. Default is white.
20
+
*`ColorFlags`: Misc feature bits can be combined in this bit mask to enable the following features:
21
+
*`UseVertexColor`: If the mesh contains :::no-loc text="vertex"::: colors and this option is enabled, the meshes' :::no-loc text="vertex"::: color is multiplied into the `AlbedoColor` and `AlbedoMap`. By default `UseVertexColor` is disabled.
22
+
*`DoubleSided`: If double-sidedness is set to true, triangles with this material are rendered even if the camera is looking at their back faces. By default this option is disabled. See also [:::no-loc text="Single-sided"::: rendering](single-sided-rendering.md).
23
+
*`AlphaClipped`: Enables hard cut-outs on a per-pixel basis based on the alpha value being below the value of `AlphaClipThreshold` (see below). This works for opaque materials as well.
24
+
*`TransparencyWritesDepth`: If the `TransparencyWritesDepth` flag is set on the material and the material is transparent, objects using this material will also contribute to the final depth buffer. See the color material property `ColorTransparencyMode` in the next section. Enabling this feature is recommended if your use case needs a more plausible [late stage reprojection](late-stage-reprojection.md) of fully transparent scenes. For mixed opaque/transparent scenes, this setting may introduce implausible reprojection behavior or reprojection artifacts. For this reason, the default and recommended setting for the general use case is to disable this flag. The written depth values are taken from the per-pixel depth layer of the object that is closest to the camera.
25
+
*`FresnelEffect`: This material flag enables the additive [fresnel effect](../../overview/features/fresnel-effect.md) on the respective material. The appearance of the effect is governed by the other fresnel parameters `FresnelEffectColor` and `FresnelEffectExponent` explained below.
26
+
*`AlbedoColor`: This color is multiplied with other colors, such as the `AlbedoMap` or *:::no-loc text="vertex"::: colors*. If *transparency* is enabled on a material, the alpha channel is used to adjust the opacity, with `1` meaning fully opaque and `0` meaning fully transparent. The default albedo color is opaque white.
21
27
22
28
> [!NOTE]
23
29
> Since color materials don't reflect the environment, a fully transparent color material becomes invisible. This is different for [PBR materials](pbr-materials.md).
24
30
25
-
***albedoMap:** A [2D texture](../../concepts/textures.md) for per-pixel albedo values.
26
-
27
-
***alphaClipEnabled** and **alphaClipThreshold:** If *alphaClipEnabled* is true, all pixels where the albedo alpha value is lower than *alphaClipThreshold* won't be drawn. Alpha clipping can be used even without enabling transparency and is much faster to render. Alpha clipped materials are still slower to render than fully opaque materials, though. By default alpha clipping is disabled.
28
-
29
-
***textureCoordinateScale** and **textureCoordinateOffset:** The scale is multiplied into the UV texture coordinates, the offset is added to it. Can be used to stretch and shift the textures. The default scale is (1, 1) and offset is (0, 0).
31
+
*`AlbedoMap`: A [2D texture](../../concepts/textures.md) for per-pixel albedo values.
30
32
31
-
***useVertexColor:** If the mesh contains :::no-loc text="vertex"::: colors and this option is enabled, the meshes' :::no-loc text="vertex"::: color is multiplied into the *albedoColor*and *albedoMap*. By default *useVertexColor* is disabled.
33
+
*`AlphaClipThreshold`: If the `AlphaClipped` bit is set on the `ColorFlags` property, all pixels where the albedo alpha value is lower than `AlphaClipThreshold` won't be drawn. Alpha clipping can be used even without enabling transparency and is much faster to render. Alpha clipped materials are still slower to render than fully opaque materials, though. By default alpha clipping is disabled.
32
34
33
-
***isDoubleSided:** If double-sidedness is set to true, triangles with this material are rendered even if the camera is looking at their back faces. By default this option is disabled. See also [:::no-loc text="Single-sided"::: rendering](single-sided-rendering.md).
35
+
*`TexCoordScale` and `TexCoordOffset`: The scale is multiplied into the UV texture coordinates, the offset is added to it. Can be used to stretch and shift the textures. The default scale is (1, 1) and offset is (0, 0).
34
36
35
-
***TransparencyWritesDepth:** If the TransparencyWritesDepth flag is set on the material and the material is transparent, objects using this material will also contribute to the final depth buffer. See the color material property *transparencyMode* in the next section. Enabling this feature is recommended if your use case needs a more plausible [late stage reprojection](late-stage-reprojection.md)of fully transparent scenes. For mixed opaque/transparent scenes, this setting may introduce implausible reprojection behavior or reprojection artifacts. For this reason, the default and recommended setting for the general use case is to disable this flag. The written depth values are taken from the per-pixel depth layer of the object that is closest to the camera.
37
+
*`FresnelEffectColor`: The fresnel color used for this material. Only important when the fresnel effect bit has been set on this material (see above). This property controls the base color of the fresnel shine (see [fresnel effect](../../overview/features/fresnel-effect.md)for a full explanation). Currently only the rgb-channel values are important and the alpha value will be ignored.
36
38
37
-
***FresnelEffect:** This material flag enables the additive [fresnel effect](../../overview/features/fresnel-effect.md) on the respective material. The appearance of the effect is governed by the other fresnel parameters explained in the following.
39
+
*`FresnelEffectExponent`: The fresnel exponent used for this material. Only important when the fresnel effect bit has been set on this material (see above). This property controls the spread of the fresnel shine. The minimum value 0.01 causes a spread across the whole object. The maximum value 10.0 constricts the shine to only the most gracing edges visible.
38
40
39
-
***FresnelEffectColor:** The fresnel color used for this material. Only important when the fresnel effect bit has been set on this material (see above). This property controls the base color of the fresnel shine (see [fresnel effect](../../overview/features/fresnel-effect.md)for a full explanation). Currently only the rgb-channel values are important and the alpha value will be ignored.
41
+
*`VertexMix`: This value between `0` and `1` specifies how strongly the :::no-loc text="vertex"::: color in a [mesh](../../concepts/meshes.md)contributes to the final color. At the default value of 1, the :::no-loc text="vertex"::: color is multiplied into the albedo color fully. With a value of 0, the :::no-loc text="vertex"::: colors are ignored entirely.
40
42
41
-
***FresnelEffectExponent:** The fresnel exponent used for this material. Only important when the fresnel effect bit has been set on this material (see above). This property controls the spread of the fresnel shine. The minimum value 0.01 causes a spread across the whole object. The maximum value 10.0 constricts the shine to only the most gracing edges visible.
42
-
43
-
## Color material properties
43
+
*`ColorTransparencyMode`: Contrary to [PBR materials](pbr-materials.md), color materials distinguish between different transparency modes:
44
44
45
-
The following properties are specific to color materials:
45
+
*`Opaque`: The default mode disables transparency. Alpha clipping is still possible, though, and should be preferred, if sufficient.
46
+
*`AlphaBlended`: This mode is similar to the transparency mode for PBR materials. It should be used for see-through materials like glass.
47
+
*`Additive`: This mode is the simplest and most efficient transparency mode. The contribution of the material is added to the rendered image. This mode can be used to simulate glowing (but still transparent) objects, such as markers used for highlighting important objects.
46
48
47
-
***vertexMix:** This value between `0` and `1` specifies how strongly the :::no-loc text="vertex"::: color in a [mesh](../../concepts/meshes.md) contributes to the final color. At the default value of 1, the :::no-loc text="vertex"::: color is multiplied into the albedo color fully. With a value of 0, the :::no-loc text="vertex"::: colors are ignored entirely.
49
+
## Color material overrides during conversion
48
50
49
-
***transparencyMode:** Contrary to [PBR materials](pbr-materials.md), color materials distinguish between different transparency modes:
51
+
A subset of color material properties can be overridden during model conversion through the [material override file](../../how-tos/conversion/override-materials.md).
52
+
The following table shows the mapping between runtime property documented above and the property name in the override file:
50
53
51
-
1.**Opaque:** The default mode disables transparency. Alpha clipping is still possible, though, and should be preferred, if sufficient.
52
-
53
-
1.**AlphaBlended:** This mode is similar to the transparency mode for PBR materials. It should be used for see-through materials like glass.
54
+
| Material property name | Property name in override file|
1.**Additive:** This mode is the simplest and most efficient transparency mode. The contribution of the material is added to the rendered image. This mode can be used to simulate glowing (but still transparent) objects, such as markers used for highlighting important objects.
56
66
57
67
## API documentation
58
68
@@ -65,4 +75,5 @@ The following properties are specific to color materials:
Copy file name to clipboardExpand all lines: articles/remote-rendering/overview/features/pbr-materials.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,8 @@ PBR stands for **P**hysically **B**ased **R**endering and means that the materia
17
17
18
18
PBR materials aren't a universal solution, though. There are materials that reflect color differently depending on the viewing angle. For example, some fabrics or car paints. These kinds of materials aren't handled by the standard PBR model, and are currently not supported by Azure Remote Rendering. This limitation includes PBR extensions, such as *Thin-Film* (multi-layered surfaces) and *Clear-Coat* (for car paints).
19
19
20
+
The following sub-paragraphs list the material properties for PBR materials as exposed in the [material override file](../../how-tos/conversion/override-materials.md#json-schema). For the corresponding property names in the runtime API, refer to the [C# PbrMaterial class](/dotnet/api/microsoft.azure.remoterendering.pbrmaterial) or the [C++ PbrMaterial class](/cpp/api/remote-rendering/pbrmaterial), respectively.
21
+
20
22
## Common material properties
21
23
22
24
These properties are common to all materials:
@@ -36,7 +38,7 @@ These properties are common to all materials:
36
38
37
39
***isDoubleSided:** If double-sidedness is set to true, triangles with this material are rendered even if the camera is looking at their back faces. For PBR materials lighting is also computed properly for back faces. By default this option is disabled. See also [:::no-loc text="Single-sided"::: rendering](single-sided-rendering.md).
38
40
39
-
***TransparencyWritesDepth:** If the TransparencyWritesDepth flag is set on the material and the material is transparent, objects using this material will also contribute to the final depth buffer. See the PBR material flag *transparent* in the next section. Enabling this feature is recommended if your use case needs a more plausible [late stage reprojection](late-stage-reprojection.md) of fully transparent scenes. For mixed opaque/transparent scenes, this setting may introduce implausible reprojection behavior or reprojection artifacts. For this reason, the default and recommended setting for the general use case is to disable this flag. The written depth values are taken from the per-pixel depth layer of the object that is closest to the camera.
41
+
***transparencyWritesDepth:** If the TransparencyWritesDepth flag is set on the material and the material is transparent, objects using this material will also contribute to the final depth buffer. See the PBR material flag *transparent* in the next section. Enabling this feature is recommended if your use case needs a more plausible [late stage reprojection](late-stage-reprojection.md) of fully transparent scenes. For mixed opaque/transparent scenes, this setting may introduce implausible reprojection behavior or reprojection artifacts. For this reason, the default and recommended setting for the general use case is to disable this flag. The written depth values are taken from the per-pixel depth layer of the object that is closest to the camera.
40
42
41
43
***FresnelEffect:** This material flag enables the additive [fresnel effect](../../overview/features/fresnel-effect.md) on the respective material. The appearance of the effect is governed by the other fresnel parameters explained in the following.
0 commit comments