UnityPointCloudViewer icon indicating copy to clipboard operation
UnityPointCloudViewer copied to clipboard

Does this plug-in support Unity to publish WebGL?

Open sunrui19941128 opened this issue 2 years ago • 11 comments

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

sunrui19941128 avatar Jan 18 '23 03:01 sunrui19941128

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)

unitycoder avatar Jan 19 '23 11:01 unitycoder

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

dbaukl avatar Feb 09 '23 14:02 dbaukl

  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)

unitycoder avatar Feb 10 '23 07:02 unitycoder

Any news for WebGL support?

D3m0n92 avatar May 24 '23 08:05 D3m0n92

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,

  • [x] 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.

unitycoder avatar May 24 '23 18:05 unitycoder

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.

RaoulBickmann avatar Feb 12 '24 17:02 RaoulBickmann

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

unitycoder avatar Feb 12 '24 19:02 unitycoder

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?

FirepadCN avatar May 14 '24 09:05 FirepadCN

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..

unitycoder avatar May 14 '24 17:05 unitycoder

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/

unitycoder avatar Aug 29 '24 20:08 unitycoder

another webgl test:

  • loads .GLB (GLTF) point cloud file
  • can select points
  • can adjust point size https://unitycoder.com/upload/demos/pointcloudGLTF1/

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.

unitycoder avatar Sep 04 '24 20:09 unitycoder

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

image

unitycoder avatar Nov 09 '24 22:11 unitycoder