potree | WebGL point cloud viewer for large datasets | Image Editing library
kandi X-RAY | potree Summary
kandi X-RAY | potree Summary
WebGL point cloud viewer for large datasets
Top functions reviewed by kandi - BETA
potree Key Features
potree Examples and Code Snippets
Trending Discussions on potree
I have a question regarding the Potree point cloud method I use from online sample. We have a Potree model with size 6GB and sometimes more up to 100GB, and when showing that in Forge, the memory keeps growing up until the viewer crashes, is there anything we can do to fix this?...
ANSWERAnswered 2021-Nov-23 at 12:39
You can limit the number of points for Potree to keep in memory at any point in time:
I'm developing an app using React, which uses the Potree viewer (https://github.com/potree/potree) to display large points cloud files; within the viewer I'm trying to display the real-time camera coordinates (X, Y, Z) to the user, as well as will use them to optimise the cloud rendering.
I have been able to source where the coordinates are, by getting the active camera (viewer.scene.getActiveCamera()) and finding the coordinates in viewer.scene.cameraP.position.x/y/z. Though these values seem static, and I'm saying this because I have tried to update my React component using a useEffect() hook, based on the changing of any of the coordinates, which doesn't work.
Is there anyone who encountered the same issue before and could help me out in finding/sourcing the camera coordinates real-time values, or assist me in actually using the values I have already found and make them updating real time in React?...
ANSWERAnswered 2021-Oct-25 at 03:23
After a few hours spent investigating and trying, I have come up with a solution. The principle behind it is the same as a digital clock.
Here's the code:
I have a pointcloud data created with
PotreeConverter that i want to load with
potree-core in a
when I run the scene as is, from a
flask backend everything works, I have a point cloud and a bbox around it.
but when the scene is wrapped around a
React component, the bbox is rendered but not the points
any reason it should act like this? from what I understand react is rendered on a shadowDOM which is separates from the original DOM, maybe it has something to do with it?...
ANSWERAnswered 2020-Sep-29 at 11:07
I initialize my potree-core as follow, maybe gives you a clue:
I'm stuck with an issue which ,in simple terms, is to find a way to securely render and serve HTML files (along with CSS, JS) from local disk in server to the web app running in the client browser.
- Front end Web app is created using React JS (react-admin to be exact).
- The back end that handles the Rest API requests is setup using Net core 3.1
- Both applications are hosted in IIS in a Windows server (as application service inside default website in IIS).
- The hosting of the applications has to happen only inside the IIS in windows server. (Other options are also welcome)
- Back end / Front end can be in any language as we desire. (preferably dot net core since i'm using c# for last 10 years)
I'm working on developing a solution to host point cloud viewer (Potree, an opensource project which is developed using three-js). This is a standalone process. A desktop based C++ converter is provided by the Potree which converts the inputs to a webpage (with html, css, js) (LETS CALL THIS AS TARGET FILES). We can host this webpage in any server to be viewed by external parties.
Working: The target files are hosted in IIS server as an application and it can be accessed without any issue. (image can be seen below).
Working: The react js web app is built and the dist files are hosted in IIS server and it can also be accessed without any issue.
Above two steps confirm that both the built applications work well as they can be hosted individually and can also be accessed from other computers.
FEATURE THAT I'M STUCK WITH
- The target files are meant for different users. So, this has to be served after validating through an API request.
- Current setup is such that when user clicks a link in the react application, it makes an REST Api call which is handled by the back end dotnet core app (there could be other better ways to serve the html files to the front end web app).
I tried several ways to serve HTML file. Option 1: Use StaticFiles (in startup). I'm trying to read the html file from local and then render it inside a noidea.cshtml file using...
ANSWERAnswered 2020-Apr-11 at 11:48
I tried different methods to solve this issue. Finally, i have arrived at a solution. (May be it is not the best but could be helpful to someone who also has similar issue).
WORK FLOW: Now, we receive several built webpages from our external sub contractors every week. Our subcontractors use Potree Converter to convert their point cloud data to web pages (which has several html, js, css) zipped into files of about 2-3 GB (because of the size of the point cloud data). It is not possible to download all files at one go to the client browser. This is handled by potree web page itself. Based on user browsing, the html page fetches portion of the data and sends frequently. However, we don't have to worry about it as it is completely managed by Potree dev team ( Thanks to Institute of Computer Graphics and Algorithms, TU Wien)
So, we cannot do much with the html site we receive from our sub contractors. Our work is to host and provide secure access to stake holders.
APPLICATIONS: Initially I had developed two applications and also had a converted html page from Potree converter.
- React JS web app : For working as a front end (Let's call App 1)
- Dot net core 3.1 backend: For handling API requests. (Let's call App 2)
This project is hosted in IIS. So, I created a new site (running on a different port behind a firewall and not exposed to external parties). Let's call this as Target Site
Reverse proxy setup through IIS
- We set up a reverse proxy in IIS (through ARR) for all incoming requests.
- IIS will filter the incoming URL which has a particular string in the URL. (For example, /5506f977-7463-4f85-86ff-7ca63bac34fa/ , lets say url_guid).
- URL Rewrite will change this and direct to the target site (running on different port behind firewall)
**Target Files setup **
Each time we receive new target pages (converted zip files) from sub contractors, we take the index.html file, rename it with GUID (target_file_GUID), add a tag to the header to include the url_guid and place it in a common directory.
We add the target_file_GUID to a column our Mysql database table which also has a column to store the actual name of the file.
- From App 1, we send requests to App 2 (with JWT authentication in headers and the required HTML file(or the point cloud model)).
- After validating, we fetch the guid name of the corresponding html file from the MYSQL
- This particular file is then fetched from the common directory and sent to the browser.
- At this point, the browser URL still doesn't change and contains the same URL used to reach the API controller.
- When the Html file is loaded, it also tries to load the required JS, CSS files mentioned in the html. The trick happens here. Since we have specified tag, new url request is sent to the server which is intercepted by the IIS and rewritten to internal server. (At this point, the URL in the client browser still doesn't change because of the server Rewrite).
- Client broser receives the JS, CSS files (but still the URL in the client browser and also the request headers doesn't show actual URL).
Conclusion I apologize for writing a long response and no much code. The whole setup and idea took more time to conceive (still there might be better way to handle it. I don't know).
The key achievements here are
- authorize users before directing them to different URL.
- URL Rewrite doesn't show the original url to the client browser
- Original target site is still protected behind the firewall
- the original file name of the html is replaced with GUID (which is hard to guess for the user) and this html guid name is changed repeatedly through a windows service console application every week. (Let's say we have 1000 files in total. The names change every week to keep it secure and confident).
- Users cannot direclty access the html file (even if he knows the name of the file. Because this is served only through the App 2 after authentication)
More or less, we feel that at this point this is secure enough to proceed further. If someone else is facing similar issue and has achieved different solution, please do share.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
No vulnerabilities reported
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge ItemsFind more libraries
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page