Skip to content

Commit 89bb754

Browse files
committed
edits
1 parent 264a458 commit 89bb754

File tree

1 file changed

+38
-37
lines changed

1 file changed

+38
-37
lines changed

articles/remote-rendering/how-tos/conversion/configure-model-conversion.md

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ These adjustments are possible:
181181
* Specific data streams can be explicitly included or excluded.
182182
* The accuracy of data streams can be decreased to reduce the memory footprint.
183183

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

186186
```json
187187
{
@@ -197,6 +197,7 @@ The following `vertex` section in the `.json` file is optional. For each portion
197197
"texcoord1" : "NONE"
198198
},
199199
...
200+
}
200201
```
201202

202203
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:
207208

208209
| :::no-loc text="Vertex"::: component | Supported formats (bold = default) | Usage in materials |
209210
|:-----------------|:------------------|:------------------|
210-
|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. |
218219

219220
#### Supported component formats
220221

221-
The memory footprints of the formats are as follows:
222+
The following table describes the memory footprints of supported component formats:
222223

223224
| Format | Description | Bytes per :::no-loc text="vertex"::: |
224225
|:-------|:------------|:---------------|
225-
|32_32_FLOAT|two-component full floating point precision|8
226-
|16_16_FLOAT|two-component half floating point precision|4
227-
|32_32_32_FLOAT|three-component full floating point precision|12
228-
|16_16_16_16_FLOAT|four-component half floating point precision|8
229-
|8_8_8_8_UNSIGNED_NORMALIZED|four-component byte, normalized to `[0; 1]` range|4
230-
|8_8_8_8_SIGNED_NORMALIZED|four-component byte, normalized to `[-1; 1]` range|4
226+
|`32_32_FLOAT`|two-component full floating-point precision|8
227+
|`16_16_FLOAT`|two-component half floating-point precision|4
228+
|`32_32_32_FLOAT`|three-component full floating-point precision|12
229+
|`16_16_16_16_FLOAT`|four-component half floating-point precision|8
230+
|`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
231232

232233
#### Best practices for component format changes
233234

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

240241
#### Example
241242

242243
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.
243244

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 per 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 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.
245246

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

248249
## Settings for point clouds
249250

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

252253
The properties that do have an effect on point cloud conversion are:
253254

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

261261
## Memory optimizations
262262

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

265265
> [!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.
267267
268268
### Instancing
269269

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+
271272
Example use cases for instancing are the screws in an engine model or chairs in an architectural model.
272273

273274
> [!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.
275276
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.
277278

278279
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.
279280

@@ -293,11 +294,11 @@ If memory is a concern, configure the renderer by using the [depth-based composi
293294

294295
### Decrease vertex size
295296

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

298299
### Texture sizes
299300

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.
301302
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):
302303

303304
* `BC1` for opaque color textures

0 commit comments

Comments
 (0)