Better clouds in the browser

Martin Heidegger
7 min readOct 5, 2017

--

Even as a developer, you may have never heard of Potree and that is okay. I didn’t know it before I was asked by Georepublic to take a look at it to find out how we could improve it. After having spent some time with it, I think I am able to tell you what Potree is, why Potree matters, how you could help to improve it and why you should be doing that!

Potree basics

Point clouds are a representation of 3-dimensional data, similar to Polygons or Voxels. There are two reasons for using Point clouds over alternatives: Point clouds consume less data and they are the raw data, which is important for scientific work, that comes from LiDAR devices: 3D scanners.

Laser Scanner as used in autonomous vehicles (Credits: Wikipedia)

Broadly speaking, there are two practical use cases for Point clouds:

To represent interior models. Rooms or 3D objects to print.
To display in the highest possible resolution of digitized landscapes.

These days you can find it used in Tango, autonomous cars, drones, medical equipment, pretty much any place where it makes sense to use live 3D data. There is a myriad of use cases.

Now… Potree is an open source website (a combination of CSS, a lot of JavaScript and some HTML) that can display various point clouds formats and offers some tools that are useful to find meaning in the data.

Since its inception, some 4 (maybe 5) years back, it has been developed mostly by one person: Markus Schuetz. There have been other efforts to display point clouds but most of them are desktop solutions.

For the longest time Potree has been at the best open source solution for websites because it does very well with big amounts of data and it is constantly — though at a low pace — being improved. Markus is a researcher at the viennese institute of computer graphics and algorithms. His passion is the next-generation of point cloud visualizations and his research directly contributes to the continued improvement of Potree.

A case against Potree?

If you had anything to do with geo-spacial data recently, you likely have noticed cesium. The cesium viewer also runs in the browser. It is built in a more modern fashion by significantly more people. It supports not just point clouds but also regular maps, 3D polygons and and much more through the 3D-tiles data format. It takes the same octree concept that Potree uses for point clouds data and applies it to all possible geo-spacial data.

Screenshot of cesium video about point cloud integration. (Source)

Besides this strong competition, another problem that Potree faces is the current maintenance situation. Markus likes to work on it, but he works towards his own goals. In my experience that this is a healthy stance towards OSS development for an individual.

It is not easy to sell an open source product in this situation to your manager. But: the PR’s that I have sent in the past months have shown: Markus is not against collaboration or others taking initiative. It is rather a question of how much effort he has to undergo beside his current workload.

Why Potree definitely matters.

As with any OSS project, it is easy to ask the question:

“Why contribute to Markus’ efforts?”

With other projects that question might be tricky, but in Potree’s case, there is actually quite a bit of substance that can make your contributions worthwhile!

One of the tasks I took upon myself was to document the potree data format. For fun I compared it to the 3D-tiles and I what I have learned leaves me convinced that — yes — the Potree format is certainly has it’s ugly edges, but ultimately it is the smaller and more versatile format to store point clouds! It is optimized to loading point clouds in the browser and also makes it easy to host it on a cloud solution like S3. In short:

I believe the Potree data format is superior to 3D-tiles.
(as far as point clouds are concerned)

I am not sure if 3D-tiles will ever be as efficient as the Potree format and its worth to keep in mind that point clouds can easily grow into terabyte-size. Inefficiencies are costly. This also brings me to my next point:

For huge point clouds, there is hardly a way around the browser.
If you ever happen to have to work with point cloud data — and chances are that many data scientists will — you might want to store them somewhere and access them somehow. Usually you don’t want to transfer several giga- or even terabytes just for fun. So you need a browser solution. Sure, you could use a general purpose tool like cesium but Potree could be the much-better choice because:

Potree does one thing and it does it well.
Doing one thing well is hard. Having one tool in the eco-system that is good at point clouds and is able to innovate on that topic can have impact even if its done by a smaller project.

i.e.: Imagine a p2p, partial loading system system for point clouds to reduce loading delays and costs. — These sort of innovations, once they work out can and will find their way back to other systems like cesium.

The user-interface tools available in Potree are very valuable.
(Measure and scale tools, import/export etc.)

Usually you’d have to setup desktop software for those tools and/or pay a good amount of money to get a tool that allows interaction with the point clouds. Measuring, coloring, etc. are far from perfect in Potree but they are very helpful as they are, and better than most other solutions out there.

Area measuring tool in action

Potree can be better.

If you look at the contribution charts, you can see that almost the whole project is written by Markus. Having any single developer sit on a project for a while results in tunnel vision. I need to applause Markus for the way he keeps opening his project up, but over time: the input of other people really helps to get the project come forward.

If you know code, you can help!

Of course, Pull Requests are welcome!

But in order to get a feeling for just-how-much the project has existed in its bubble, it would be awesome to:

  • get code-reviews and to see what code could be written better and if there are issues in the current code.
  • get questions about why things are done certain ways.

No matter how much effort we put into this, looking outside the bubble is hard. Without the feedback from you, the community, there is no way to tackle this properly.

Some code that maybe could be cleaned? (Source)

By reading through the code you will get a feeling for the complexity and you can only grow as a developer. Furthermore: there are many requests of companies that want to use Potree but need some technical advice or adjustments. By contributing you will be listed as contributor, and I am sure a job is just around the corner!

Can’t code? You can help too!

A lot of the effort of a FOSS project is not code, but things like:

  • testing on different devices and browser.
  • improving the website.
  • spreading the word.
  • clean up typos in the documentation.
  • add illustrations.
  • coordinate meetups.

are all worthwhile contributions!

Screenshot of the current homepage (potree.org). Can you improve this?

These sort of contributions will also not go unnoticed. I know more than enough companies that reward this sort of contributions! We have a Gitter chat channel where you can join us today!

Your money can help too! 💵

The project period for me with Georepublic has ended. As I have a family, this means that, for the time being, I will have to look for a different way to bring food on the table. You (or the company you work for) could donate or contact Markus or Georepublic to fund new improvements which in turn might allow me to progress on this as well.

Thank you for reading until the end.

I have a lot of ideas to improve Potree. Ping me anytime if you need some inspiration. It is exciting for me to get to know this nice project and I hope you agree that it is a great addition to the JavaScript & Geospatial ecosystem.

--

--

Martin Heidegger

Freelance Node.js developer interested in distributed systems. Osaka, Japan.