Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Released] Point Cloud Viewer Tools

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

  1. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    733
    This great asset in action!.

     
    Last edited: Sep 7, 2016
    shurrikann and mgear like this.
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,350
    sjm-tech likes this.
  3. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,350
    v1.8 is now live
    https://www.assetstore.unity3d.com/en/#!/content/16019

    Upgrade notes:
    - Don't update if your project is already working, no critical new stuff here (because folders has been re-arranged, shaders renamed, scripts have been changed etc, so it might break your current setup,or at least have a backup ready)

    Couple new questions / comments:
    - Some user is having crash on iOS devices using point meshes (i'm unable to test on ios for now.. so if anyone else has tried this on ios let me know if it worked or not)
    - Someone asked about PS4 support, also cannot test it, so i'm guessing that its not likely to work there..
    - Some issues HBAO/SSAO plugins (points appears as if drawn on top of meshes, even when they are behind it), most other image effects work fine
     
    Last edited: Sep 22, 2016
  4. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,350
    Hi,

    Someone email about getting errors in Hololens build, like:
    Seems that hololens platform doesn't support all those same features,
    http://stackoverflow.com/questions/12641223/thread-sleep-replacement-in-net-for-windows-store

    ill update here if have more info:
    https://github.com/unitycoder/UnityPointCloudViewer/issues/25
    (probably have to remove threading code from hololens platform with these https://docs.unity3d.com/Manual/PlatformDependentCompilation.html )
     
  5. edwardrmiller

    edwardrmiller

    Joined:
    May 2, 2015
    Posts:
    8
    Just purchased the asset - thanks for all your hard work.

    Is there any way to get point size working on RGB point clouds on mobile?
     
  6. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,350
    Yes, for android I have updated the android shader in that WIP/ folder,
    If you pm or email me i'll send the file. (will be included in next update also)
     
  7. Gontz

    Gontz

    Joined:
    Oct 27, 2016
    Posts:
    11
    Hello,
    can you use Kinect 2 as input in realtime ?
    Do you plan to add this feature ?
     
  8. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,350
    Not in this version (also the kinect sample scene pretty much already has that)..
    But i did just recently purchase kinect to do some testing, so that is planned.

    Feel free to suggest what kind of kinect data input you would like to have there.
     
  9. Gontz

    Gontz

    Joined:
    Oct 27, 2016
    Posts:
    11
    I know of RF kinect plugin but his plugin is concentrated on Skeleton use. I'm looking for a solution where I have the point-cloud found in Kinect Studio. And where I have the whole stream, not clipped. And it would be great to make the point-cloud have colliders.
     
  10. Matioupi

    Matioupi

    Joined:
    Nov 15, 2016
    Posts:
    1
    Hello, i'm a new user to this asset that I bough today... I have a few questions / requests :
    - how do you display the point cloud in the edit mode ? I'm only able to see it at render time (I have a very simple scene right now with only Main Camera and @Binaryviewer to a 2.7M RGB point cloud)

    - how would you setup a very simple project to view it with Oculus CV1 ? I've not managed that particular point yet ? Would you have an example project ?

    Best regards
     
  11. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Seems to me that it would potentially be a cool thing to generate a mesh from for VR/performance/streaming purposes, with each vertex sampling the point cloud "vertex" for colour...

    /random thoughts
     
  12. cyndyjb

    cyndyjb

    Joined:
    Feb 16, 2016
    Posts:
    3
    What hippocoder said.

    I'm considering purchasing this tool at work, but I'm not sure I 'need' it. If it could do what hippocoder mentioned, I'd buy it in a heartbeat! We have a VR CAVE at my University, that is integrated with Unity for projection. I have a need to view some rendered variant of a very large point cloud in our CAVE, with the colors preserved from the point cloud. I don't really care if it's the point cloud OR a mesh that I actually display, but I do care about preserving the original point cloud colors, and I care about rendering speed, so my end user can walk through the point cloud/mesh when displayed in 3D in our CAVE. Displaying this as a point cloud with this tool sounds like it might have performance issues.

    as for the convert-to-mesh path - I am NOT a newbie to point clouds, but I am a newbie to Unity, so maybe I'm missing something; but I have not figured out how to preserve or transfer the point cloud colors to a mesh with other tools before import to Unity ( I am using Cloud Compare to create a mesh from a sub-sampled point cloud, and I caan save to .ply or .obj but neither path helps me in Unity with 'vertex colors'.)

    Any advice?
     
  13. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,350
    Hi,

    With oculus, it should just work, enable [x] VR in build settings.. Does it display it in the scene view during playmode with oculus connected?

    Viewing points without playmode, open BinaryViewerDX11.cs
    And uncomment that ExecuteInEditMode line
    Code (CSharp):
    1.     //[ExecuteInEditMode] // ** You can enable this, if you want to see DX11 cloud inside editor, without playmode **
    2.     public class BinaryViewerDX11 : MonoBehaviour
    3.     {
    *Note: It will probably cause problems if threading is enabled, so disable [x] Use Threading..

    Other option would be to temporarily convert the same cloud to meshes,
    use that while building the scene (so can see the points)..
     
  14. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,350
    Its long time since i've tried Kinect Studio, what do you mean by whole stream, not clipped?

    For colliders, got few ideas for that so will test soon'ish..
     
  15. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,350
    Just a bit confused : ) So the mesh would come from kinect,
    and the actual point cloud would be separate point cloud,
    acting as a kind of 'light probe cloud' for that kinect mesh vertices or.. ?
     
  16. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,350
    How many points you might have on those clouds?

    External tools/formats
    .dae and .fbx should have vertex colors included in the mesh. (and then of course needs some shader that displays the vertex colors).

    Probably unity doesn't support .obj files with vertex colors, since its not in the "standard" obj..(?)
    https://gamedev.stackexchange.com/q...ex-color-information-in-obj-files/66270#66270
     
  17. cyndyjb

    cyndyjb

    Joined:
    Feb 16, 2016
    Posts:
    3
    Our largest has .. 60,000,000 (!!) points. Although I can subsample down (in the case of this one, subsampling down to ~400,000 points didn't lose too much relevant info).

    The tool I am currently using to manipulate the points (in terms of subsampling and creating a mesh) is CloudCompare, which only lets me output the mesh as .ply or .obj, in terms of anything Unity would recognize. I thought I had a vertex shader from a former coworker here, but it doesn't work on my Cloud Compare exported obj or ply file in Unity.... :/

    So I did end up purchasing the point cloud viewer for Unity! Testing it out, today. I'll see what I can do with it.
     
  18. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,350
    Ok, let me know how it goes.

    For that low amount (400k), could as well use the mesh version too.
     
  19. cyndyjb

    cyndyjb

    Joined:
    Feb 16, 2016
    Posts:
    3
    Well, this is a great tool, and I'm glad I got it, I can view the .las files that I start with in color, now; so that's great! But I cannot seem to create the Unity meshes from the point cloud and preserve the colors, with the tool provided - shouldn't I be able to do so? (yes of course I selected the 'use RGB' option).

    One further question - my user (a researcher) would like to be able to view her lidar data with Unity in our 3D CAVE system. Her data is geographically related, and I'd like to provide her a number of 'scenes' where she walks through one point cloud dataset to another in the CAVE. I read something about this tool being limited to one point cloud at a time - but that's one point cloud being actively viewed at a time, correct? There should be no reason I can't put several in one project, if there is only one per scene?

    And while we are on the subject - would it be better for rendering speed in this tool, if the data is projected into a CAVE and one is moving through the data, to display the raw Lidar data or the meshes? Assuming, of course, that I can get the original colors on the mesh, as my end user requires that.

    Thanks much for your hard work in this.
     
  20. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,350
    Mesh reconstruction
    There is no surface/mesh reconstruction (although its in the wish list), but because its quite complicated matter..
    One option would be at support some open source command line tool to do that in background..
    but even still you'd have to run and tweak parameters several times to get usable results..(and should optimize the mesh also)
    (*hmm, i guess mesh reconstruction is what hippocoder meant also?)
    For that only option is currently to use external tools.. MeshLab, Catia, Recap and others,
    but i guess have to check some options if can add it to the same builtin workflow..


    Multiple point clouds
    see example scene "LoadMultipleDX11CloudsThreaded"
    or if want to do it manually, have to use separate materials for each cloud
    https://github.com/unitycoder/UnityPointCloudViewer/wiki/Viewing-Multiple-DX11-Point-Clouds

    Or if just want to have 1 cloud at a time, can call ReadPointCloud() in BinaryViewerDx11.cs to read a new cloud.


    Performance

    DX11 can display more points, but using point meshes is easier since they are normal unity assets,
    for example can load them in to scene as prefab etc. (and can easily see them in scene without playmode)
     
  21. Volkerku

    Volkerku

    Joined:
    Nov 23, 2016
    Posts:
    113
    Hi
    I have a problem with PointCloud Viewer tools which suddenly occurred after playing around with another assets (Helios and Pegasus). I work with binary xyzcolor pointcloud, and I get an error message with the material shader PointCloudColorSizeDX11 "undeclared identifier 'unity_ObjectToWorld' Compiling Vertex program".
    I can still play the scene, but the pointcloud is invisible, the shader defaults back to black color and 0 point size.
    The other shader PointCloudColorDX11 works fine.
    Can someone help please.
    thx, volker
     
  22. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,350
    Hi,

    Did you change/upgrade your unity? (which version?)
    Or maybe that .cginc file in Helios creates some conflict..

    But try opening that error shader (double click on that error message),
    and change
    _ObjectToWorld
    into
    _Object2World
     
  23. mroel

    mroel

    Joined:
    Jan 11, 2013
    Posts:
    2
    Hi mgear! I'm wondering if there's any way I could access your shader for changing the point size when running on DX11. I don't want to pay 75 for the shader only, is there any documentation on how you made it work?
     
  24. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,350
    Hi,

    Would prefer not to give too much details..since have been working on this plugin for quite a long time.
    still, you can quite easily find some solutions to that from the internets.. sorry for not being able to help much on this.
     
  25. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,350
    I have now modified version of v1.8 for Hololens (ignores those parts are previously caused compiler errors, no threading), so if someone wants to test it, email me (with order number).
     
  26. Virt_Arch

    Virt_Arch

    Joined:
    Oct 19, 2015
    Posts:
    6
    Hi mgear! I'm using the asset (version 1.7) to try and build a demo for HoloLens. I've successfully used the asset to create a binary of 139303268 points, visualised with the PointCloudSingleColorDX11 shader as it doesn't have RGB values. HoloLensTest.PNG While this is visible in the Unity Editor it is not visible when I deploy to the HoloLens. To check that the app deployed correctly I added a light source and capsule in front of the camera which do render. I also tried ramping up the alpha to 255 but this didn't seem to change anything. HoloLensTest2.jpg Points should be visible between the camera and the capsule. Can you recommend steps to enable me to visualise the pointcloud on Hololens?

    Many Thanks.
     
  27. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,350
    Hi,

    First thing to check is that does the pointcloud data file get included in the build?
    (are you able to see any log for errors that it cannot load it?)

    Could try with smaller cloud also, that is a huge amount of points..

    And then try different shaders, you could download the v1.8 version to another project
    it had the dx11 shaders with point size adjust.

    Unable to do tests without the device, and I tried to setting hololens emulator while ago,
    but got stuck for not having windows pro yet.. will eventually upgrade to that.
     
  28. FenyceAssets

    FenyceAssets

    Joined:
    Jan 10, 2014
    Posts:
    10
    Hi,
    i've just bought your asset, and this is amazing. Still trying to understand how it works.
    the only thing that would improve it a lot would be some kind of LOD on the dx11 pointclouds, so one could have different density based on the proximity of the camera.
    i've seen on youtube this video:

    for my understanding, this guy is using some kind of "streaming" technique to load on the fly the vertexes needed by the view.
    keep going with your great work, cheers
     
  29. FenyceAssets

    FenyceAssets

    Joined:
    Jan 10, 2014
    Posts:
    10
    Hi Again,
    i'm using this asset for days now, and wow, it's very powerful. Thank you again for the great work.
    Actually i'm using the pointcloud2mesh converter most of the times, because i can have bigger pointclouds (700M points), and use the LOD system.
    The main problem here is how the converter creates the submeshes. Ideally, for the LOD system to work well, all the points of a submesh should be near to each other, and now they are just sparse. The x sorting helps, especially for terrains, but is unuseful for more complex shapes that extends in all directions.
    Don't know if it's clear, i'm not speaking fluently english, so please ask if it's not understandable, or if you need some visual examples of what i mean.
    Unfortunately i'm not a developer (not good enough), but i think this could be an interesting discussion for the problem:

    http://stackoverflow.com/questions/22780094/spatial-sorting-million-points-in-3d-space
    and maybe this:
    http://www.drdobbs.com/cpp/a-template-for-the-nearest-neighbor-prob/184401449

    Thank you
     
    Last edited: Jan 14, 2017
  30. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,350
    Thanks!

    Yes understand, have planned to add more sorting/grouping options in later updates,
    also those lods could be grouped, instead of drawing each individually..
     
  31. FenyceAssets

    FenyceAssets

    Joined:
    Jan 10, 2014
    Posts:
    10
    Wow, that's great, thank you ;)
     
  32. mfleurent

    mfleurent

    Joined:
    Mar 5, 2015
    Posts:
    25
    hi, i began to use your asset and i must say it's rather impressive.

    by the way, i have rendering problem with the DX11 viewer where my world space canvas are rendered behind the point cloud.
    from what i understand, it's because Graphics.DrawProcedural is used, but i can't found a solution.

    ideas are welcome
     
  33. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,350
    Thanks, ill check whats happening.
     
  34. mfleurent

    mfleurent

    Joined:
    Mar 5, 2015
    Posts:
    25
    i think the problem is linked to the fact that in DX11 mode, points (or quad) are generated on the GPU directly with Graphics.DrawProcedural without generating mesh info, thus no zbuffer infos too.
     
  35. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,350
    Yeah got some issue there.. I do have CommandBuffer version in the works,
    and with some quick tests looks like it might fix this problem,
    but its not ready to be submitted yet.. (ill post here once its ready for testing).

    Not sure if there are good workaround for the current version though,
    perhaps stencils, 2nd camera, using opaque shader in UI, forcing rendering to different camera event pass.. but this is to be tested.
     
  36. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    I just converted a 141 Million highway scan lidar to binary format. It took a while. I thought it was stalled as the progress bar was not moving after a while. It took like 10 -15 mins. Source was LAS.

    Performance was like 1-2 fps.. ups.. dunno if this is cause of the cpu or uses GPU. I've a 1080 but i7 cpu is a bit older.

    chunking the cloud in two parts....
     
  37. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    26 Million points are handled without issues.
    Its a shame that the scan is not very clean and still need further filtering but its super cool to navigate anyways.
    upload_2017-1-27_1-31-42.png

    upload_2017-1-27_1-34-26.png

    upload_2017-1-27_1-37-45.png

    upload_2017-1-27_1-53-1.png
     

    Attached Files:

    mgear likes this.
  38. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    upload_2017-1-27_1-55-18.png
    5 images per post XD
     
  39. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,350
    Yeah its bit slow still, but in next update conversion is at least 2-3times faster.
     
  40. EntangledOthers

    EntangledOthers

    Joined:
    Nov 23, 2016
    Posts:
    10
    Anyone have an idea as to why point size seems not to be working for me in the latest release?

    I am sucessful in viewing coloured point clouds on both desktop & android (imported as unity meshes as they work best for me), but the the points remain a constant minimum no matter how large or small I adjust the ColorSize value. Any ideas what could be causing this?

    I used to be able to adjust the values (at least on desktop, I've only recently started working in parallell with android builds). Viewing etc. works perfect otherwise.
     
  41. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,350
    Hi, Which material & shader you are using?

    DX11 mode requires the dx11 pointsize shader, android version uses mesh version.
    If you are using meshes, then for desktop in DX11 mode, use PointMeshSizeDX11Quad shader.
     
  42. EntangledOthers

    EntangledOthers

    Joined:
    Nov 23, 2016
    Posts:
    10
    I've been using the non-DX11 shaders. Specifically the MeshColorPointSize one (I think that's what's it is called, away from workstation right now). The shader renders the point colours (RGB from .pts) just fine, however the ColorSize value (default is set to 200) doesn't cause any change in PointSize no matter what it is set to. I'll give the PointMeshSizeDX11Quad a try this afternoon, however, I'm guessing that won't work particularly well on android?
     
    Last edited: Jan 30, 2017
  43. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,350
    Yes, that is for dx11 only, so for android,
    first try the special android version (in Shaders/Android/ folder, AndroidColorSize),
    let me know if that works?
     
  44. EntangledOthers

    EntangledOthers

    Joined:
    Nov 23, 2016
    Posts:
    10
    Figured out a bit more, seems like unity gets stuck in DX11 mode if one isn't careful, hence the breakdown of non-DX11 shaders in terms of the size bit (I think?). Redid a project & it now works well on android with the AndroidColorSize shader (RGB values don't show in editor though, the same for point size preview, but that isn't a big deal as long as they keep working on-device :) )

    Am I understanding correctly that the mesh shaders (in terms of a desktop VR setup) won't work properly if the project is on its default DX11 mode? Or have i missed something here? I really like the ability to have LODs etc. with meshes, so going the way of a DX11 blob seems for now a little cumbersome (I might be entirely wrong here though..)

    Oh, and I absolutely love PointCloudTools!

    edit: I couldn't find PointMeshSizeDX11Quad for the life of me, where ought it be located? Update: Found it! (on github for anyone else who hasn't found the extra shaders before now) Sadly It doesn't appear to work (I.e. makes any Unity mesh clouds just ... disappear from view.
     
    Last edited: Jan 31, 2017
  45. FenyceAssets

    FenyceAssets

    Joined:
    Jan 10, 2014
    Posts:
    10
    Hi all,
    i'm really enjoing this asset, great!!
    here is a webgl pointcloud renderer that i've found today, and it is very powerful and full of features. The lod is fantastic (octree implementation i guess) and the shaders to render the points are very interesting as well.
    se here it is, hopefully useful for some inspirations:
    http://potree.org/wp/
     
  46. ranzaro

    ranzaro

    Joined:
    Aug 22, 2016
    Posts:
    6
    Hi,
    I finally managed to but this asset and it looks very promising!

    I want to use it to stream some animated point cloud in Unity but I have a problem while importing Brekel .bin file in the DX11 BinaryViewer.

    I follow the Documentation step by step, but get an error and the file doesn't load at all.
    "Binary version should have value (0) or (1). Loading cancelled"

    Any hint would be really appreciated.
    Thanks
    Matteo

    BrekelToUnity_Error.JPG
     
  47. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,350
    Thanks, I'll check, there actually might be some changes from brekel side, so will ask from them in that case.
     
  48. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    Please add distance lod that reduces point density so we can load bigger clouds
     
    FenyceAssets likes this.
  49. FenyceAssets

    FenyceAssets

    Joined:
    Jan 10, 2014
    Posts:
    10
    +1
    using some kind of tree (octree, kdtree) would be amazing :)
     
  50. ranzaro

    ranzaro

    Joined:
    Aug 22, 2016
    Posts:
    6
    Hi, any update on the Brekel .Bin support? It's still not working, unable to import Brekel .Bin files.