Generate Targets
In this section you will generate targets using the previously created model .pvz files; these targets can be than reused in multiple experiences. For this example, we will use Standard Model Targets that will allow you to move through the use case quicker, but feel free to use a more powerful Advanced or On-Prem Advanced Model Targets if you wish to.
For the most part, the request structure relies on the Vuforia Engine SDK API definition. For Studio specific guidance, see the API Documentation on your Experience Service.
1. Ensure that your configured views account for the size and orientation of the Model Target. Create at least one view where the model is fully visible from a distinct, easily recognizable angle to optimize detection and tracking performance. Generate the target in the API using one of the following methods:
Method
Instructions
In Postman
POST /ExperienceService/products/v1/target
{
"name": "Quadcopter Base",
"targetType": "standard",
"targetSdk": "10.9",
"models": [
{
"name": "Quadcopter Base SMT",
"modelId": <Model-Id>, //take the UUID that the Post Model API returned in the last step
"optimizeTrackingFor": "LOW_FEATURE_OBJECTS",
"automaticColoring": "auto",
"upVector": [0.0, 1.0, 0.0],
"views": [
{
"name": "viewpoint_0000",
"layout": "landscape",
"guideViewPosition": {
"translation": [0.19104722142219543,
0.19300971925258636,
0.2014508694410324],
"rotation": [-0.23911770032491195,
0.36964383294987413,
0.09904579601423466,
0.892399065690545]
}
}
]
}
]
}
Using a Curl command
curl --location 'https://<yourESURL>/ExperienceService/products/v1/target' \
--header 'X-Requested-With: any' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data '{
"name": "quadcopter base",
"targetType": "standard",
"targetSdk": "10.9",
"models": [
{
"name": "Quadcopter Base SMT",
"modelId": "yourModelUUID",
"optimizeTrackingFor": "LOW_FEATURE_OBJECTS",
"automaticColoring": "auto",
"upVector": [0.0,1.0,0.0],
"views": [
{
"name": "viewpoint_0000",
"layout": "landscape",
"guideViewPosition": {
"translation": [0.19104722142219543,
0.19300971925258636,
0.2014508694410324],
"rotation": [-0.23911770032491195,
0.36964383294987413,
0.09904579601423466,
0.892399065690545]
}
}
]
}
]
}
'
2. The response will look similar to the following:
{
"targetId": "<targetId>", // Optional. Only sent in case when job to create Target is accepted.
}
3. Use one of the following methods to obtain the status of the Model Target generation:
Method
Instructions
In Postman
GET /ExperienceService/products/v1/target/status/<targetId>
Using a Curl command
curl --location 'http://<yourESURL>/ExperienceService/products/v1/target/status/<yourTargetUUID>' \
--header 'Authorization: ••••••'
4. The response will look similar to the following:
{
"simplifiedStatus": "queued|inProgress|completed|failed|deleted|toBeCancelled|toBeDeleted", // Dataset's current status

}
5. Repeat steps 1–4 to generate a Standard Model Target for the Quadcopter Updated model. Make sure to update the modelId in your request.
6. Now that the necessary assets have been created, we’ll continue to the next section and start building data logic into the experience.
Was this helpful?