diff --git a/com.unity.perception/Documentation~/DatasetCapture.md b/com.unity.perception/Documentation~/DatasetCapture.md index 4c9149721..328b76dd9 100644 --- a/com.unity.perception/Documentation~/DatasetCapture.md +++ b/com.unity.perception/Documentation~/DatasetCapture.md @@ -11,7 +11,7 @@ Using [Time.captureDeltaTime](https://docs.unity3d.com/ScriptReference/Time-capt ## Custom sensors You can register custom sensors using `DatasetCapture.RegisterSensor()`. The `simulationDeltaTime` you pass in at registration time is used as `Time.captureDeltaTime` and determines how often (in simulation time) frames should be simulated for the sensor to run. This and the `framesBetweenCaptures` value determine at which exact times the sensor should capture the simulated frames. The decoupling of simulation delta time and capture frequency based on frames simulated allows you to render frames in-between captures. If no in-between frames are desired, you can set `framesBetweenCaptures` to 0. When it is time to capture, the `ShouldCaptureThisFrame` check of the `SensorHandle` returns true. `SensorHandle.ReportCapture` should then be called in each of these frames to report the state of the sensor to populate the dataset. -`Time.captureDeltaTime` is set at every frame in order to precisely fall on the next sensor that requires simulation, and this includes multi-sensor simulations. For instance, if one sensor has a `simulationDeltaTime` of 2 and another 3, the first five values for `Time.captureDeltaTime` will be 2, 1, 1, 2, 2 and 1, meaning simulation will happen on the timestamps 0, 2, 3, 4, 6, 8 and 9. +`Time.captureDeltaTime` is set at every frame in order to precisely fall on the next sensor that requires simulation, and this includes multi-sensor simulations. For instance, if one sensor has a `simulationDeltaTime` of 2 and another 3, the first six values for `Time.captureDeltaTime` will be 2, 1, 1, 2, 2 and 1, meaning simulation will happen on the timestamps 0, 2, 3, 4, 6, 8 and 9. ## Custom annotations and metrics In addition to the common annotations and metrics produced by [PerceptionCamera](PerceptionCamera.md), scripts can produce their own via `DatasetCapture`. You must first create and register annotation and metric definitions using `DatasetCapture.RegisterAnnotationDefinition()` or `DatasetCapture.RegisterMetric()`. These are used~~~~ to report values during runtime.