Page 1 of 1

best way to display pointclouds

Posted: Mon 1. Jul 2013, 21:56
by dunmatt
Hello all, I was wondering, what is the best (read: fastest) way to display about a million 3D points? I'm trying to calibrate a model of a robot with its physical version, and it would be really handy to be able to overlay the physical one onto the model to see where they don't line up.

Re: best way to display pointclouds

Posted: Wed 17. Jul 2013, 10:54
by gunn
The fastest standard way is to use a PointSetFactory to create an instance of PointSet which you can then put into a scene graph component. See this tutorial for how to do that.

For rendering purposes make sure that the Appearance attribute CommonAttributes.SPHERES_DRAW is set to false. Use the attribute CommonAttributes.POINT_SIZE to control the size of the displayed points. See this tutorial for more details on the default point shader.

Re: best way to display pointclouds

Posted: Fri 19. Jul 2013, 20:20
by dunmatt
That worked wonderfully, thanks! For future readers, the other thing I had to set was VERTEX_DRAW to true.

Re: best way to display pointclouds

Posted: Mon 16. Sep 2013, 17:51
by benjamin.kutschan
If you display a PointSet and SPHERES_DRAW=false then the jogl3-backend uses displacement mapped sprites, i.e. looks like spheres but is billboard and thus rather fast.