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
disableWorldTracking [Optional] | `Boolean` | `false` | If true, turn off SLAM tracking for efficiency. This needs to be done **BEFORE**[`XR8.run()`](/docs/api/engine/xr8/run) is called.
17
17
enableLighting [Optional] | `Boolean` | `false` | If true, `lighting` will be provided by [`XR8.XrController.pipelineModule()`](pipelinemodule.md) as `processCpuResult.reality.lighting`
18
18
enableWorldPoints [Optional] | `Boolean` | `false` | If true, `worldPoints` will be provided by [`XR8.XrController.pipelineModule()`](pipelinemodule.md) as `processCpuResult.reality.worldPoints`.
19
-
imageTargets[Optional] | `Array` | | List of names of the image target to detect. Can be modified at runtime. Note: All currently active image targets will be replaced with the ones specified in this list.
19
+
imageTargetData[Optional] | `Array` | | List of image targets to track, see [image target data](#image-target-data). Note: All currently active image targets will be replaced with the ones specified in this list.
20
20
leftHandedAxes [Optional] | `Boolean` | `false` | If true, use left-handed coordinates.
21
21
mirroredDisplay [Optional] | `Boolean` | `false` | If true, flip left and right in the output.
22
22
scale [Optional] | `String` | `responsive` | Either `responsive` or `absolute`. `responsive` will return values so that the camera on frame 1 is at the origin defined via [`XR8.XrController.updateCameraProjectionMatrix()`](updatecameraprojectionmatrix.md). `absolute` will return the camera, image targets, etc in meters. When using `absolute` the x-position, z-position, and rotation of the starting pose will respect the parameters set in [`XR8.XrController.updateCameraProjectionMatrix()`](updatecameraprojectionmatrix.md) once scale has been estimated. The y-position will depend on the camera's physical height from the ground plane.
23
23
24
24
**IMPORTANT:**`disableWorldTracking: true` needs to be set **BEFORE** both [`XR8.XrController.pipelineModule()`](pipelinemodule.md) and [`XR8.run()`](/docs/api/engine/xr8/run) are called and cannot be modifed while the engine is running.
25
25
26
+
### Image Target Data {#image-target-data}
27
+
28
+
Property | Type | Description
29
+
--------- | ---- | -----------
30
+
imagePath | `String` | The path or URL to fetch the tracked image from. For best results, use a portrait, 480x640, grayscale image.
31
+
type | `String` | 'PLANAR', 'CYLINDER', or 'CONICAL'
32
+
properties | `Object` | Properties of the crop and geometry of the target. This should be generated by image-target-cli or the desktop app.
33
+
metadata [Optional] | any | This property can be used to attach any additional data for use by the application.
To use image targets in your project, you must generate some required assets with a command line interface (CLI). These files contain image target metadata needed by the engine.
33
-
34
-
:::tip
35
-
See [documentation on Image Target CLI](https://github.com/8thwall/8thwall/blob/main/apps/image-target-cli/README.md) for more details on cropping and cylindrical/conical image targets.
36
-
:::
37
-
38
-
1. Open a terminal window and run `npx @8thwall/image-target-cli@latest`
39
-
2. Answer the prompts, following the examples below:
40
-
41
-
```bash
42
-
Enter the path to the image file:
43
-
44
-
~/Downloads/target1.png
45
-
```
46
-
47
-
```bash
48
-
Select the image type:
49
-
1) flat (default)
50
-
2) cylinder
51
-
3) cone
52
-
53
-
1
54
-
```
32
+
## Adding Image Targets
55
33
56
-
```bash
57
-
Use default crop? [Y/n]:
58
-
59
-
y
60
-
```
34
+
### Upload the Image Target
61
35
62
-
```bash
63
-
Enter the output folder:
36
+
Locate the **Image Targets** panel at the bottom left of the Studio Interface. Click on the **( + )** to add a flat, cylindrical, or conical image target.
Make sure the output folder was specified as a folder named `image-targets` at the root of your 8th Wall project. See [Verifying Project Structure](#verifying-project-structure) for more details.
The name of the image target entered in the inspector should match what was entered in the CLI when generating the image target files. You can double check the name of the image target by looking at the prefix of the image target assets and/or in the JSON file associated with the image target.
133
-
134
83
## Using Image Targets
135
84
136
-
When you add an image target to your project, an image target mesh will appear so that you can align and position other 3D content against the image target.
85
+
When you add an image target to your project, an image target mesh will appear so that you can align and position other 3D content against the image target.
0 commit comments