Search Unity

[Released] Point Cloud Viewer Tools

Discussion in 'Assets and Asset Store' started by mgear, Apr 14, 2014.

  1. Vick115

    Vick115

    Joined:
    Jan 22, 2020
    Posts:
    8
    In the console I am getting the file, it tells me the total points (114011780)
    Then its says finished loading So its in my scene somewhere I just cant see it but very far away. I tried to move the camera position and now I've lost even that.
    the binaryviewer is at 0,0,0 and I placed the camera at 5,5,5.
    I also tried going back to my main scene and placing the Binary Viewer prefab into my scene and setting it up the same way with not to much luck.
    I know I am close!
     
  2. Vick115

    Vick115

    Joined:
    Jan 22, 2020
    Posts:
    8
    I am going to try the scaling. I didn't see the previous post
     
  3. Rickmc3280

    Rickmc3280

    Joined:
    Jun 28, 2014
    Posts:
    189
    I've had that issue many a times because the clouds we used were tied to real world coordinates. You are going to want to scale them and move them anyways. If you get that high of precision so far away, it is working with doubles and therefore camera and object will start to jitter and shake.
     
    Vick115 likes this.
  4. Rickmc3280

    Rickmc3280

    Joined:
    Jun 28, 2014
    Posts:
    189
    Oh also, if you mesh the point cloud instead, you can double click on the cloud in editor and it will take you to it, get cords change camera. But still you really don't want the camera to jitter if you leave the old coordinate system intact.
     
    Vick115 likes this.
  5. Vick115

    Vick115

    Joined:
    Jan 22, 2020
    Posts:
    8
    I have the scaling set to.001 and my file export was indeed in meters. I have tried setting the auto Offset as well as the manual offset to 0,0,0. I have tried just about all the settings with only 400,000 points so it quickly gives me my binary file. Its loading it as the console says but I cant see anything now. I have the material set to PointCLoudColorSizeDX11v2 and visibility to display points and still nothing.
     
  6. Vick115

    Vick115

    Joined:
    Jan 22, 2020
    Posts:
    8
    Rickmc3280 Can you give me a more precise method. My point clouds will indeed be in real world coordinates and I want to see points and not meshes.
     
  7. Rickmc3280

    Rickmc3280

    Joined:
    Jun 28, 2014
    Posts:
    189
    Vick, if you convert it to mesh, the shaders that MGEAR has written only render the points, so it looks just like a point cloud, but you get all the benefits of culling to improve performance as well as potentially modifying the cloud. Yes... give me and second and Ill pull it up. I would not use that material for initial loading either btw. I always use the green material for testing.
     
  8. Choquergu

    Choquergu

    Joined:
    Oct 23, 2019
    Posts:
    2
    Ok i successfully imported my datas in V3 and tested in a vive headset with a tile viewer and it's really cool, good work !
     
    Rickmc3280 likes this.
  9. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    @Vick115 i'll send you update for the .pts comma/dot issue in private message shortly, if the problem is related to that.
     
    Vick115 likes this.
  10. Vick115

    Vick115

    Joined:
    Jan 22, 2020
    Posts:
    8
    I got it in as a mesh, I like this better
     
    Rickmc3280 likes this.
  11. Rickmc3280

    Rickmc3280

    Joined:
    Jun 28, 2014
    Posts:
    189
    MGEAR, When going to do the PC tiling in v3. It requires me to use Read RGB instead of intensity. None of my data has color data. Is there a work-around?
     
  12. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    can remove that check, actually it just works. (ill fix for next update) *although need to make sure you have intensity then enabled.

    open PointCloudViewerTilesDX11.cs
    remove these lines:
    Code (CSharp):
    1.  
    2. if (readRGB == false)
    3. {
    4.    Debug.LogError(appName + "> V3 format requires Read RGB enabled");
    5.    return;
    6. }
     
  13. Rickmc3280

    Rickmc3280

    Joined:
    Jun 28, 2014
    Posts:
    189
    Ill modify it and give it a go. However, having issues with my Intensity values, only shows up with the opaque VR material. How much effort do you think it would be to make a shader based on this: https://www.particleincell.com/2014/colormap/ for intensity based PCs?

    was thinking too, is there a shader that would allow you to grayscale based on scalar? Could specify a single color like the opaque vr and adjust its transparency / brightness based on the scalar? Edited to add ** obviously not transparency for opaque... drrr..

    I had stuck with the Mesh for a while, but wanted to test more with the Tile because of how well it can work. Getting great results initially. 100 million point cloud gets a steady 330fps on regular desktop 2-60 distance lod-ing. Kind of hard to tell the difference between the meshes and standard point clouds now. Although the tiles load pretty slow. Assuming that with this large building 2 meter sections is just too much data, but yet still getting 330fps :) so.
     
    Last edited: Mar 25, 2020
    IsDon likes this.
  14. Rickmc3280

    Rickmc3280

    Joined:
    Jun 28, 2014
    Posts:
    189
    That was in PointCloud2BinaryConverter :p thought I was going to lose my mind.
     
  15. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    oop - sorry :D
     
  16. Rickmc3280

    Rickmc3280

    Joined:
    Jun 28, 2014
    Posts:
    189
    Not bad! I just need some Intensity value visualization ;)

    Converting to Binary V3 works decent. I need to try again with mesh for a comparison.


    Edited**

    After the modified code it actually is working... my bad
    Standard DX11

    ColorSizeDx11
     
    Last edited: Mar 26, 2020
  17. WavyRancheros

    WavyRancheros

    Joined:
    Feb 5, 2013
    Posts:
    176
    Hi, I need to load pointclouds at runtime and perform measurements.

    There's the FindClosestPointBrute function in the RuntimeViewerDX11 class, and it has a //TODO replace with new measuring system. Is that "new" system the one the MeasurementManagerV2 is using?
     
  18. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    Yes, that is not done yet.. so need to use that included bruteforce


    I'll try to add that for next update.

    added optional workaround here, but not very nice:
    https://github.com/unitycoder/UnityPointCloudViewer/issues/73
     
  19. WavyRancheros

    WavyRancheros

    Joined:
    Feb 5, 2013
    Posts:
    176
    Thanks! I played around with it, and I brought the pointpicking v2 into the RuntimeViewer/PointcloudManager.
    But I run into a problem with the PointcloudManager.ProcessCloud(string cloudPath) method on a large pointcloud (3 million points). The boxIndex variable is sometimes < 0 and sometimes > newCloud.nodes.Length. So my pointcloud has 1/3 of points that are < 0, 1/3 of points that are > newCloud.nodes.Length, and the other 1/3 of points that gets properly boxed into the nodes. So the pointpicking works for these 1/3 of points.

    Maybe I did something wrong when bringing the cloudBounds calculation from the PointCloudViewer into the RuntimeViewer?

    Any ideas?
     
  20. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    Can you send your modified script (pm/email), i can test/check.
     
  21. WavyRancheros

    WavyRancheros

    Joined:
    Feb 5, 2013
    Posts:
    176
    Ah I forgot to take flipYZ into account!
     
    mgear likes this.
  22. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    some progress info:
    - Adding batch support Commandline laz/las converter (can merge & convert whole folder of laz files, using same auto-offset for all clouds), download coming soon
    - Testing GPU point highlight (already works) and picking (not ready yet), instead of cpu "brute force" point picking

    Video (dataset with 3billion points in v3 tiles viewer, view distance 5km)
     
    Rickmc3280, IsDon and sjm-tech like this.
  23. fuzymarshmello

    fuzymarshmello

    Joined:
    Feb 22, 2015
    Posts:
    17
    I am having an issue using Feature: (V3) Load Tiles On Demand shaders and VR. They only pop up when I am looking a certain direction and have my hands down in VR. also, sometimes when i stay looking in a direction where i can see the point cloud, if I move my hands the point cloud disappears as well. Is there a way to fix this? I want to use the v3 features because it is a very large point cloud

    It works prefect in non-vr though.

    Thanks
     
  24. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    i haven't seen that kind of issues with Quest+Link at least,
    can you private message some gif / video clip? (and maybe screenshots of your viewer and vr camera settings)

    also which vr device and unity version?
     
  25. Rickmc3280

    Rickmc3280

    Joined:
    Jun 28, 2014
    Posts:
    189
    sounds like a bug with a non lighthouse technology tbh.

    Never had that issue with VivePro.

    Did yall resolve the issue?

    MGEAR - would it be possible for you to do some tutorial videos for some of the newer features? :D
     
  26. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    could be also if camera view distance is too short, then it looks weird with tiles jumping visible,
    but no idea why moving hands would affect it. (didnt receive message for the details yet)

    yes.. its been on the todo list long time to record some instructions / examples.. hopefully oneday : /
    same goes for updating the docs..
     
    Rickmc3280 likes this.
  27. BobcutConnoisseur

    BobcutConnoisseur

    Joined:
    May 29, 2020
    Posts:
    1
    Hello! Just downloaded LASConverter v1.5c to try out the V3 format, but I can't seem to run it when opening the .exe file. No command line window pops up and I'm not getting an error/notification message from Windows either. Doesn't look like the .dll file is being blocked either. Tried out v1.4b and v1.1 as well but I didn't have any luck with those sadly. Any idea what's causing this issue for me?
     
  28. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    Need to run it from commandline, if click the exe it just exits too fast (without any parameters).
    I'm working on a GUI version later also.

    to make the current version easier to use, can create .bat batch file to run conversions,
    or when you are in the program folder, type: cmd in the Explorer folder field (to easily open command prompt in that folder)

    upload_2020-5-29_8-51-44.png
     
    BobcutConnoisseur likes this.
  29. projectprogramamark

    projectprogramamark

    Joined:
    Jul 15, 2019
    Posts:
    4
    Having some issues dealing with the point clouds rendering in front of things like the UI layer. Using it in Unity 3D with PointCloudColorSizeDX11 material. I've tried changing the rendering queue to every option on there but it's somehow rendering in front of things still. Any ideas as to how to solve this? Thanks!
     
  30. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    yes, its limitation of using OnRenderObject().. (docs OnRenderObject is called after camera has rendered the Scene)

    Few options,
    1) for worldspace UI you can try the included UI material: UI_Default-With-Occlusion-Pass.mat
    upload_2020-6-3_19-13-46.png

    2) Enable commandbuffer rendering, and try different passes (default one should work)
    upload_2020-6-3_19-17-8.png

    3) dont use transparent shader materials, use cutout or opaque ones
     
  31. sebaFP

    sebaFP

    Joined:
    Jun 5, 2020
    Posts:
    2
    Hi, Will you have it on sale soon?
     
  32. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    previous spring sale just finished, so not sure when there is next chance.. (could consider next spring or some end of year sale, if get invited)
     
  33. projectprogramamark

    projectprogramamark

    Joined:
    Jul 15, 2019
    Posts:
    4
    Hi mgear,

    I tried option #1, but the point cloud still seems to be occluding the menu. I'm using this point cloud plugin in Unity3D (for VR). Is it possible this material isn't compatible with that? Commandbuffer rendering seems to work fine, but am worried that might pose some problems if I were to want to utilize OnRenderObject in the future.

    Thanks!
     
  34. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    Works for me in vr also
    upload_2020-6-5_23-11-8.png
    that steering wheel is worldspace UI image, with that Occlusion pass material.
    (maybe you can PM me more details / screenshots, so we can continue there)

    Yes, commandbuffer might have some other limitations for later use, like sending those offset values (not tested)
     
  35. projectprogramamark

    projectprogramamark

    Joined:
    Jul 15, 2019
    Posts:
    4
    Not sure if this is a potential bug or if it's maybe a user error, but when creating the PointCloudManager object through script (am trying to automate loading and starting of point cloud) I get a "NullReferenceException: Object reference not set to an instance of an object" when trying to access PointCloudDX11[] Viewers in the Awake() function. This doesn't happen when the PointCloudManager object is manually made and in the scene. I'm making sure to create/load PointCloudManager before any of the point cloud objects are created.

    Edit: Forgot to mention that my point cloud gameobject is a child of another gameobject in case that has any relevance
     
  36. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    can you try making your prefab be deactive (select gameobject in Project window, deactivate gameobject in inspector),
    then after you spawn it, set those viewer references,
    then activate gameobject, which causes the Awake() to run.
     
  37. benflock

    benflock

    Joined:
    Jul 11, 2013
    Posts:
    24
    Hi - i purchased your asset - its very useful - however i have an issue with building for webgl i only seem to be able to use the shader designed for android - do you know why that would be? in editor i can create a shader in shader gaph that runs fine but the mesh is invisible once exported to web

    thanks

    b
     
  38. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    unfortunately webgl doesnt support most of the features.
    one option could be using particle system for drawing points, but havent tested.

    this seems to be the status for point meshes + webgl
    https://issuetracker.unity3d.com/is...dot-point-geometry-is-not-displaying-in-webgl
     
  39. benflock

    benflock

    Joined:
    Jul 11, 2013
    Posts:
    24
  40. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    at least most of those other shaders require higher shader targets/features (like geometry shaders),
    so they are not supported in webgl.

    *havent actually checked whats possible in the recent webgl versions.. since this looks amazing.
     
  41. sbpark04

    sbpark04

    Joined:
    Jun 2, 2020
    Posts:
    2
    Hello,
    I am not sure this is where I can ask a quick question.
    I recently bought this and have been testing this with Oculus Quest. So far this works fantastic in my computer.
    By the way, does this work with Oculus Quest?
     
  42. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    If you use the pointcloud to mesh converter, then yes.
    but not all the mesh shaders are supported, so try with the android one first at Assets\PointCloudTools\Materials\Mesh\PointCloudAndroidSizeColorMesh.mat

    also cannot really have many millions of points, few million could work, 5-6 if you put everything to minimum (and use split to grid, and camera to monoscopic mode)
     
    sbpark04 likes this.
  43. sbpark04

    sbpark04

    Joined:
    Jun 2, 2020
    Posts:
    2
    Thanks for the tip. I was wondering because there were flickering when I facing the direction where many point clouds are located. I am going to test it with monoscopic camera mode.
     
  44. vlastimirs

    vlastimirs

    Joined:
    Nov 16, 2019
    Posts:
    1
    Hi,

    On an Oculus Quest, I would like to visualize some point cloud animations from Brekel and Azure Kinect DK

    As mgear already explained to sbpark04, you can convert a PC into a mesh and display it.
    1. Does this also hold true for a series of meshes like an Animation?
    2. Can color textures (jpg,png) also be applied to such a mesh or an animation?
    3. Does PC Viewer support Draco Output in Unity (or has been tested/implemented)?

    Thanks
     
  45. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    1) Kind of, you can convert brekel animation into meshes (1 or more meshes will be outputted per frame), but then you need to manually play them back.. (by hiding/showing), but of course this wouldnt be suitable for large animations.. Last time i checked they also have some unity plugin already, so might want to check if they support large file playback or so.

    2) No, points dont have UV data, so can only adjust color from the shader per vertex (as in Tint color)

    3) No and not tested, i've seen pcx has fork with draco support so in theory that open source code could be eventually added, instead of writing from scratch. (and if you require draco support, you could try their code to load point cloud, then pass the received point arrays to my viewer)
     
    vlastimirs likes this.
  46. dpham

    dpham

    Joined:
    Jun 6, 2015
    Posts:
    6
    Video (dataset with 3billion points in v3 tiles viewer, view distance 5km)
    [/QUOTE]
    Can you share this dataset? I want to try it out. I have very large dataset from Faro scanners and want to learn how to bring them in. Thank you.
     
  47. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    There is link in the description for original laz data,

    Steps:

    - Download all these into single folder https://cloud.sdsc.edu/v1/AUTH_opentopography/PC_Bulk/NZ18_PalmN/
    - run commandline laz converter for that folder: LasConverter.exe -input="C:\your\Downloads\LAZ" -gridsize=125 -minpoints=10000 -version=3 -flip=true -pack=true -output=C:\yourunityproject\Assets\StreamingAssets\.tiles\test.pcroot
    - open example scene PointCloud-TilesViewerV3.scene
    - assign (relative or absolute) path to that output root file: .tiles\test.pcroot
    - assign packed v3 cloud material: PointCloudColorSizeDX11v3-packed.mat
    - done

    So the commandline params will split it into 125meter grid size, you might have to make that value smaller if your data is not as "flat" spread around in large area.

    *One important step, need to use 2019.1 or newer, so that you can enable these (otherwise would eventually run out of memory)
    upload_2020-7-8_9-13-4.png
     
    dpham likes this.
  48. dpham

    dpham

    Joined:
    Jun 6, 2015
    Posts:
    6
    I'm using Unity 2019.4 (LTS) and could not find the Use Native Arrays and Release Tile Memory check boxes anywhere. Am I blind? Help please. Thank you.
     
  49. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    should be there in the viewer inspector, if not can you private message me with full editor screenshot:
    upload_2020-7-8_19-16-31.png

    **Also rest of my viewer settings for the big cloud were something like,
    upload_2020-7-8_23-9-7.png
     
    Last edited: Jul 8, 2020
    dpham likes this.
  50. dpham

    dpham

    Joined:
    Jun 6, 2015
    Posts:
    6
    Do you have any plan on having measuring tool implemented in tile viewer (v3) in the near future? can you point me to the right direction of how to do so? It's crucial for my project. Thank you.