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/how-tos/conversion/configure-model-conversion.md
+38-37Lines changed: 38 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -181,7 +181,7 @@ These adjustments are possible:
181
181
* Specific data streams can be explicitly included or excluded.
182
182
* The accuracy of data streams can be decreased to reduce the memory footprint.
183
183
184
-
The following `vertex` section in the `.json` file is optional. For each portion that isn't explicitly specified, the conversion service falls back to its default setting.
184
+
The following `vertex` section in the JSON file is optional. For each portion that isn't explicitly specified, the conversion service falls back to its default setting.
185
185
186
186
```json
187
187
{
@@ -197,6 +197,7 @@ The following `vertex` section in the `.json` file is optional. For each portion
197
197
"texcoord1" : "NONE"
198
198
},
199
199
...
200
+
}
200
201
```
201
202
202
203
By forcing a component to `NONE`, it's guaranteed that the output mesh doesn't have the respective stream.
@@ -207,73 +208,73 @@ These formats are allowed for the respective components:
|position| **32_32_32_FLOAT**, 16_16_16_16_FLOAT | Vertex position, must always be present. |
211
-
|color0| **8_8_8_8_UNSIGNED_NORMALIZED**, NONE | Vertex colors. See `useVertexColor` property in both [Color materials](../../overview/features/color-materials.md) and [PBR materials](../../overview/features/pbr-materials.md), and `vertexMix` in [Color materials](../../overview/features/color-materials.md). |
212
-
|color1| 8_8_8_8_UNSIGNED_NORMALIZED, **NONE**| Unused, leave it to **NONE**. |
213
-
|normal| **8_8_8_8_SIGNED_NORMALIZED**, 16_16_16_16_FLOAT, NONE | Used for lighting in [PBR materials](../../overview/features/pbr-materials.md). |
214
-
|tangent| **8_8_8_8_SIGNED_NORMALIZED**, 16_16_16_16_FLOAT, NONE | Used for lighting with normal maps in [PBR materials](../../overview/features/pbr-materials.md). |
215
-
|binormal| **8_8_8_8_SIGNED_NORMALIZED**, 16_16_16_16_FLOAT, NONE | Used for lighting with normal maps in [PBR materials](../../overview/features/pbr-materials.md). |
216
-
|texcoord0| **32_32_FLOAT**, 16_16_FLOAT, NONE | First slot of texture coordinates. Individual textures (albedo, normal map, ...) can either use slot 0 or 1, which is defined in the source file. |
217
-
|texcoord1| **32_32_FLOAT**, 16_16_FLOAT, NONE | Second slot of texture coordinates. Individual textures (albedo, normal map, ...) can either use slot 0 or 1, which is defined in the source file. |
211
+
|`position`|`32_32_32_FLOAT`, `16_16_16_16_FLOAT`| Vertex position, must always be present. |
212
+
|`color0`|`8_8_8_8_UNSIGNED_NORMALIZED`, `NONE`| Vertex colors. See `useVertexColor` property in both [Color materials](../../overview/features/color-materials.md) and [PBR materials](../../overview/features/pbr-materials.md), and `vertexMix` in [Color materials](../../overview/features/color-materials.md). |
213
+
|`color1`|`8_8_8_8_UNSIGNED_NORMALIZED`, `NONE`| Unused, leave it to `NONE`. |
214
+
|`normal`|`8_8_8_8_SIGNED_NORMALIZED`, `16_16_16_16_FLOAT`, `NONE`| Used for lighting in [PBR materials](../../overview/features/pbr-materials.md). |
215
+
|`tangent`|`8_8_8_8_SIGNED_NORMALIZED`, `16_16_16_16_FLOAT`, `NONE`| Used for lighting with normal maps in [PBR materials](../../overview/features/pbr-materials.md). |
216
+
|`binormal`|`8_8_8_8_SIGNED_NORMALIZED`, `16_16_16_16_FLOAT`, `NONE`| Used for lighting with normal maps in [PBR materials](../../overview/features/pbr-materials.md). |
217
+
|`texcoord0`|`32_32_FLOAT`, `16_16_FLOAT`, `NONE`| First slot of texture coordinates. Individual textures (albedo, normal map, ...) can either use slot 0 or 1, which is defined in the source file. |
218
+
|`texcoord1`|`32_32_FLOAT`, `16_16_FLOAT`, `NONE`| Second slot of texture coordinates. Individual textures (albedo, normal map, ...) can either use slot 0 or 1, which is defined in the source file. |
218
219
219
220
#### Supported component formats
220
221
221
-
The memory footprints of the formats are as follows:
222
+
The following table describes the memory footprints of supported component formats:
222
223
223
224
| Format | Description | Bytes per :::no-loc text="vertex"::: |
224
225
|:-------|:------------|:---------------|
225
-
|32_32_FLOAT|two-component full floatingpoint precision|8
|`8_8_8_8_UNSIGNED_NORMALIZED`|four-component byte, normalized to the`[0; 1]` range|4
231
+
|`8_8_8_8_SIGNED_NORMALIZED`|four-component byte, normalized to the`[-1; 1]` range|4
231
232
232
233
#### Best practices for component format changes
233
234
234
-
* `position`: It's rare that reduced accuracy is sufficient. **16_16_16_16_FLOAT** introduces noticeable quantization artifacts, even for small models.
235
-
* `normal`, `tangent`, `binormal`: Typically these values are changed together. Unless there are noticeable lighting artifacts that result from normal quantization, there's no reason to increase their accuracy. In some cases, though, these components can be set to **NONE**:
236
-
* `normal`, `tangent`, and `binormal` are only needed when at least one material in the model should be lit. In ARR this is the case when a [PBR material](../../overview/features/pbr-materials.md) is used on the model at any time.
237
-
* `tangent` and `binormal` are only needed when any of the lit materials uses a normal map texture.
238
-
* `texcoord0`, `texcoord1` : Texture coordinates can use reduced accuracy (**16_16_FLOAT**) when their values stay in the `[0; 1]` range and when the addressed textures have a maximum size of 2048 x 2048 pixels. If those limits are exceeded, the quality of texture mapping will suffer.
235
+
*`position`: It's rare that reduced accuracy is sufficient. `16_16_16_16_FLOAT` introduces noticeable quantization artifacts, even for small models.
236
+
*`normal`, `tangent`, and `binormal`: Typically, these values are changed together. Unless there are noticeable lighting artifacts that result from normal quantization, there's no reason to increase their accuracy. In some cases, though, these components can be set to `NONE`:
237
+
*`normal`, `tangent`, and `binormal` are needed only when at least one material in the model should be lit. In Azure Remote Rendering, this is the case when a [PBR material](../../overview/features/pbr-materials.md) is used on the model at any time.
238
+
*`tangent` and `binormal` are needed only when any of the lit materials use a normal map texture.
239
+
*`texcoord0`, `texcoord1` : Texture coordinates can use reduced accuracy (`16_16_FLOAT`) when their values stay in the `[0; 1]` range and when the addressed textures have a maximum size of 2,048 × 2,048 pixels. If those limits are exceeded, the quality of texture mapping decreases.
239
240
240
241
#### Example
241
242
242
243
Assume you have a photogrammetry model, which has lighting baked into the textures. All that is needed to render the model are :::no-loc text="vertex"::: positions and texture coordinates.
243
244
244
-
By default the converter has to assume that you may want to use PBR materials on a model at some time, so it will generate `normal`, `tangent`, and `binormal` data for you. So, the pervertex memory usage is `position` (12 bytes) + `texcoord0` (8 bytes) + `normal` (4 bytes) + `tangent` (4 bytes) + `binormal` (4 byte) = 32 bytes. Larger models of this type can easily have many millions of :::no-loc text="vertices"::: resulting in models that can take up multiple gigabytes of memory. Such large amounts of data will affect performance and you may even run out of memory.
245
+
By default, the converter has to assume that you might want to use PBR materials on a model at some time, so it generates `normal`, `tangent`, and `binormal` data for you. So, the per-:::no-loc text="vertex"::: memory usage is `position` (12 bytes) + `texcoord0` (8 bytes) + `normal` (4 bytes) + `tangent` (4 bytes) + `binormal` (4 byte) = 32 bytes. Larger models of this type can easily have many millions of :::no-loc text="vertices":::, resulting in models that can take up multiple gigabytes of memory. Such large amounts of data will affect performance, and you might even run out of memory.
245
246
246
-
Knowing that you never need dynamic lighting on the model, and knowing that all texture coordinates are in `[0; 1]` range, you can set `normal`, `tangent`, and `binormal` to `NONE` and `texcoord0` to half precision (`16_16_FLOAT`), resulting in only 16 bytes per :::no-loc text="vertex":::. Cutting the mesh data in half enables you to load larger models and potentially improves performance.
247
+
Knowing that you never need dynamic lighting on the model, and knowing that all texture coordinates are in the `[0; 1]` range, you can set `normal`, `tangent`, and `binormal` to `NONE`, and set`texcoord0` to half precision (`16_16_FLOAT`), resulting in only 16 bytes per :::no-loc text="vertex":::. Cutting the mesh data in half enables you to load larger models and potentially improves performance.
247
248
248
249
## Settings for point clouds
249
250
250
-
When converting a point cloud, only a small subset of properties from the schema is used. Other properties are being ignored, if specified.
251
+
When a point cloud is converted, only a small subset of properties from the schema is used. Other properties are ignored unless they are specified.
251
252
252
253
The properties that do have an effect on point cloud conversion are:
253
254
254
-
* `scaling` - same meaning as for triangular meshes.
255
-
* `recenterToOrigin` - same meaning as for triangular meshes.
256
-
* `axis` - same meaning as for triangular meshes. Default values are `["+x", "+y", "+z"]`, however most point cloud data will be rotated compared to renderer's own coordinate system. To compensate, in most cases `["+x", "+z", "-y"]` fixes the rotation.
257
-
* `gammaToLinearVertex` - similar to triangular meshes, this flag indicates whether point colors should be converted from gamma space to linear space. Default value for point cloud formats (E57, PLY, LAS, LAZ and XYZ) is true.
258
-
259
-
* `generateCollisionMesh` - similar to triangular meshes, this flag needs to be enabled to support [spatial queries](../../overview/features/spatial-queries.md).
255
+
*`scaling`: The same meaning as for triangular meshes.
256
+
*`recenterToOrigin`: The same meaning as for triangular meshes.
257
+
*`axis`: The same meaning as for triangular meshes. Default values are `["+x", "+y", "+z"]`, but most point cloud data will be rotated compared to the renderer's own coordinate system. To compensate, in most cases `["+x", "+z", "-y"]` fixes the rotation.
258
+
*`gammaToLinearVertex`: Similar to triangular meshes, this flag indicates whether point colors should be converted from gamma space to linear space.The default value for point cloud formats (`E57`, `PLY`, `LAS`, `LAZ`, and `XYZ`) is `true`.
259
+
*`generateCollisionMesh`: Similar to triangular meshes, to support [spatial queries](../../overview/features/spatial-queries.md), you must enable this flag.
260
260
261
261
## Memory optimizations
262
262
263
-
Memory consumption of loaded content may become a bottleneck on the rendering system. If the memory payload becomes too large, it may compromise rendering performance, or cause the model to not load altogether. This paragraph discusses some important strategies to reduce the memory footprint.
263
+
Memory consumption of loaded content might become a bottleneck on the rendering system. If the memory payload becomes too large, it might compromise rendering performance or cause the model to not load altogether. This paragraph discusses some important strategies to reduce the memory footprint.
264
264
265
265
> [!NOTE]
266
-
> The following optimizations apply to triangular meshes. There is no way to optimize the output of point clouds through conversion settings.
266
+
> The following optimizations apply to triangular meshes. You can't optimize the output of point clouds through conversion settings.
267
267
268
268
### Instancing
269
269
270
-
Instancing is a concept where meshes are reused for parts with distinct spatial transformations, as opposed to every part referencing its own unique geometry. Instancing has significant impact on the memory footprint.
270
+
In instancing, meshes are reused for parts that have distinct spatial transformations instead of each part referencing its own unique geometry. Instancing has a significant impact on memory footprint.
271
+
271
272
Example use cases for instancing are the screws in an engine model or chairs in an architectural model.
272
273
273
274
> [!NOTE]
274
-
> Instancing can improve the memory consumption (and thus loading times) significantly, however the improvements on the rendering performance side are insignificant.
275
+
> Instancing can improve the memory consumption (and thus loading times) significantly, but the improvements on rendering performance are insignificant.
275
276
276
-
The conversion service respects instancing if parts are marked up accordingly in the source file. However, conversion doesn't perform extra deep analysis of mesh data to identify reusable parts. Thus the content creation tool and its export pipeline are the decisive criteria for proper instancing setup.
277
+
The conversion service respects instancing if parts are marked up accordingly in the source file. However, conversion doesn't perform extra deep analysis of mesh data to identify reusable parts. The content creation tool and its export pipeline are the decisive criteria for proper instancing setup.
277
278
278
279
A simple way to test whether instancing information is preserved during conversion is to look at the [output statistics](get-information.md#example-info-file). Specifically, check the `numMeshPartsInstanced` member. If the value for `numMeshPartsInstanced` is larger than zero, meshes are shared across instances.
279
280
@@ -293,11 +294,11 @@ If memory is a concern, configure the renderer by using the [depth-based composi
293
294
294
295
### Decrease vertex size
295
296
296
-
As discussed in the [best practices for component format changes](configure-model-conversion.md#best-practices-for-component-format-changes) section, adjusting the vertex format can decrease the memory footprint. However, this option should be the last resort.
297
+
As discussed in [Best practices for component format changes](configure-model-conversion.md#best-practices-for-component-format-changes), adjusting the vertex format can decrease the memory footprint. However, this option should be the last resort.
297
298
298
299
### Texture sizes
299
300
300
-
Depending on the type of scenario, the amount of texture data might outweigh the memory used for mesh data. Photogrammetry models are candidates.
301
+
Depending on the type of scenario, the amount of texture data might outweigh the memory that's used for mesh data. Photogrammetry models are candidates.
301
302
The conversion configuration doesn't provide a way to automatically scale down textures. If necessary, texture scaling must be done as a client-side pre-processing step. But the conversion step does choose a suitable [texture compression format](/windows/win32/direct3d11/texture-block-compression-in-direct3d-11):
0 commit comments