Sharing Clouds with Potree

To chat about anything else.
C-SE
I have made 10-20 posts
I have made 10-20 posts
Posts: 10
Joined: Thu Mar 11, 2021 5:19 pm
3
Full Name: Andrew Cosgrove
Company Details: C-SE Ltd
Company Position Title: Director
Country: United Kingdom
Linkedin Profile: No

Re: Sharing Clouds with Potree

Post by C-SE »

badam wrote: Wed Jun 29, 2022 11:33 am Hello because potree is based on threejs, then any format can be used in potree what threejs support. But you need to implement the loading of these structures. If you want to import mesh for example stl can be loaded even with materials. There are examples for this in the potree example htmls
Thanks Adam, and apologies again for my lack of programming knowledge but you're a step or two ahead of me I think! The loading of the structures is the stage I am trying to figure out

The files I want to display alongside the clouds will be fairly simple dxfs, just polylines and text like in the 'potest' example above. After a quick search I can see threejs recommends .GLB or .GLTF for 3d models, if I can convert the dxf to glb, how do I then add it to the potree file? Is there a file format that PotreeConverter will accept that I can simply add in at the same time as adding in the .las files, so they are all converted together?
badam
V.I.P Member
V.I.P Member
Posts: 916
Joined: Tue May 11, 2021 5:36 pm
2
Full Name: Adam Berta
Company Details: InnoScan 3D Hungary Kft
Company Position Title: unknown
Country: Hungary
Linkedin Profile: No
Has thanked: 51 times
Been thanked: 297 times
Contact:

Re: Sharing Clouds with Potree

Post by badam »

C-SE wrote: Wed Jun 29, 2022 3:12 pm
badam wrote: Wed Jun 29, 2022 11:33 am Hello because potree is based on threejs, then any format can be used in potree what threejs support. But you need to implement the loading of these structures. If you want to import mesh for example stl can be loaded even with materials. There are examples for this in the potree example htmls
Thanks Adam, and apologies again for my lack of programming knowledge but you're a step or two ahead of me I think! The loading of the structures is the stage I am trying to figure out

The files I want to display alongside the clouds will be fairly simple dxfs, just polylines and text like in the 'potest' example above. After a quick search I can see threejs recommends .GLB or .GLTF for 3d models, if I can convert the dxf to glb, how do I then add it to the potree file? Is there a file format that PotreeConverter will accept that I can simply add in at the same time as adding in the .las files, so they are all converted together?
No there is no plug and play version you need to write a code to load glb, gltf files and you also need to convert them beforehand. I told you stl files because there are examples of them. If you really want load lines, then you can inspect the web page (F12 in chrome) of Shane's example. How he loaded and what files did he loaded.

Ps: i looked up what shane did in the example, but i'm not sure if i would recommend that, it is probably the easiest way if you export it from your own software where you have every data. Of course you can write a vba c# app to extract informations from dxf, but there will be limitations. I 'd look a way to create gltf files from your source and another example of load gltf to threejs.
User avatar
smacl
Global Moderator
Global Moderator
Posts: 1409
Joined: Tue Jan 25, 2011 5:12 pm
13
Full Name: Shane MacLaughlin
Company Details: Atlas Computers Ltd
Company Position Title: Managing Director
Country: Ireland
Linkedin Profile: Yes
Location: Ireland
Has thanked: 627 times
Been thanked: 657 times
Contact:

Re: Sharing Clouds with Potree

Post by smacl »

badam wrote: Wed Jun 29, 2022 3:23 pmPs: i looked up what shane did in the example, but i'm not sure if i would recommend that, it is probably the easiest way if you export it from your own software where you have every data. Of course you can write a vba c# app to extract informations from dxf, but there will be limitations. I 'd look a way to create gltf files from your source and another example of load gltf to threejs.
Yep, the approach that I took was to have my own code write the threejs code to represent the entities I wanted added to the model. This was done by looking at the examples on the potree site and reading the threejs documentation. It is not a particularly elegant solution as I'm not a JavaScript programmer but it does the job.

One downside of potree is that the only useful documentation that I could find were the examples, which basically demand some programming knowledge as well as an understanding of the technology stack that potree is built on. The potree converter doesn't work with anything beyond the point cloud bit so the rest is very much up to you. Must take a look at gltf myself, I see the Microsoft gltf SDK is now freely available and there are a few DXF to gltf converters available online.
Shane MacLaughlin
Atlas Computers Ltd
www.atlascomputers.ie

SCC Point Cloud module
C-SE
I have made 10-20 posts
I have made 10-20 posts
Posts: 10
Joined: Thu Mar 11, 2021 5:19 pm
3
Full Name: Andrew Cosgrove
Company Details: C-SE Ltd
Company Position Title: Director
Country: United Kingdom
Linkedin Profile: No

Re: Sharing Clouds with Potree

Post by C-SE »

smacl wrote: Wed Jun 29, 2022 7:01 pm
badam wrote: Wed Jun 29, 2022 3:23 pmPs: i looked up what shane did in the example, but i'm not sure if i would recommend that, it is probably the easiest way if you export it from your own software where you have every data. Of course you can write a vba c# app to extract informations from dxf, but there will be limitations. I 'd look a way to create gltf files from your source and another example of load gltf to threejs.
Yep, the approach that I took was to have my own code write the threejs code to represent the entities I wanted added to the model. This was done by looking at the examples on the potree site and reading the threejs documentation. It is not a particularly elegant solution as I'm not a JavaScript programmer but it does the job.

One downside of potree is that the only useful documentation that I could find were the examples, which basically demand some programming knowledge as well as an understanding of the technology stack that potree is built on. The potree converter doesn't work with anything beyond the point cloud bit so the rest is very much up to you. Must take a look at gltf myself, I see the Microsoft gltf SDK is now freely available and there are a few DXF to gltf converters available online.
Thanks again for the replys,

While I was playing around with it yesterday I came across a few of those online DXF to GLTF converters and an online viewer, but the couple of conversions I tried didn't work, 1kb file size and nothing visible..

I'll keep investigating, sounds like I need to learn a good bit more about threejs (and programming generally) to figure it out, but I like a challange. First basic question, to add the three.js code you mentioned, is it purely in the html file, or are there additions to be made to the libs folder for example?
User avatar
smacl
Global Moderator
Global Moderator
Posts: 1409
Joined: Tue Jan 25, 2011 5:12 pm
13
Full Name: Shane MacLaughlin
Company Details: Atlas Computers Ltd
Company Position Title: Managing Director
Country: Ireland
Linkedin Profile: Yes
Location: Ireland
Has thanked: 627 times
Been thanked: 657 times
Contact:

Re: Sharing Clouds with Potree

Post by smacl »

C-SE wrote: Thu Jun 30, 2022 9:57 amThanks again for the replys,

While I was playing around with it yesterday I came across a few of those online DXF to GLTF converters and an online viewer, but the couple of conversions I tried didn't work, 1kb file size and nothing visible..

I'll keep investigating, sounds like I need to learn a good bit more about threejs (and programming generally) to figure it out, but I like a challange. First basic question, to add the three.js code you mentioned, is it purely in the html file, or are there additions to be made to the libs folder for example?
I haven't looked at it for awhile, but from memory all the libs are in place and it is just a matter of adding the three.js code to the HTML. Your best reference here is the potree samples on https://github.com/potree/potree/
Shane MacLaughlin
Atlas Computers Ltd
www.atlascomputers.ie

SCC Point Cloud module
Post Reply

Return to “General Chat”