unitycoder/UnityPointCloudViewer

Does this plug-in support Unity to publish WebGL?

sunrui19941128 opened this issue ยท 12 comments

1.Can I load a point cloud after publishing to a web page

there was example for the old unity webplayer, but not for webgl yet.
I'll reply here once its added for webgl.

Question:
Do you want to load "raw" point cloud data, like .ply/.asc/.las
Or, load converted data (using the in editor converter https://github.com/unitycoder/UnityPointCloudViewer/wiki/PointCloud2Binary or https://github.com/unitycoder/UnityPointCloudViewer/wiki/PointCloud2Mesh or standalone converter https://github.com/unitycoder/PointCloudConverter)

Hello. Just to confirm - does this plug-in, at the moment, allow point cloud data to be shown in a WebGL build?

If I was to import and convert an .LAS/LAZ at runtime, using this script https://github.com/unitycoder/UnityPointCloudViewer/blob/master/Extras/Scripts/RuntimeLASConvert.cs, is it possible to show that in WebGL, or is it only possible in a standalone Windows build?

Thanks for your help

  1. Webgl build currently only supports Point Cloud meshes (so need to use the in Editor converter, to create meshes https://github.com/unitycoder/UnityPointCloudViewer/wiki/PointCloud2Mesh , those generated meshes in editor could be converted to assetbundles, to allow loading on demand)

  2. That runtimeLasConvert output is not supported in the webgl version at the moment (i'll need to add that mesh generation part for webgl runtime first, then it would be possible to load small clouds, could then add also dynamic loading, that it requests correct cloud piece, based on player position)

Any news for WebGL support?

Made some initial tests while ago, but running out of memory (even with a small'ish <50mb file)
So still needs some work.. or just have to work with much smaller files.

adding some info about my todo list here,

  • find suitable file size that works with webgl
  • test shader point size support for webgl (probably no geometry shader)
  • add support for v3 packed file format (this will create smaller files)
  • cannot use structuredbuffer in shader, and array is 65k max, must encode into Texture then
  • update rendering, if use textures as data..
  • or better just render as mesh, instead of using textures

feel free to ping here again next week or later too, if no info.

Any news here @unitycoder? Would be interested in displaying point clouds in a webgl build on runtime, without first having to convert them in unity and then updating the build.

Any news here

No webgl runtime loading updates yet,
but recently added Point Picking and Box selection features for WebGL version. (the pre converted mesh cloud one).

Hopefully next can look into the memory & loading issue again.

point picking:
pointcloud_meshpick

box selection:
upload_2023-12-9_20-39-32

Hello, if using WebGL to retrieve data from a server and then render point clouds, such as fetching a PLY file over the network, is this plugin currently not supporting runtime?

Hello, if using WebGL to retrieve data from a server and then render point clouds, such as fetching a PLY file over the network, is this plugin currently not supporting runtime?

not yet supported, still very high on the todo list, but probably next free time slot is during summer..

some tests for sending float arrays (XYZ and RGB) from regular javascript into webgl viewer and using meshes to render that data
https://unitycoder.com/upload/demos/pointcloudwebgl3/

another webgl test:

I'll continue testing with webgl+gltf ,
after i look into adding gltf tiled exporter into https://github.com/unitycoder/UnityPointCloudViewer

ideally those tiles could be used for webgl V3 tiled viewer.

unity 6000, webGPU test: (XYZ+RGB data, no pointsize/billboard here yet)
https://unitycoder.com/upload/demos/pointcloudWebGPU1/

image