Depthkit Studio Clip Not Loading On Import

Hello all! First time user for the Expansion Package here. I just did my first quick and dirty test shoot with Depthkit Studio. A test with 3 sensors and a test with 5 sensors.

I can successfully import my 3 sensor test using the Expansion Package. However, when I import my 5 sensor test, I immediately get an error after adding the .txt, .png., and .mp4. The clip and poster frame does not show in the preview window. Only the depthkit logo and a bounding box or sorts. Below is the main error msg that is repeated several times with possible slight differences possibly.

ArgumentException: Attempting to create a zero length compute buffer
Parameter name: count
UnityEngine.ComputeBuffer…ctor (System.Int32 count, System.Int32 stride, UnityEngine.ComputeBufferType type, UnityEngine.ComputeBufferMode usage, System.Int32 stackDepth) (at <84f51b1b0ff2473ca787c217e1eda8b9>:0)
UnityEngine.ComputeBuffer…ctor (System.Int32 count, System.Int32 stride, UnityEngine.ComputeBufferType type) (at <84f51b1b0ff2473ca787c217e1eda8b9>:0)
Depthkit.Util.EnsureComputeBuffer (UnityEngine.ComputeBufferType computeBufferType, UnityEngine.ComputeBuffer& buf, System.Int32 count, System.Int32 stride, System.Array defaultValues) (at C:/Users/gantp/Documents/DEPTHKIT/UNITY/Depthkit_Studio_Expansion_Package_Phase6/depthkit.core/Runtime/Utils/Util.cs:181)
Depthkit.StudioMeshSource.EnsureBuffers () (at C:/Users/gantp/Documents/DEPTHKIT/UNITY/Depthkit_Studio_Expansion_Package_Phase6/
Depthkit.StudioMeshSource.OnResize () (at C:/Users/gantp/Documents/DEPTHKIT/UNITY/Depthkit_Studio_Expansion_Package_Phase6/
Depthkit.DataSource.Resize () (at C:/Users/gantp/Documents/DEPTHKIT/UNITY/Depthkit_Studio_Expansion_Package_Phase6/depthkit.core/Runtime/DataSource/DataSource.cs:221)
Depthkit.Clip.DoResize () (at C:/Users/gantp/Documents/DEPTHKIT/UNITY/Depthkit_Studio_Expansion_Package_Phase6/depthkit.core/Runtime/Clip.cs:512)
Depthkit.Clip.LateUpdate () (at C:/Users/gantp/Documents/DEPTHKIT/UNITY/Depthkit_Studio_Expansion_Package_Phase6/depthkit.core/Runtime/Clip.cs:710)

IndexOutOfRangeException: Index was outside the bounds of the array.
Depthkit.StudioMeshSourceGizmoDrawer.DrawGizmosFor (Depthkit.StudioMeshSource meshSource, UnityEditor.GizmoType gizmoType) (at C:/Users/gantp/Documents/DEPTHKIT/UNITY/Depthkit_Studio_Expansion_Package_Phase6/
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Any ideas on this? Feel free to reach out to me for example footage etc.

@Andrew This is usually caused by the asset’s large volume defined by the Depthkit clip’s near and far planes of each sensor. If all sensors are exported with a maximally-set far-plane, that instructs the renderer to allocate a 3D coordinate space for that entire sensor’s range, and an even larger volume when you add all of the different sensors facing different directions, up to ~20m³ - that’s a LOT of voxels, and can easily overload the renderer, but you only need ~2m³ to render a stationary subject.

To fix this:

  • Pull the near- and far-planes of each sensor in closer to the subject, then re-export.
  • Once added to the Unity project, pull the Volume Bounds, outlined in white, in closer to your subject, and hit the ‘Set Surface Buffer Capacity’ button.

This should make your asset appear immediately once the clip is set up, and play more performantly once the volume size, volume density, and surface buffer are adjusted,

LOL! This makes complete sense. I had a feeling I could be overloading it.

I had unfortunately spent all my free time that day calibrating, so when I reached the export stage, I was out of time and just quickly exported without cropping anything. In any other situation, I would have spent the time refining etc :slight_smile: Thanks again for this help and I will re-export!