Separate PointCloud Loader

Hi, community,
I have an idea to modify the loader to directly display point clouds without pulling data from the server. I’ve looked into how the ObjLoader is built, and it seems achievable. Moreover, the official Speckle docs mention that any loader can be built according to the example provided there.

I’ve spent some time testing and searching, and I believe the best approach would be to insert the PCDLoader or PlyLoader from three.js into a custom extended loader from the Speckle package. However, I haven’t achieved any significant results yet.

Could you please help me dive deeper into the logic of building such a PointCloud loader? I’d appreciate it if you could explain what’s going on and outline the most basic and easiest steps to achieve this.

If the point cloud data isn’t coming from a Speckle server, then where?

Any more details about what you are thinking would be helpful.

Hi @jonathon.

I’ve based my question on this example from the official docs: OBJLoader - StackBlitz
In this example, the .obj model is located locally, and the loader uses it, so I was thinking of build the same loader for a point cloud (ply\pcd\xyz… whatever three.js support).
Do you think this is realistic?

Thanks

I’ll say it seems plausible but will admit my limitations and how much I rely on the expertise of @alex .

I’ll let him have his weekend and get an answer when we can.

Hi @Nikita_Sneg

It’s very much realistic. In fact here’s a live example of a minimalist PCD loader for the speckle viewer.

We’re piggybacking on the existing three.js PCD loader for all the actual parsing. The same principle can be applied for all available three.js loaders, pointcloud or otherwise. We’ve intentionally designed the speckle viewer loader system to be loose and flexible to the user’s needs.

Cheers

2 Likes

Thank you so much, this is exactly what I was looking for. :pray:

2 Likes