potree / PotreeConverter

Create multi res point cloud to use with potree
http://potree.org
BSD 2-Clause "Simplified" License
690 stars 427 forks source link

PotreeConverter: how to run it? #179

Closed umbe1987 closed 4 years ago

umbe1987 commented 8 years ago

I am very confused on the way PotreeConverter should be installed... I followed the instructions in the main README.md. Working on a Windows machine (Windows 8), I was able to build everything and finally complete the instructions. The way I did it: everytime there was the need to copy the git master, I created a folder called "lastools", then another called "potreeconverter". After succesfull completion, I am really confused about one thing: am I also supposed to extract the potreeconverter windows 64bit release? Because I can't find any "PotreeConverter.exe" in the master directory after completing the building instructions. Moreover, before trying to build everything I extracted the zip windows64, and found a "PotreeConverter.exe" which after launch popped up a command window for one second and then closed it. Eventually, I have the same issue on my Ubuntu machine, where I don't understand how to run (e.g.) "./PotreeConverter.exe C:/data.las -o C:/potree_converted -p pageName" if no "PotreeConverter.exe" exists. And in Ubuntu ".exe" files should not work, don't they? Eventually, Please, consider I am not an expert, so forgive my lacks of knowledge on how it should work. I am really excited about the power of Potree, but I am kind of stucked at the installation step. Hope someone could help me. Thanks in advance!

umbe1987 commented 8 years ago

Got it, the zip files is pre-compiled as far as I understood. Still having issues on how to run it from Ubuntu though. Very close to find the solution, will close this if I can do it myself. Sorry for being so dumb...

PaulKarkoska commented 8 years ago

Hi, I am curious to know if you have anymore information on this. I am sort of having a similar issue, in that I don't necessarily know how to move forward with converting my own models. I have downloaded all the required resources, but am stuck on this step (how to set up lastools, environment variables, and boost).

I am no expert, and have only an intermediate knowledge of general web development I am not sure how to properly prepare the environment to be able to utilize the Potree Converter. I currently have the local Apache web server up and running with XAMPP. My OS is Windows 10.

Any help with this would be much appreciated. Thanks!

umbe1987 commented 8 years ago

If you are talking about setting the environment variables, from the command prompt (CMD) you need to use all the commands listed in the readme (e.g. "set LASZIP_INCLUDE_DIRS=D:\dev\workspaces\lastools\master\LASzip\dll", without the double quotes), changing "D:\dev\workspaces" with your actual path of installation. Then you need to have the full Visual Studio 2015 suite installed to get the "cmake" command at the end working (see here). In the end, of you simply unzip the potreeconverter windows 64bit release you can use it directly without having to compile it.

PaulKarkoska commented 8 years ago

I was able to get the environment variables set, but I am not sure where to input the commands for lastools or anything other than the variables setup part.

But do I understand correctly that I can just run "PotreeConverter.exe" and use it directly without even having to mess with any of those additional steps? If so, then I seem to be having an issue opening PotreeConverter. When I open or run the .exe file, it opens then closes immediately. Every now and then it will stay open for a bit, then closes again rapidly.

Am I doing something wrong, or missing any steps to using the converter?

Thanks!

m-schuetz commented 8 years ago

The PotreeConverter.exe is a command line tool. Open the windows command line ( cmd.exe or powershell ) and then follow the usage section here: https://github.com/potree/PotreeConverter

PaulKarkoska commented 8 years ago

Thank you @m-schuetz for the help. So far, I've gotten the converter to run properly (I believe), although when I open the HTML file that is written to the output location, all I get is a blank 3D space with no points. It's confusing to me because the log says that 100% of the 5,000,360 points were processed. Do you maybe have any ideas as to why I would get a blank space when opening or how I can fix that?

Here is the command that I ran and the complete output:

C:\Users\pkarkoska.MEIM\Desktop\PotreeConverter_1.4RC_windows_64bit>PotreeConverter.exe C:\Users\pkarkoska.MEIM\Desktop\velodyne.laz -o C:\Users\pkarkoska.MEIM\Desktop\PotreeOutput -p velodyne_test == params == source[0]: C:\Users\pkarkoska.MEIM\Desktop\velodyne.laz outdir: C:\Users\pkarkoska.MEIM\Desktop\PotreeOutput spacing: 0 diagonal-fraction: 200 levels: -1 format: scale: 0 pageName: velodyne_test output-format: BINARY projection:

AABB: min: [1.2572e+06, 501,697, 618.723] max: [1.25793e+06, 502,228, 1,001.02] size: [727.464, 531.146, 382.301]

cubic AABB: min: [1.2572e+06, 501,697, 618.723] max: [1.25793e+06, 502,425, 1,346.19] size: [727.464, 727.464, 727.464]

spacing calculated from diagonal: 6.30002 READING: C:\Users\pkarkoska.MEIM\Desktop\velodyne.laz INDEXING: 1,000,000 points processed; 1,000,000 points written; 1.698 seconds passed INDEXING: 2,000,000 points processed; 2,000,000 points written; 3.493 seconds passed INDEXING: 3,000,000 points processed; 3,000,000 points written; 5.302 seconds passed INDEXING: 4,000,000 points processed; 4,000,000 points written; 7.055 seconds passed INDEXING: 5,000,000 points processed; 5,000,000 points written; 8.9 seconds passed closing writer

conversion finished 5,000,360 points were processed and 5,000,360 points ( 100% ) were written to the output. duration: 14.506s

umbe1987 commented 8 years ago

You should use a webserver (e.g. Xampp). Aseuming you installed xampp, run its console sms start apache. Then copy all the content of the potreeconvertee output (in your case the "potreeoutput" folder) into "htdocs" folder (which is found in your xampp folder). Finally, in a browser launch the html with a URL like "localhost/potreeoutput/examples/velodyne_test.html" or similar. This should work (or at least it did in my case).

m-schuetz commented 8 years ago

@umbe1987 Thanks for answering some questions here.

.../velodyne_test.html

Are you from velodyne lidar?

umbe1987 commented 8 years ago

@m-schuetz You're welcome. No I'm not from velodyne. I used potree to test point cloud publishing and now I hope to use it for a project. Should I use it for it, I will let you know (hopefully I can give you some data, but I'm not sure). Anyway, I work for One Team srl in Italy. Thanks for potree! P.S.: "/velodyne_test.html" was supposed by the argument -p output of the PotreeConverter in the comment of @PaulKarkoska

PaulKarkoska commented 8 years ago

Thanks again to both of you, @m-schuetz and @umbe1987 for all your help. I am also not with Velodyne; I just found a sample file online to test with. I've gotten the converter and local web server working, so I guess all that is left is to find a way to host the content for use via the Internet. Thanks again for everything!

zebitz commented 8 years ago

I am running PotreeConverter 1.3,1 on a Windows 7 machine and it appears to run fine from the command line. Nevertheless it generates no html file in the output folder, it only generates the 'data' and 'temp' folders and the cloud.js file - but there is no html file. How do I view the converted point cloud in the browser if there is no html file generated?

m-schuetz commented 8 years ago

Did you use the "-p " option? This option generates a html page.You then have to move all the files to a web server in order to view them inside the browser.

zebitz commented 8 years ago

yep, in the C:\temp directory I wrote the following in the command line: potreeconverter -o C:\xampp\htdocs\potree -p test3 C:\temp

The tool then outputs in C:\xampp\htdocs\potree\resources\pointclouds\test3 but there is no .html file, only the data and temp folder and the cloud.js file. I am using the potreeconverter 1.3.1 on win7

aleksandrmelnyk commented 8 years ago

Yep, it doesn't generate the html page for me too. Linux, opensuse.

umbe1987 commented 8 years ago

I looked in my folders and I normally don't have a html file in the "resources" subfolder, rather in the "examples" one. The command I used to generate my files was "C:\Umberto\data\my_cloud.pts -o C:\Umberto\potree\my_potree -p pagename" and I found the HTML inside "C:\Umberto\potree\my_potree\examples".

aymanhalabya commented 8 years ago

For me it generates the .html page but it is empty! Does anyone know the reason for this? or any solution? I am running Ubuntu 16.4 Thanks in advance.

quicklikerabbit commented 7 years ago

@aymanhalabya I came across a similar issue running Ubuntu 14.04 (almost a year after you, so hopefully this is useful to you or someone else). I got an error/warning during the conversion saying "./resources/page_template cannot be found or is not a directory". The directory exits, but it's not where the executable expects. So I moved the executable into the same folder as the 'resources' folder (in my case, into: ~/dev/workspaces/PotreeConverter/master/PotreeConverter). Conversion ran and produced a good looking html file.

mghildiy commented 6 years ago

Hi,

I m facing crash issue when I run this command:

PotreeConverter.exe -i D:\data\HAD\pocs\potree\Sign_Las_CallboxSign_Projected.las -o D:\data\HAD\pocs\potree\output -p mypotreepage

error

What am I missing here?

I am on Windows 10.

ewallen88 commented 6 years ago

Getting the same error as @mghildiy while trying to convert a 250GB .ptx file, were you able to find a solution @mghildiy ? I'm also getting the same laszip.lib missing issue you reported on #311 while trying to build / troubleshoot.

Is this possibly a file size issue @m-schuetz ? So far it's worked fine with files in the 20-30GB range. Still new at this, so not sure what constitutes a "big" file.

mghildiy commented 6 years ago

@ewallen88 , I haven't got the workaround yet.

eugenn commented 6 years ago

@ewallen88 I've got the same issue when using -i option, so just skip it

fillway commented 6 years ago

@mghildiy - did you solve your problem?

mghildiy commented 6 years ago

Hi @fillway,

I am able to use Potreeconverter successfully. Following are the steps I followed:

This would generate potree folder at the location(-o), containing all the needed data

Start XAMPP server, and view the file at: http://localhost:8012/potree/mypotree.html

I hope it helps.

CHARLY9090 commented 4 years ago

Hi everyone, I am using potree and I get two lib folders, pountclouds and the html. I activate xampp and on the internet I write http: //localhost/potree/nuberb.html .. it shows me the blue screen and the tools on the left side but my point cloud does not appear. Can anybody help me? It is a school project and in programming my knowledge is limited. Thank you.

C:\PROGRAMAS\POTREE\PotreeConverter>PotreeConverter.exe C:/NUBERB.las -o C:\xampp\htdocs\potree --generate-page NUBERB == params == source[0]: C:/NUBERB.las outdir: C:\xampp\htdocs\potree spacing: 0 diagonal-fraction: 200 levels: -1 format: scale: 0 pageName: NUBERB projection:

processing following attributes: POSITION_CARTESIAN RGBA intensity number of returns return number source id

AABB: { "min": [354281.361000, 2268617.282000, 2004.169000], "max": [354525.878000, 2268873.851000, 2039.172000], "size": [244.517000, 256.569000, 35.003000] }

cubicAABB: { "min": [354281.361000, 2268617.282000, 2004.169000], "max": [354537.930000, 2268873.851000, 2260.738000], "size": [256.569000, 256.569000, 256.569000] }

total number of points: 21,581,090 spacing calculated from diagonal: 2.22195 READING: C:/NUBERB.las INDEXING: 1,000,000 of 21,581,090 processed (4%); 1,000,000 written; 1.734 seconds passed INDEXING: 2,000,000 of 21,581,090 processed (9%); 2,000,000 written; 2.728 seconds passed INDEXING: 3,000,000 of 21,581,090 processed (13%); 3,000,000 written; 3.765 seconds passed INDEXING: 4,000,000 of 21,581,090 processed (18%); 4,000,000 written; 4.916 seconds passed INDEXING: 5,000,000 of 21,581,090 processed (23%); 5,000,000 written; 6.004 seconds passed INDEXING: 6,000,000 of 21,581,090 processed (27%); 6,000,000 written; 7.184 seconds passed INDEXING: 7,000,000 of 21,581,090 processed (32%); 7,000,000 written; 8.363 seconds passed INDEXING: 8,000,000 of 21,581,090 processed (37%); 8,000,000 written; 9.509 seconds passed INDEXING: 9,000,000 of 21,581,090 processed (41%); 9,000,000 written; 10.706 seconds passed INDEXING: 10,000,000 of 21,581,090 processed (46%); 10,000,000 written; 12.009 seconds passed FLUSHING: 59.077s INDEXING: 11,000,000 of 21,581,090 processed (50%); 11,000,000 written; 73.997 seconds passed INDEXING: 12,000,000 of 21,581,090 processed (55%); 12,000,000 written; 77.314 seconds passed INDEXING: 13,000,000 of 21,581,090 processed (60%); 13,000,000 written; 78.526 seconds passed INDEXING: 14,000,000 of 21,581,090 processed (64%); 14,000,000 written; 79.95 seconds passed INDEXING: 15,000,000 of 21,581,090 processed (69%); 15,000,000 written; 81.127 seconds passed INDEXING: 16,000,000 of 21,581,090 processed (74%); 16,000,000 written; 82.254 seconds passed INDEXING: 17,000,000 of 21,581,090 processed (78%); 17,000,000 written; 83.428 seconds passed INDEXING: 18,000,000 of 21,581,090 processed (83%); 18,000,000 written; 84.643 seconds passed INDEXING: 19,000,000 of 21,581,090 processed (88%); 19,000,000 written; 85.801 seconds passed INDEXING: 20,000,000 of 21,581,090 processed (92%); 20,000,000 written; 86.985 seconds passed FLUSHING: 57.101s INDEXING: 21,000,000 of 21,581,090 processed (97%); 21,000,000 written; 149.464 seconds passed closing writer

conversion finished 21,581,090 points were processed and 21,581,090 points ( 100% ) were written to the output. duration: 159.463s

ricchanka commented 4 years ago

@mghildiy thank you for the steps, i just wish you can detail them a bit more cause i did exactly the same but when I open the HTML file "http://127.0.0.1/potree/mypotree.html" there is only blank, I don't know why. i downloaded and installed XAMPP, Downloaded PotreeConverter(PotreeConverter_1.6_windows_x64.zip). for this step :"Run following command from Potree folder" I went to the PotreeConverter folder and run the command from that folder. i don't know why it's not working did I do something wrong ? (btw I'm a student and I have little knowledge in this I would be so thankful if you can help)

C:\PotreeConverter_1.7PRE_2019.11.10_windows_x64\PotreeConverter_1.7PRE_2019.11.10_windows_x64>PotreeConverter.exe C:\pc.las -o C:\xampp\htdocs\potree --generate-page mypotree == params == source[0]: C:\pc.las outdir: C:\xampp\htdocs\potree spacing: 0 diagonal-fraction: 200 levels: -1 format: scale: 0 pageName: mypotree projection:

processing following attributes: POSITION_CARTESIAN RGBA number of returns return number

AABB: { "min": [-21.049999, 18.461000, -0.011000], "max": [-16.702000, 21.405001, 3.284000], "size": [4.348000, 2.944000, 3.295000] }

cubicAABB: { "min": [-21.049999, 18.461000, -0.011000], "max": [-16.702000, 22.809000, 4.337000], "size": [4.348000, 4.348000, 4.348000] }

total number of points: 618,584 spacing calculated from diagonal: 0.0376548 Source directory C:\PotreeConverter_1.7PRE_2019.11.10_windows_x64\PotreeConverter_1.7PRE_2019.11.10_windows_x64\resources\page_template does not exist or is not a directory. READING: C:\pc.las closing writer

conversion finished 618,584 points were processed and 618,584 points ( 100% ) were written to the output. duration: 4.282s image

midnight-dev commented 4 years ago

@ricchanka Ah, this is a bug. The program is expecting the page template to be in a specific location, and it seems that it's often not where it needs to be.

Find your executable. Does it have a PotreeConverter directory in the same place? If so, look inside it, and copy the resources directory. Go back to the location of the executable and paste resources there.

After you have the resources folder in the same location as PotreeConverter.exe, run the command again. Tack on the --overwrite flag to the end so it can overwrite the borked page or simply use a different page name so nothing collides.

Hope that helps. Writing this from my phone, so I can't provide screenshots or double check paths, but I think this should work 👌

Addendum: This should also work for Linux friends having the same issue, but obviously the executable will be a binary file without the .exe extension.

ricchanka commented 4 years ago

@midnight-dev thank you so much for your help. i did exactly what u said and now I have the template of the page ( with all the tools as demonstrated in the picture ) but the point cloud is absent unfortunately. so i'm still doing something wrong i guess. image

CHARLY9090 commented 4 years ago

Hello @ricchanka , I had that problem ... For some reason it only happens to me with Potree V1.7. Then load the stable potree 1.6 and I can run without any problem. My models look perfect. Maybe you should try another version.

midnight-dev commented 4 years ago

I'm assuming you're serving the page via your local or remote server rather than double clicking the web page, as some resources won't load over the file: protocol.

Seeing the developer console would be really helpful in these situations, so visit the dev tools when you get a chance. All I can do is guess for now.

Could be your converted point cloud. If you run PotreeConverter.exe without any data/settings, it will give you the help output. Try adjusting the scale so it's not 0. See if that does anything.

Other than that, check to see if the workers are present in the Potree JavaScript library directory. The workers are in charge of loading all of the file types. Should be located in a /workers/ folder near root of Potree. Maybe nested in a /resources/ folder? Not 100% positive on the location, but Potree will act in this peculiar way if there are problems with workers. I can't get to my PC now due to a nasty storm, but I hope I gave you enough hints to find the fix.

(Browser developer consoles should tell you what's wrong even if I can't, by the way.) Good luck! :)

ricchanka commented 4 years ago

@CHARLY9090 thank you so much i changed the version to " PotreeConverter 1.6 " and it worked perfectly! @midnight-dev thank you so much for your time. image

CHARLY9090 commented 4 years ago

@ricchanka Excellent! Regards.

adrianokamo commented 4 years ago

Hello, I have a problem, the html does not appear and my command line C: \ xampp2 \ htdocs \ PotreeOutput -p test1 --page-template I already have the xammp installed but not logor visualize

potree commented 4 years ago

xampp is no longer the recommended way to use Potree on your local PC. Instead, follow the getting started section: download node.js, run "npm start", open "localhost:1234/examples/viewer.html".

Alternatively, you can wait a day (or latest end of week) until I've published the new PotreeDesktop. With that, you can simply drag&drop your point clouds into PotreeDesktop.

adrianokamo commented 4 years ago

I can't make the html appear, some other way Screenshot_1

adrianokamo commented 4 years ago

image I have a problem at the moment when I run, I don't get anything from the html any more

midnight-dev commented 4 years ago

@adrianokamo I've been working on a lot of PHP lately, so forgive me if I've forgotten proper command line inputs. However, I think I see a couple issues already.

Don't specify the --page-template if you're not going to pass in a new template location. If I recall correctly, that's what it's for. Just use -p YourPointCloud to generate a Potree project with HTML/JS for the point cloud conversion it outputs, called "YourPointCloud" or whatever name you give it.

If you've already converted / generated broken projects, add the --overwrite flag to the end of the command so it can overwrite the bad files.

Also, it looks like PotreeConverter is outputting a conversion with 0 points. That means the point cloud has no content, no geometry, no octrees. Make sure that you pass in the path of a good point cloud in the command line as a source/input. I think it implicitly checks the first parameter, so you don't have to use a specific flag. That means you can try something like this:

PotreeConverter.exe path\to\source -p YourPointCloud --overwrite

Corrected: PotreeConverter.exe path\to\source.las -o output_name -p YourPointCloud --overwrite


Edit

From the earlier documentation, this is the proper syntax which specifies the input, output, and generation.

PotreeConverter.exe C:/data.las -o C:/potree_converted -p pageName


I've forgotten whether the output location is necessary when using the page generator. For more inormation about syntax / options for the CLI, just run PotreeConverter executable in the terminal without any options. It will display help documentation in the terminal.

adrianokamo commented 4 years ago

Thank you very much I think you can solve the problem since it is something difficult for me, although it seems easy to enter command lines without being familiar.

adrianokamo commented 4 years ago

A doubt because the salina format is still the same as 0 is what I do not understand, it returned to generate the point cloud file den .las but it still marks 0 I do not know if it is for the pc but it will change a windos 7

midnight-dev commented 4 years ago

Sorry @adrianokamo I don't know what you mean by that. There's nothing for me to fix. You have to try using the correct syntax in the command line. The program won't work as expected if you give it wrong data.

I think something must be getting lost in translation. Maybe someone else can explain help.

adrianokamo commented 4 years ago

image I was not perhaps very clear only that there is the command line perhaps I am something absent-minded but I do not know if I am something wrong with it, the truth I am looking for some tutorial if there is to be able to guide me but I mark the following photo

image

midnight-dev commented 4 years ago

You're submitting a lot sources. Try inputting ONE source and ONE destination. If you get it working with one source, you can try multiples later. For now, you have to try to keep it simple to get it working.

Follow this syntax: PotreeConverter.exe SOURCE_FILE -o DESTINATION_FOLDER -p PAGE_NAME

Where:

Paths can also be relative, but since you're having a lot of trouble with this, just try fully qualified paths right now. You should NOT try multiple sources right now since it's creating problems. Just use one absolute path. That means you need to put the original point cloud file in a location that's easy to type. For example, instead of having it in "My Documents" move it to D:\Clouds\source.las (assuming you have a D: drive and that your point cloud is a file called "source.las")... And then you could make the destination a nearby location, like D:\Clouds\Converted (it's supposed to be a single folder, no spaces).

Remember! Follow the syntax: PotreeConverter.exe SOURCE_FILE -o DESTINATION_FOLDER -p PAGE_NAME

I don't think I can be any more specific, so please re-read this and my previous comment if you have more problems.

Edit:

Feel like I should also add that you can change directory ("cd") into the folder that the executable is in. When your current directory has PotreeConverter.exe in it, you don't have to specify the full, absolute path to the executable. You can just type in "PotreeConverter.exe" (without quotes) followed by the required parameters like source & destination.

Definitely need to add --overwrite to the end if you've already got broken conversions.

So, cd into the proper folder that has the executable, and call it like this (but replace what you need to):

PotreeConverter.exe D:\clouds\mycloud.las -o D:\clouds\potree_converted -p MyPointCloud --overwrite

Hope that does it, and you can always get syntax help with this: PotreeConverter.exe -h (or --help)

adrianokamo commented 4 years ago

image THANK YOU VERY MUCH SPOR YOUR TIME @midnight-dev BUT I DON'T KNOW WHY I GET THAT WAY AT THE TIME OF THE ARCHVI HTML IS WHAT I DIDN'T UNDERSTAND IN THE END BUT I THINK THAT WITH THE NEW VERSION PotreeDesktop I CAN PULL THE JS AND LOAD IT FROM THERE

C:\PotreeConverter_1.6_windows_x64>PotreeConverter.exe D:\parte3ok.las -o D:\potree_converted -p MyPointCloud2 --overwrite == params == source[0]: D:\parte3ok.las outdir: D:\potree_converted spacing: 0 diagonal-fraction: 200 levels: -1 format: scale: 0 pageName: MyPointCloud2 projection:

AABB: min: [732,163, 2.15554e+06, 748.148] max: [733,813, 2.1569e+06, 997.211] size: [1,649.92, 1,352.33, 249.063]

cubic AABB: min: [732,163, 2.15554e+06, 748.148] max: [733,813, 2.15719e+06, 2,398.07] size: [1,649.92, 1,649.92, 1,649.92]

spacing calculated from diagonal: 14.2887 READING: D:\parte3ok.las . . .

conversion finished 285,962,929 points were processed and 285,962,929 points ( 100% ) were written to the output. duration: 1,531.94s

midnight-dev commented 4 years ago

Please try putting the generated HTML page (with the folder) on a server to load it correctly. It can be a localhost server like XAMPP or a remote server that you would access via a domain name or IP address. Modern browsers will refuse to load some resources if you open a page as a file on your PC. If you see file: or any drive letters in the URL (like C: or D:) then it's not going to load correctly.

Whether you use a local server (XAMPP or a Node/npm based one) or upload all of the files to a web host, that should fix the issue.

elkoala86 commented 3 years ago

@midnight-dev I followed the steps that you mentioned previously and it worked for me. Thanks.!! image

Now, I have a question: What type of server do you recommend for trying to share these kinds of files and that this person can see them from a different location. For example, sharing a link to this person and that he/she can open it from its computer.

Sorry for my vocabulary, but, I am new in this world of potree and coding.

Regards.

lingjianli commented 2 years ago

我无法以其他方式显示 html 截图_1 can you tell me how to create cloud.js?