SFraissTU / BA_PointCloud

PointCloud-BachelorThesis
BSD 2-Clause "Simplified" License
185 stars 42 forks source link

On-Demand-Hierarchy-Loading #37

Open TuomasK1989 opened 3 years ago

TuomasK1989 commented 3 years ago

Hi, When loading datasets from server it seems that hierarchy loading takes quite a long time. So I would be interested of investigating how to get point clouds to be rendered immediately at coarse level and then going deeper to the hierarchy and loading denser point cloud nodes.

In Your future development section there is a tab "On-Demand-Hierarchy-Loading". Is this something You are also investigating and do You have a thoughts how to achieve this and maybe You could point me to the right direction with this?

Br, Tuomas

SFraissTU commented 3 years ago

Hi! Yes, you are absolutely right, this is something that would be very useful! While I haven't implemented it in this project, I have done it in other point cloud rendering systems I've developed. The idea is to initially only load one chunk of hierarchy data (for example the whole r.hrc file). The last child nodes in that hierarchy chunk need to be marked as incomplete nodes using a new flag. As soon as their content is loaded, their respective hierarchy chunk needs to be loaded from the corresponding .hrc-file as well. If you ever feel like looking into the source code of Potree, you can see how it is done there. If I remember correctly, the relevant code is in modules/loader/2.0/OctreeGeometry.js.

It would also be an idea to extend the cache to manage hierarchy as well, so that hierarchy chunks that haven't been used in a long time are deleted as well. However, this increases the complexity of the cache and in my judgement it's probably not necessary in most cases.

I hope this helps, please let me know if you have further questions. I would gladly accept a pull request with that feature.

Simon

TuomasK1989 commented 3 years ago

Hi, Thanks a lot from help. I will start investigating Potree and how to implement this same idea into this project.

-Tuomas