Search Unity

[Released] Point Cloud Viewer Tools

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

  1. fuzzywobs1

    fuzzywobs1

    Joined:
    Feb 28, 2015
    Posts:
    6

    Hey mgear. Cheers for the info.

    I've actually already bought the plugin a few days ago and have been testing it out myself since. The results are a bit mixed in terms of performance, but it effectively does what it is meant to do so no complaints there!

    I am currently testing and trying to figure out what is the best possible experience I can get with point clouds in VR, while remaining above 50FPS. So I am testing a lot of things between using different types of scans, different amount of scans, using either the Binaryviewer or the mesh creator. Sometimes more points doesnt necessarily lead to a better experience. For example more points in Binaryviewer seems to be good in terms of quality of the model (at the expense of performance) whereas the mesh creator sometimes the more points you have, the cloud seems too dense as the point size seems very thick. Again I've yet to test all the materials/shaders etc. I noticed there is a point size option but Ive yet to test it out.

    Obviously with VR performance is the biggest hurdle. Have you any advice on what settings looks the best while performing over 50FPS?

    Regards
     
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,406
    No good solutions so far, one problem is that oculus renders the cloud twice, so that slows down already.
    1 million points still runs at around 90fps, so just have to filter the cloud to minimize points..
    (there are different types of better filters in external software like Catia, my "filter" just removes every # point, so the cloud wont look as nice)

    If its bigger area, could split it to areas and then load only that part of the cloud where player is..(although loading time is noticeable)
     
  3. fuzzywobs1

    fuzzywobs1

    Joined:
    Feb 28, 2015
    Posts:
    6
    Hi mgear. I have a bit of an emergency regarding this tool, as I have a presentation tomorrow and unfortunately the PointCloud tool has stopped working for me, even in new projects!

    I am trying to convert a .pts or .asc file to a unity mesh and for some reason the converter has stopped working. When I click convert, it asks me for the "Mesh assets output folder and basename" but doesn't let me select where to save it to start the conversion. I just get this window that doesnt let me save it no matter where i try and no matter what name i give it. http://i.imgur.com/Vaghug3.png

    Any ideas on how to solve this? It was working fine before and worked a charm but no, even when I create a new project I get the same error. I redownloaded the tool and reimported and I have the same issue.

    I would appreciate if you could help with this, as I am presenting some of these models tomorrow!

    If you prefer skype to im/chat my username is: fuzzywobs.

    Thanks!
     
  4. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,406
    That does sound strange, which unity version?

    Try:
    - Manually create some folder there like "output"
    - Start mesh conversion
    - Select that "output" folder double click it
    - Enter filename (without any dots), like "chunk"

    *In your screenshot there is "PointChunk.all Files", i think the ".All Files" breaks it
    (*yeah tested, cannot press enter to select, if ".All files" is in the filename)
     
  5. fuzzywobs1

    fuzzywobs1

    Joined:
    Feb 28, 2015
    Posts:
    6
    Unity 5.2.1.

    I've tried renaming it and having it in new and different folders which hasn't changed anything. It automatically has ".All Files" by default in the name. Even when I remove that from the name I still can't save/convert.

    * Edit: Reinstalled 5.1.3 and all seems back to normal. Panic averted!
     
    Last edited: Sep 30, 2015
    mgear likes this.
  6. zacharymccauley

    zacharymccauley

    Joined:
    Oct 4, 2015
    Posts:
    3
    This may be a dumb question as the file formats are listed, but I'm still fumbling my way around Unity. Would this extension be suitable to work with and import point clouds created in photogrammetry software such as PhotoScanPro or Visual SFM?
     
  7. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,406
    Yes, should be able to display the points, if the format is correct.
    (PhotoScan seems to list xyz, ply, las formats, so could try those)

    If you want, can send me a sample cloud file so I can test loading it.
     
  8. zacharymccauley

    zacharymccauley

    Joined:
    Oct 4, 2015
    Posts:
    3
    Thanks for the quick response! I've attached a sample PLY file from PhotoScan.

    One more clarification, through reading the documentation on the asset page, it seems like Mac machines cause some visualization issues by not having DX11, thus killing that feature. Since I am working on an iMac, I assume that functionality will be unusable for me since I don't have that hardware. This being the case, would you suggest I install this and work on the Mac OS or Windows? I'm curious if there would be a better performance from one OS or the other.

    https://www.dropbox.com/s/a5bu7b3l1t1ju7g/richardson_low_dense.ply?dl=0
     
  9. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,406
    Yes, I wouldnt recommend this for Mac users, although you can still use the Mesh version (doesnt require dx11).
    But mesh version cannot archieve high point counts, probably few million points is still ok.
    As each mesh has 65k points, so soon you have too many game objects (non batching).

    The sample file was in binary ply, so had to convert into ascii ply first (with mesh lab),
    then it works fine (attached images).
     

    Attached Files:

  10. zacharymccauley

    zacharymccauley

    Joined:
    Oct 4, 2015
    Posts:
    3
    Awesome! Thanks so much for your help with this. I really appreciate it!
     
  11. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,406
    Ok, just got this also with 5.2.1p3, here is fix for it (will be added for next update)

    Open file PointCloud2MeshConverter.cs
    // FIND LINE
    Code (CSharp):
    1. savePath = EditorUtility.SaveFilePanelInProject(“Mesh assets output folder & basename”,”PointChunk”,””,”Set base filename”);
    // REPLACE WITH (added file extension .asset)
    Code (CSharp):
    1. savePath = EditorUtility.SaveFilePanelInProject(“Mesh assets output folder & basename”,”PointChunk”,”asset”,”Set base filename”);
     
  12. eXntrc

    eXntrc

    Joined:
    Jan 12, 2015
    Posts:
    21
    Does this plugin have any capabilities around aligning related point clouds? This is usually referred to as registration, alignment or ICP (iterative closest point).

    Thanks
     
  13. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,406
    No its only for viewing, registration has to be done with external tools (also its better to do filtering in proper tools also)
     
  14. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,406
    Currently supported import formats:
    - XYZ, XYZRGB, CGO, ASC, CATIA ASC, PLY (ascii), LAS (binary), PTS

    So would have to convert to one of those formats..

    Intensity and Normals can be read for PointCloud2Mesh conversion, adding those to DX11 viewer if there is need.

    Adding PTX importer shouldnt be difficult since it looks rather simple ascii format.. adding to wish list.
     
    LaneFox likes this.
  15. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,406
    Did some stress tests converting 3.8gb LAS to binary,
    and then viewed in editor (152million points, XYZ only no RGB).. ~2fps on laptop (gtx970m)


    Also v1.7 was submitted to store yesterday:

    – Added: PointCloud2Mesh now has basic LOD mesh generation (with adjustable LOD amount)
    – Added: Link for custom PointMeshSizeDX11 shaders (can adjust point size for mesh points in DX11 mode, since point size is not supported in DX11) *See Materials/Shaders/Extras-folder)

    – Fixed: Unity5.2 or later couldn't set output filename in save dialog
    – Fixed: CloudCompare PLY file had extra comment in header, it gets correctly skipped now

    – Note: LOD meshes are not saved to project folder, they currently live in the scene only
    – Note: Optimize Points & Decimate points are not supported with Brekel PointCloud2Binary importer
    – Known issues: Optimize Points does not work properly, loses precision in some cases
     
  16. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,406
    Last edited: Dec 9, 2015
  17. nawash

    nawash

    Joined:
    Jan 29, 2010
    Posts:
    166
    Hi,
    The plugin seems nice and I do appreciate that you update it very frequently.
    I'm not banging my head on the walls yet, but I must admit that my head is getting closer to the walls...

    Here is the process:
    I can receive data into 2 forms : .RCP/.RCS or .fls.

    I need to get normal into Unity but can't figure out which format (among the supported CGO, ASC, CATIA ASC, PLY (ASC), Brekel Binary, LAS, PTS) supoprts normals from RCP/.RCS or .fls .
    Can you bring some lights on that matter please ?

    Would be great if you can help.

    Thanks.
     
  18. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,406
    Currently only PLY importer supports normals (PointCloud2Mesh),
    so first you need to convert to that.

    MeshLab can help when saving to PLY(ascii) with normals, but it wont open rcp/fls, export them to PTS/XYZ/ASC first.
    • mesh lab imports:PLY, STL, OFF, OBJ, 3DS, COLLADA, PTX, V3D, PTS, APTS, XYZ, GTS, TRI, ASC, X3D, X3DV, VRML, ALN
     
  19. nawash

    nawash

    Joined:
    Jan 29, 2010
    Posts:
    166
    Fantastic!!
    Thanks.
    You have no idea what a relief it is.

    Do you plan supporting the 'flags' int that Meshlab can export in an PLY file ?
    This could be great for pointcloud vertices segmentation.
     
  20. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,406
    I think i've never seen or used or those flag datas in ply files..

    if you have sample file that i could check, send me a link where to download it (or some ply example files on the web that has those)

    And inside unity, should it split meshes based on the flags or just write the flag value to some vertex attribute?
     
  21. nawash

    nawash

    Joined:
    Jan 29, 2010
    Posts:
    166
    The sample I've used is just an ply export from a pointcloud from Meshlab checking the "flag" checkbox.
    All the "flag" value are set to 16.
    The header varies according to what you check when exporting.
    The header is:

    ply
    format ascii 1.0
    comment VCGLIB generated
    element vertex 823226
    property float x
    property float y
    property float z
    property float nx
    property float ny
    property float nz
    property int flags
    property uchar red
    property uchar green
    property uchar blue
    property uchar alpha
    property float quality
    property float radius
    element face 0
    property list uchar int vertex_indices
    end_header

    Yes, in Unity the meshes would be split according to this flag and may be, assign the transform layer using that mesh with the flag value. (Tell me if I'm not clear :) 1AM here, feeling tired)
    This way, using the transform layer we could hide/show/select transform according to the 'flags'/segmentation value.
     
  22. Mr Tony

    Mr Tony

    Joined:
    Dec 21, 2015
    Posts:
    3
    Hello, first of all thank you, I want to buy it,

    But, I want to know how he works? First with my point cloud to unity? When my point cloud is *.Xyz,unity is support?

    Im is a unity beginner, Im download your *.Apk , but app can't touch it on my phone.

    im need your help,very thankyou
     
  23. mgear

    mgear

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

    Workflow is like this:
    - Copy point cloud file to unity project (for example Assets/YourFolder)
    - Use PointCloud2Mesh converter to create unity point meshes from the point cloud (not surface reconstruction, just points as mesh)
    - OR use PointCloud2Binary converter to convert point cloud file to custom binary format, which can be then viewed with DX11 point cloud viewer

    APK demo
    - its quite heavy 2.5million points or so, i should update it to lighter version.. does it run at all or cannot move?
     
  24. Mr Tony

    Mr Tony

    Joined:
    Dec 21, 2015
    Posts:
    3
    Thank you for your help. Forgive me my English and unity is very bad
    yes, apk demo is not move, Also PointCloud2Mesh is in the(Point Cloud Viewer and Tools)?Where is it ?This is what I don't understand.
    thank you again . Waiting for your answer .
     
  25. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,406
    Can start from the menu: Window / PointCloudViewer / Convert PointCloud to Unity meshes
     
  26. Mr Tony

    Mr Tony

    Joined:
    Dec 21, 2015
    Posts:
    3
    oh thank you ,I know ..~
     
  27. cherbini

    cherbini

    Joined:
    Dec 21, 2015
    Posts:
    2
    Nice tools so far! Very easy for a n00b.

    I'm trying to get this cloud to show up RGB but I'm having a hard time. Does it have the right data?

    https://goo.gl/rifYCU

    Thank you!
     
  28. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,406
    Downloading..i'll test it.

    Seems to work,
    if you use DX11 viewer, remember to assign "PointCloudColorsDX11" as the material in DX11 viewer. (and of course have [x] read RGB enabled on conversion)
     
    Last edited: Dec 24, 2015
  29. cherbini

    cherbini

    Joined:
    Dec 21, 2015
    Posts:
    2
    Awesome. I'll double check the material. Was just getting magenta points. Thanks for checking!
     
  30. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,406
    Magenta means shader error/not supported, check:
    - Are you in DX11 mode? In unity title bar should have text "<DX11>"
    - DX11 mode works only on PC (with graphic card that supports dx11)
    - You can test the mesh version instead, that works without DX11, "Window / PointCloudViewer / Convert PointCloud to Unity meshes"
    - Any error messages or warnings in console?
     
  31. tonytseismart

    tonytseismart

    Joined:
    Jan 21, 2016
    Posts:
    1
    After I downloaded the plug-in, I found the user manual which come with the plug-in is pretty bad and it doesn't mention how to 'view the point cloud file'.
    Anyway, it seems that the concept is: to convert the point cloud file as a .bin format; then use the binaryviewer to display the converted bin file.
    Basically, the user manual needs to explain the basic flow of using this plug-in and describe main components such as the point cloud loader and viewers. What is the different of BinaryViewerDX11 and WebplayerViewerDX11? And how / what situation to apply them???
    Inside Assets>PointCloudTools>Examples, I found some of useful senses which are scene-mobil_heavy01 and scene_meshPointPush. How can I do it by using this plug-in?
     
  32. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,406
    Yeah, documentation is still lacking behind, currently only tutorial is the old one in page 7..

    Yes, basic idea is to use converter (either pointcloud2binary or pointcloud2mesh),
    and then you can view the point cloud data with the binary viewer or use the generated meshes.

    BinaryViewerDX11 is the main viewer (to view data converted from points cloud to binary file and it requires DX11)
    And webplayerViewerDX11 is just example scene to load the binary file inside webplayer (instead of using File.IO)

    MobileHeavy and meshpointpush(this is just example scene for custom shader to move the points)
    scenes can be created with the PointCloud2Mesh converter, point cloud data is converted to meshes (doesnt require DX11)
     
  33. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,406
  34. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,406
    Last edited: May 18, 2016
  35. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,406
    So looks like the 24hr sale for this asset will be on 6th July!
     
  36. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,406
    Here is info how to load multiple point clouds,
    https://github.com/unitycoder/UnityPointCloudViewer/wiki/Viewing-Multiple-DX11-Point-Clouds
    (will be added as an option later, so no need to duplicate the loader object..but for now it needs that)


    And just copying this message from the new-old forum by @TooManySugar

     
  37. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    Hi mgear,
    this tool seem fantastic.
    It's just what i'm looking for... it is now in my Wish List;).

    My purpose is to find a way to enable my clients to measure with ease some pointclouds data and also do small mesh prototyping snapping to points.

    Max
     
  38. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,406
    thanks :)

    Also if you have data that you'd like to test first, can email me the download link, so ill test viewing it with the plugin.
     
    sjm-tech likes this.
  39. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    thanks ...would be fantastic...
     
  40. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    Just bought...awesome tool!
     
  41. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,406
    Thanks! Feel free to post requests/feedback to make it better and easier to use.

    One coming feature in next update is batch conversion,
    so can convert whole folder of point clouds, instead of doing it 1 by 1 like now..
     
    sjm-tech likes this.
  42. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    Nice, very useful!

    My wishes:
    - run-time cloud loading (already in your todo list)
    - native Directx11 point size control ...best if based on camera distance (already in your todo list)
    - add Quadtrees and Octrees data structure to optimize performance or something to split the clouds into grid to make the lod and the culling more efficient.
    - add few measuring tool. (mmm d11? )
     
  43. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,406
    TooManySugar and sjm-tech like this.
  44. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    Wow, I can't wait to try it!

    Edit: point picking too! ;)
     
    Last edited: Jul 23, 2016
  45. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    D11 point size shader works very well!

    insta001.gif


    Only an issue on Linear color space the cloud is too bright.

    D11 - Deferred - Gamma
    D11-Deferred - Gamma.jpg

    DX11 - Deferred Linear
    D11 - Deferred - Linear.jpg
     
    Last edited: Jul 26, 2016
    TooManySugar likes this.
  46. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,406
    sjm-tech likes this.
  47. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    Thanks! Now is perfect!
     
  48. Hermonirr

    Hermonirr

    Joined:
    Dec 23, 2013
    Posts:
    56
    Hi,

    I need to create a point cloud viewer that shows point clouds stored on a remote server.
    Since we're talking huge files (~5GB) is there a way to display streamed content? Get the points and display them while downloading?

    Thanx.
     
  49. mgear

    mgear

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

    Not possible in this plugin.. also large amount of points would kill framerate.

    Although with some custom scripting (separate thread to stream in the data, then feed data into DX11 viewer point array)
    then you could stream in points and replace existing points with the loaded ones,
    or stream in a new cloud, and discard the old later..

    Or do you mean it would stream points based on your location (do you have server software that can return those points ifyou give it player coordinates?), or just stream (download) all the points from remote server?
     
  50. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    yes...some streaming process could be useful also in local for big cloud datasets.