Low framerate in Unity
Low framerate while local livestreaming
If you are seeing the update framerate drop in both Depthkit and Unity while Local livestreaming, check out the Livestream issues guide.
Depthkit's Combined Per Pixel video format is designed for quality and performance. When working with this format on various platforms, you may benefit from certain asset specifications in order to improve playback performance. These will vary by platform and target device.
The specifications below will guide you with best practices for:
- Combined Per Pixel video resolution
- Codec & Bitrate
- Unity Reconstruction settings, including Surface Buffer Capacity, Volume Density and Volume Bounds
- Recommended sensor configurations by platform.
Performance will vary based on your project or scene complexity
Please use this as a guide and take your existing project assets (photogrammetry scans, environments, etc.) into account.
Best Practices
Platform | Maximum Resolution | Codec | Video Player | Volume Density | Surface Buffer Capacity |
---|---|---|---|---|---|
Windows (Desktop VR) | 4096 x 4096 | AVC (H.264) HEVC (H.265) is also supported on some (but not all) Windows systems - It is included in Windows 11, but Windows 10 requires an additional plugin from the Windows Store. We recommend sticking to AVC (H.264) when deploying to Windows. | Unity or AVPro | 200 | ~30,000 |
iOS (iPhone & iPad) | 2048 x 2048 4096 x 4096 may be supported on newer devices | HEVC (H.265) | Unity | 50 | ~15,000 |
Be mindful of your pixel budget and target asset resolution
Sensor configurations are flexible and customizable based on the needs of your project. When planning you configuration, be mindful of your target publishing platform. Due to the performance requirements of certain platforms, you may want to think of your assets meeting a pixel budget.
For example, the asset produced by a 10-sensor capture inherently has a high resolution, necessary to fit each sensor. To get it to play performantly on your target platform, you can scale it down, or alternatively you can consider capturing with fewer sensors and allotting each sensor a greater resolution.
Combined Per Pixel multi-row formatting
Before downscaling your Combined Per Pixel videos, consider reformatting the clips into stacked rows and columns to maximize your pixel usage. For details see the Combined Per Pixel Multi-row formatting section of the Asset Encoding guide.
Set your volume bounds in Unity
In Unity, pull in the Volume Bounds close to your subject without cropping the clip itself. This is essential in order to increase performance of each asset. It should be used in tandem with Volume Density for best results.
Changing the volume bounds will adjust your Voxel Grid Dimensions as well as the Total Voxel Grid count, seen in the Depthkit Studio Mesh Source component under Volume Settings. It will not affect the size of each voxel just how many voxels are used to reconstruct your clip.
Decrease volume density
Adjust the volume density slider to optimize your mesh to suit your scene and intended publishing platform. This setting controls the resolution of the reconstruction volume and the number of voxels per cubic meter. High mesh density maximizes the quality that your clip has to offer, especially when it comes to depth detail and edge quality. However, when building to a mobile device, performance on constrained hardware is key. In this scenario, you may require a lower mesh density. Volume density units are represented as voxels per meter.
For best results, reduce Volume Density in combination with setting the Volume Bounds. After adjusting both of these values, set the Surface Buffer Capacity.
Don't forget the Surface Buffer Capacity
This value defines the maximum number of triangles that can be displayed for each frame of your clip. In other words, this sets the mesh size. Click the Set Surface Buffer Capacity button to sample the current frame to automatically determine a recommended value for your clip. This recalculates the resources needed to render your asset, and is helpful in reducing your memory footprint.
*Set your Surface Buffer Capacity after you make any changes to your volume settings, especially the volume density or volume bounds. This will ensure the clip is running at maximum performance.
Updated 12 months ago