# 3D Tuning

In 3D mode, the SolvePNP algorithm is used to compute the position and rotation of the AprilTag or other target relative to the robot. This requires your {ref}`camera to be calibrated <docs/calibration/calibration:Calibrating Your Camera>` which can be done through the cameras tab.

The target model dropdown is used to select the target model used to compute target position. This should match the target your camera will be tracking.

If solvePNP is working correctly, the target should be displayed as a small rectangle within the "Target Location" minimap. The X/Y/Angle reading will also be displayed in the "Target Info" card.

```{raw} html
<video width="85%" controls>
    <source src="../../_static/assets/3d2019.mp4" type="video/mp4">
    Your browser does not support the video tag.
</video>
<video width="85%" controls>
    <source src="../../_static/assets/3d2020.mp4" type="video/mp4">
    Your browser does not support the video tag.
</video>
```

## Contour Simplification (Non-AprilTag)

3D mode internally computes a polygon that approximates the target contour being tracked. This polygon is used to detect the extreme corners of the target. The contour simplification slider changes how far from the original contour the approximation is allowed to deviate. Note that the approximate polygon is drawn on the output image for tuning.
