Code Monkey home page Code Monkey logo

skye's Introduction

Skye

This is the source code to the paper: Progressive Real-Time Rendering of One Billion Points Without Hierarchical Acceleration Structures (Markus Schütz, Gottfried Mandlburger, Johannes Otepka, Michael Wimmer).

Skye is a live coding framework and point cloud viewer using a progressive rendering method that allows viewing any point cloud that fits in GPU memory in real time without the need to create hierarchical acceleration structures in advance. Instead of rendering all the points every frame, we distribute the rendering over multiple frames. The previous frame is reprojected to the current in order to preserve already rendered detail, and holes are filled by rendering a certain number of random points. The amount of random points can be adjusted to ensure real-time frame rates and over the course of a few frames, the image will converge to the full model.

  • The rendering engine is implemented in Javascript (using V8) and code can be modified at runtime. Saving a *.js file via ctrl+s will immediately execute it and subsequently replace old code with the new one.
  • The javascript engine is backed by a C++ and OpenGL core. JS bindings exist for most OpenGL functions. Some performance sensitive parts may be written entirely in C++.
  • It's relatively easy to implement your own functionality in C++ and write a JS binding to it. Check V8Helper.cpp for some examples. There are also examples like readFileAsync for bindings that return promises, and therefore allow you to execute C++ code in parallel threads and invoke a callback / resolve the promise in JS once the thread finishes.

It's being developed at the Research Division of Computer Graphics, TU Wien

Videos (YouTube):

Getting Started

Install

Open Skye.sln and compile the project in Release mode.

Then, open the workspace in Visual Studio Code by right clicking an empty region, then selecting "Open with Code". Start the application from vscode by pressing ctrl+shift+b.

Things to do

In order to view one of your own point clouds, open "modules/progressive/progressive_pointcloud.js" and change the load command to let las = loadLASProgressive("C:/my_pointcloud.las");. Once you save the file with ctrl+s, the file will be loaded. The current demo works with point clouds that have color data and point clouds that have extra attributes. There are bugs to fix for standard attributes other than RGB. We recommend to try ot_35121F2416A_1.laz hosted at Open Topography with 54 million points, convert it to LAS (las2las ot_35121F2416A_1.laz -o ot_35121F2416A_1.las), and then specify that file in the loadLASProgressive call. You can also try a las file without color. In that case, uncomment vColor = vec3(1, 1, 1); in reproject.vs. This will render your point cloud in white.

Performance

Point clouds can be loaded at rates up to 100 million points per second from M.2 NVMe SSDs. For this to work, you will need to convert your las file to a custom format (that matches the vertex buffer format) with tools/las2bin.js. You will also need to change the load command to loadBINProgressive.

Rendering performance depends on how many points you use to progressively fill holes. You can change this amount in render_progressive.js. Look for let remainingBudget = and set this to something between 1 to 30 million, depending on your GPU performance. Just press ctrl+s, the change will be applied at runtime. There is also a dynamic/adaptive budget, but that one is bugged since one of the recent commits.

Rendering performance. Brute-force: Time to render all points in a single frame. Progressive: Time spent on the passes and the total time of a progressively rendered frame. Budget: Number of points rendered in the Fill pass. All timings in milliseconds. The Vienna data set on 1660 produces notable results. The progressive method converges multiple times faster if only the first 230 million points are rendered, instead of all 277. This is because if there is not enough GPU memory left, the GPU will use slow shared memory for parts of the data. The progressive rendering approach can still reach real-time performance in such cases, but the time to convergence will be multiple times larger.

Limitations

This project is an early prototype that is super unstable. It works, but you should expect crashes, bugs and frequent breaking changes as it is updated.

License

This project is licensed under the 2-Clause BSD License, see LICENSE.txt. Some parts of the engine, mainly the math classes is src_js/math, are heavily inspired and partially taken from three.js, which is available under the MIT License.

skye's People

Contributors

m-schuetz avatar potree avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

skye's Issues

How to debug the js files?

Hi,

Thanks for this awesome project. I am also working on a point clouds editing software, and this technique is very interesting to me.

I have managed to get the project work and show the point clouds. But my system is created in c++ environment, I need to port it to native OpenGL.

But I don't get a start point to debug the code and understand it.

Would you please kindly me let me know if there is a way to debug the rendering code? Or at least direct me some paths to understand the code.
I have done some digging and found that the core functions update() and render() are all coded in js files.

Regards,
Han

Mit welcher Version kompiliert Skye fehlerfrei?

Compile errors:

Schweregrad Code Beschreibung Projekt Datei Zeile Unterdrückungszustand
Fehler (aktiv) E0135 "namespace "std::experimental::filesystem"" hat keinen Member ""file_size"". Skye C:\Users\micha\Skye\modules\progressive\LASLoader.h 1058
Fehler C2039 "file_size" ist kein Member von "std::experimental::filesystem". Skye C:\Users\micha\Skye\modules\progressive\LASLoader.h 1058
Fehler C3861 "file_size": Bezeichner wurde nicht gefunden. Skye C:\Users\micha\Skye\modules\progressive\LASLoader.h 1094
Fehler C2039 "file_size" ist kein Member von "std::experimental::filesystem". Skye C:\Users\micha\Skye\modules\progressive\ProgressiveBINLoader.h 61
Fehler C3861 "file_size": Bezeichner wurde nicht gefunden. Skye C:\Users\micha\Skye\modules\progressive\ProgressiveBINLoader.h 61
Fehler C2039 "file_size" ist kein Member von "std::experimental::filesystem". Skye C:\Users\micha\Skye\modules\progressive\ProgressiveBINLoader.h 113
Fehler C3861 "file_size": Bezeichner wurde nicht gefunden. Skye C:\Users\micha\Skye\modules\progressive\ProgressiveBINLoader.h 159
Fehler C2039 "file_size" ist kein Member von "std::experimental::filesystem". Skye C:\Users\micha\Skye\modules\progressive\LASLoader.h 1058
Fehler C3861 "file_size": Bezeichner wurde nicht gefunden. Skye C:\Users\micha\Skye\modules\progressive\LASLoader.h 1094
Fehler C2039 "file_size" ist kein Member von "std::experimental::filesystem". Skye C:\Users\micha\Skye\modules\progressive\ProgressiveBINLoader.h 61
Fehler C3861 "file_size": Bezeichner wurde nicht gefunden. Skye C:\Users\micha\Skye\modules\progressive\ProgressiveBINLoader.h 61
Fehler C2039 "file_size" ist kein Member von "std::experimental::filesystem". Skye C:\Users\micha\Skye\modules\progressive\ProgressiveBINLoader.h 113
Fehler C3861 "file_size": Bezeichner wurde nicht gefunden. Skye C:\Users\micha\Skye\modules\progressive\ProgressiveBINLoader.h 159
Fehler C2039 "exists" ist kein Member von "std::experimental::filesystem". Skye C:\Users\micha\Skye\src\utils.cpp 14
Fehler C3861 "exists": Bezeichner wurde nicht gefunden. Skye C:\Users\micha\Skye\src\utils.cpp 12
Fehler C2039 "last_write_time" ist kein Member von "std::experimental::filesystem". Skye C:\Users\micha\Skye\src\utils.cpp 20
Fehler C2027 Verwendung des undefinierten Typs "std::experimental::filesystem::v1::path" Skye C:\Users\micha\Skye\src\utils.cpp 20
Fehler C3861 "last_write_time": Bezeichner wurde nicht gefunden. Skye C:\Users\micha\Skye\src\utils.cpp 12
Fehler C2039 "last_write_time" ist kein Member von "std::experimental::filesystem". Skye C:\Users\micha\Skye\src\utils.cpp 25
Fehler C2027 Verwendung des undefinierten Typs "std::experimental::filesystem::v1::path" Skye C:\Users\micha\Skye\src\utils.cpp 25
Fehler C2039 "file_size" ist kein Member von "std::experimental::filesystem". Skye C:\Users\micha\Skye\include\V8File.h 50
Fehler C3861 "file_size": Bezeichner wurde nicht gefunden. Skye C:\Users\micha\Skye\include\V8File.h 50
Fehler C2039 "file_size" ist kein Member von "std::experimental::filesystem". Skye C:\Users\micha\Skye\include\V8File.h 50
Fehler C3861 "file_size": Bezeichner wurde nicht gefunden. Skye C:\Users\micha\Skye\include\V8File.h 50
Fehler C2039 "remove" ist kein Member von "std::experimental::filesystem". Skye C:\Users\micha\Skye\src\V8Helper.cpp 2076
Fehler C2664 "int remove(const char *)" : Konvertierung von Argument 1 von "std::string" in "const char *" nicht möglich Skye C:\Users\micha\Skye\src\V8Helper.cpp 2076
Fehler C2039 "exists" ist kein Member von "std::experimental::filesystem". Skye C:\Users\micha\Skye\src\V8Helper.cpp 2112
Fehler C3861 "exists": Bezeichner wurde nicht gefunden. Skye C:\Users\micha\Skye\src\V8Helper.cpp 2112

How to switch point attributes?

Hi,
Thanks for this awesome work, I watch you video in YouTube, you display switch between point attributes. It's very fast. but i don't know how to switch the attributes.
Appreciate for your reply.

Can Not Display

I'm a novice and interesting for your excellent work.But there are some puzzles when I tried to run the code following the introduction.First,I compiled the Skye.sln and there are some errors,which had been solved since I change "std::experimental::filesystem" to "std::filesystem"(I think that's because my VS version is latest).Then I opened the workspace with VSCode and pressed 'ctrl+shift+b'.Though it's had been building,nothing displayed except for some warnings on terminal as shots below:
image
There was a icon on bottom but no windows display:
image
Then I change the load in 'progressive_pointcloud.js' as 'To do things',but the problems still existed.
I wonder did I miss some points or do something wrong?
Appreciate for your reply.

A question of fill.vs

image
image
In fill.vs ,there's a uniform variable called "uOffset", and set it to 0 in Program, I want to know why you did that. And I tried to set it to 0 manually in the shader, but it didn't work.
image
Thank you very much if you can answer my questions. : )

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.