best way to display pointclouds

Have jReality programming problems or questions? Post them here.
Post Reply
dunmatt
Posts: 22
Joined: Sat 28. Jul 2012, 02:36

best way to display pointclouds

Post by dunmatt » Mon 1. Jul 2013, 21:56

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.

User avatar
gunn
Posts: 323
Joined: Thu 14. Dec 2006, 09:56
Location: TU Berlin
Contact:

Re: best way to display pointclouds

Post by gunn » Wed 17. Jul 2013, 10:54

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.
jReality core developer

dunmatt
Posts: 22
Joined: Sat 28. Jul 2012, 02:36

Re: best way to display pointclouds

Post by dunmatt » Fri 19. Jul 2013, 20:20

That worked wonderfully, thanks! For future readers, the other thing I had to set was VERTEX_DRAW to true.

benjamin.kutschan
Posts: 48
Joined: Mon 16. May 2011, 16:29

Re: best way to display pointclouds

Post by benjamin.kutschan » Mon 16. Sep 2013, 17:51

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.

Post Reply