I need a way to render huge point clouds fast... Please help

bvagis

08-12-2009 20:33:52

I have been searching the web and the forums for a way to render point clouds *efficiently using Mogre. I have followed a few threads that were going the same direction that I am trying to, but they seemingly found their solution and stopped posting. My initial idea was to use a sphere, but that is way too much overhead. I have a xyzrgb file containing millions of points, and I would like them to render in an Ogre window. Can this be done? Is there a simple, light-weight way to render these points (that need not be larger than a pixel in size, each) just using their position and color?

Many of the forum threads I have looked at ended with the original poster discovering the abilities of the 'ManualObject', but I cant seem to find the usefulness of this object when dealing with high density point clouds.

Please help.

smiley80

09-12-2009 01:39:40

With ManualObjects, you'll can do this:
Vector3[] v3s;
ColourValue[] cvs;
ParseXYZRGB(out v3s, out cvs);

ManualObject manual = sceneMgr.CreateManualObject("PointCloud");
manual.Begin("BaseWhiteNoLighting", RenderOperation.OperationTypes.OT_POINT_LIST);
for (int i = 0; i < v3s.Length; i++)
{
manual.Position(v3s[i]);
manual.Colour(cvs[i]);
}
manual.End();
sceneMgr.RootSceneNode.CreateChildSceneNode("PointCloudNode").AttachObject(manual);

'ParseXYZRGB' parses the source file, removes duplicate verticies (improves render speed, slows down parsing) and fills the arrays.

With 1 mio random values it looks like this: