Install and Configure the Experience Service > Configuration Parameters > Target Generation
  
Target Generation
When displaying an experience, Vuforia View uses targets to track physical objects and render augmentations relative to those physical objects. When authoring an experience, the author can choose from several types of targets: ThingMarks, Spatial Targets, Model Targets, and Image Targets. When an experience that uses Model Targets or Image Targets is published to the Experience Service, the Experience Service must generate a target from the uploaded model or image.
Generating targets can consume large amounts of the available system resources, and may degrade the performance of the Experience Service. In particular, generating Model Targets for large and complex models can consume large amounts of memory. The configuration parameters described below can be used to limit the system resources that are consumed by target generation.
Parameter
Description
targetGenerator.maxTasks
This parameter defines the number of concurrent target generator tasks allowed. If a project that requires target generation is published while the number of in-progress tasks equals the targetGenerator.maxTasks limit, then the publish request is rejected with an HTTP 429 status.
By default, this parameter is set to 0 which indicates that no limit is placed on the number of concurrent tasks. Set this parameter to a positive integer to limit the number of concurrent target generation tasks.
targetGenerator.timeout
This property defines the maximum amount of time allowed to complete a publish request that requires target generation. If the time taken to complete a publish request that requires target generation exceeds the targetGenerator.timeout limit, then the publish request is terminated and the Experience Service responds to the original publish request with an HTTP 413 status.
By default, this parameter is set to -1 which indicates that there is a limit of 120,000ms (2 minutes) on the amount of time it requires to complete a publish request with target generation.
targetGenerator.maxMemory
This property defines the maximum amount of memory available for all target generation tasks. If the combined memory usage of all concurrent target generation tasks exceeds the targetGenerator.maxMemory limit, then the target generation task that is currently using the most memory is terminated, and the Experience Service responds to the corresponding publish request with a HTTP 413 status.
Set this parameter to a positive integer to limit the maximum amount of memory in bytes that can be consumed by all concurrently executing target generation tasks. For example, 2.5GB. Specify units using the following case-sensitive abbreviations:
b (bytes)
kb (kilobytes)
mb (megabytes)
gb (gigabytes)
tb (terabytes)
If no unit is specified, b is assumed as the unit. By default, this parameter is set to 1.5GB.
* 
This parameter can be set to zero to indicate that no limit should be placed on the amount of memory consumed by target generation tasks. Setting this parameter to zero in a production environment is not recommended since it can result in the Experience Service crashing if the target generation tasks consume all available memory.
targetGenerator.image.disable
To enable image target generation, set this property to false. To disable it, set it to true. By default, this parameter is set to false.
targetGenerator.image.maxImageSize
This parameter defines the maximum file size for a image that requires target generation. If the file size of an image that requires target generation exceeds the targetGenerator.image.maxImageSize limit, then the publish request is rejected with an HTTP 413 status.
* 
This limit does not apply to images that do not require target generation.
By default, this parameter is set to 0 which indicates that no limit is placed on the file size for images requiring target generation. Set this parameter to a positive integer to specify the maximum file size in bytes. Specify units using the following case-sensitive abbreviations:
b (bytes)
kb (kilobytes)
mb (megabytes)
gb (gigabytes)
If no unit is specified, bytes is assumed as the unit.
targetGenerator.model.disable
This parameter can be configured using the installer. To enable model target generation, set this property to false. To disable it, set it to true.
targetGenerator.model.maxModelSize
This parameter defines the maximum file size for a model that requires target generation. If the file size of a model that requires target generation exceeds thetargetGenerator.model.maxModelSize limit, then the publish request is rejected with an HTTP 413 status.
* 
This limit does not apply to models that do not require MTG.
By default, this parameter is set to 0 which indicates that no limit is placed on the file size for models requiring target generation. Set this parameter to a positive integer to specify the maximum file size in bytes. Specify units using the following case-sensitive abbreviations:
b (bytes)
kb (kilobytes)
mb (megabytes)
gb (gigabytes)
If no unit is specified, bytes is assumed as the unit.
targetGenerator.model.maxPolygons
This parameter defines the maximum number of polygons contained in a model that requires target generation. The number of polygons is strongly correlated with the amount of memory that is required for target generation. This limit is enforced by the Vuforia Studio and not by the Experience Service. If the number of polygons in a model that requires target generation exceeds thetargetGenerator.model.maxPolygons limit, Vuforia Studio will not allow the model to be published.
Set this parameter to a positive integer to limit the number of polygons than can be contained in a model that requires target generation. This parameter can be set to zero to indicate that no limit should be placed on the number of polygons. By default, this parameter is set to 500,000.
The following is an example JSON snippet that configures the Experience Service as follows:
Enables model target and image target generation on the Experience Service
Limits the number of concurrent target generation tasks to 4
Limits the amount of time spent completing a publish request that requires target generation to 3 minutes
Limits the memory that can be consumed by all concurrently executing target generation tasks to 4GB
Limits the size of a model that requires target generation to 80MB
Limits the number of polygons in a model that requires target generation to 300,000
Limits the size of an image that requires target generation to 10MB
"targetGenerator": {
"maxTasks": 4,
"timeout": 180000,
"maxMemory": "4GB",
"model": {
"maxModelSize": "80MB",
"maxPolygons": 300000,
"disable": false
},
"image": {
"maxImageSize": "10MB",
"disable": false
}
}