Updating 153600 spheres (GeometryModel3D) to display kinect depth data in real-time

Nov 4, 2012 at 12:05 PM


I am using Helix 3D toolkit to display kinect depth data, an attempt to display the point cloud in the helix viewport3d. For this, I am creating spheres for each point as a GeometryModel3D and update their positions in the depthframe ready event. However, this method only works for upto 150 points. A depth format of 320x240 corresponds to 153600 points, and updating the positions of 153600 spheres freezes up the UI. In the depthframe ready event, I am simply updating the positions using

 geometryPoints[i].Transform = new TranslateTransform3D(x[i], y[i], z[i]);

where geometryPoints is an array of 153600 GeometryModel3D and x, y, z are the depth data from the depth stream.

Any suggestions to avoid the UI freezing. Or simply its not possible to update this amount of sphere geometries in helix viewport 3d at 30fps?

Please advise.


Nov 6, 2012 at 6:36 PM

That sounds like millions of triangles. I don't think you can update that fast on the ui thread, even if you just update the transforms of the Model3Ds...

see also http://msdn.microsoft.com/en-us/library/bb613553.aspx

Nov 8, 2012 at 8:37 AM

Is it possible to do this using PointsVisual3D instead of adding spheres? I can draw the whole point cloud using PointsVisual3D containing a list of all the points, but I dont know how to update the points. Any idea?