Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does this plug-in support Unity to publish WebGL? #139

Open
sunrui19941128 opened this issue Jan 18, 2023 · 11 comments
Open

Does this plug-in support Unity to publish WebGL? #139

sunrui19941128 opened this issue Jan 18, 2023 · 11 comments

Comments

@sunrui19941128
Copy link

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

@unitycoder
Copy link
Owner

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)

@dbaukl
Copy link

dbaukl commented Feb 9, 2023

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

@unitycoder
Copy link
Owner

  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
Copy link
Owner

unitycoder commented May 24, 2023

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.

@RaoulBickmann
Copy link

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.

@unitycoder
Copy link
Owner

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

@FirepadCN
Copy link

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?

@unitycoder
Copy link
Owner

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
Copy link
Owner

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
Copy link
Owner

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.

@unitycoder
Copy link
Owner

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

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants
@unitycoder @FirepadCN @RaoulBickmann @sunrui19941128 @dbaukl and others