Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support huge point clouds in the viewer #1136

Open
emilk opened this issue Feb 7, 2023 · 9 comments
Open

Support huge point clouds in the viewer #1136

emilk opened this issue Feb 7, 2023 · 9 comments
Labels
enhancement New feature or request 🚀 performance Optimization, memory use, etc 🔺 re_renderer affects re_renderer itself user-request This is a pressing issue for one of our users
Milestone

Comments

@emilk
Copy link
Member

emilk commented Feb 7, 2023

The Rerun Viewer is currently limited to only being able to display ~two million points at a time, and will have pretty terrible frame rate at 1 million points already.

The reason for this is that we upload the point cloud every frame. This is very simple, but obviously very wasteful.

A solution is to detect if the same points are being rendered this frame as the previous, and if so not re-upload them. This is similar to how we already handle tensors.

@emilk emilk added enhancement New feature or request 🚀 performance Optimization, memory use, etc labels Feb 7, 2023
@Wumpf
Copy link
Member

Wumpf commented Feb 8, 2023

@EriKWDev
Copy link

EriKWDev commented Mar 1, 2023

I have been tackling rendering of point clouds for some time and here are some resources I've used to speed up rendering of point clouds:

While a bit specific to Unreal Engine 4, there are some insights in this master thesis project ( https://cgvr.cs.uni-bremen.de/theses/finishedtheses/point_cloud_rendering_in_unreal/thesis_FINAL_WEB.pdf ) about point order

@emilk emilk added the user-request This is a pressing issue for one of our users label Jun 26, 2023
@Wumpf
Copy link
Member

Wumpf commented Jun 27, 2023

We should be a bit more specific with the "huge" part. From what we learned so far most users are more than happy in the region of <8mio points which seems to be in the region where we don't need acceleration structures for rendering.

We need typically 24bytes per point right now (position, radius, color, index - could compress away the index!), so 8mio points would be merely 184Mb.
Given that upload speeds can be assumed to be at the very least 16GB/s (that's PCIe 3.0 16x; 5.0 is common and has 64GB/s and integrated GPUs are off the chart there) we get 273Mb/frame for 60fps.
So even if we upload ever frame we should still hit at least 30fps at that size if we do everything correctly.

Right now we have a hardcoded limited 4mio; point cloud renderer should be dynamic with this!

@emilk emilk added the 🔺 re_renderer affects re_renderer itself label Jun 27, 2023
emilk added a commit that referenced this issue Jul 2, 2023
…2512)

### What

Add a simple example to display Open Photogrammetry Format datasets


![](https://static.rerun.io/3bb25c43fa2a4c367d036c27943812ebfe3e4d42_open_photogrammetry_format_1200w.png)

This example is currently minimalist in that there is lots more in the
OPF that could be displayed, such as uncalibrated vs. calibrated
cameras, matches between points and cameras, etc. Also, I opted to
display each calibrated camera as individual frames in the timeline, as
displaying them currently spams the viewer with image views.

Closes #2246

Would greatly benefit from #1136
Blocked by #2244 

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)

<!-- This line will get updated when the PR build summary job finishes.
-->
PR Build Summary: https://build.rerun.io/pr/2512

<!-- pr-link-docs:start -->
Docs preview: https://rerun.io/preview/c1fd3e3/docs
Examples preview: https://rerun.io/preview/c1fd3e3/examples
<!-- pr-link-docs:end -->

---------

Co-authored-by: Emil Ernerfeldt <[email protected]>
@emilk emilk added this to the 0.9 milestone Aug 17, 2023
@emilk emilk mentioned this issue Aug 18, 2023
12 tasks
@emilk
Copy link
Member Author

emilk commented Aug 31, 2023

The current state is around 1.5M points @30 fps on my M1 MacBook Pro.

We are bounded primarily by

  • CPU (upload)
  • overdraw when zoomed out a lot

A rough roadmap:

@teh-cmc
Copy link
Member

teh-cmc commented Aug 31, 2023

potree does large point clouds:

From the same authors, a drastically different approach by accumulating data across frames, removing the need for hierarchical datastructures, LOD, caching, etc: https://github.com/m-schuetz/Skye

@emilk
Copy link
Member Author

emilk commented Oct 5, 2023

examples/python/open_photogrammetry_format/main.py, showing just the 3D view, on --release, averaged over a few frames, MacBook Pro M1

  • 0.8.2, ~47 ms/frame
    image

  • 0.9.0, 15.3 ms/frame
    image

@zeeyang
Copy link

zeeyang commented Oct 9, 2024

What about just rasterize it on the server side and serve as video stream.

@emilk
Copy link
Member Author

emilk commented Oct 10, 2024

Pixel rendering on the cloud is something we'd like to do in the future, but is orthogonal to the issue at hand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request 🚀 performance Optimization, memory use, etc 🔺 re_renderer affects re_renderer itself user-request This is a pressing issue for one of our users
Projects
None yet
Development

No branches or pull requests

7 participants