Search Unity

[Released] Point Cloud Viewer Tools

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

  1. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    ill check!

    *Is it some specific shader that gives the error, i didnt notice any errors on import at least..
     
    Last edited: Apr 26, 2018
  2. EntangledOthers

    EntangledOthers

    Joined:
    Nov 23, 2016
    Posts:
    10
    Thanks for checking!

    The shaders I got an error with are the following: MeshPointSizeDX11Quad, MeshPointSizeDX11QuadOffset, MeshPointSizeDX11Tri, MeshPointSizeDX11TriBillBoardOffset, MeshPointSizeDX11TriOffset, PointCloudColorSizeDX11 & PointCloudColorSizeLinearDX11.

    (I may very well have done something wrong importing them, shaders aren't my strongest side)
     
  3. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    oh i see, those are probably the old extra shaders downloaded using the link? (ill remove the link in next update, as its not needed anymore)

    you should be able to use the already included shaders in the project, the shaders inside "DX11_Mesh" folder, and their material is below that, let me know if that works. (and delete the extra shaders you had downloaded)
     
  4. EntangledOthers

    EntangledOthers

    Joined:
    Nov 23, 2016
    Posts:
    10
    Ah, that explains it, thanks! Pardon the hiccup there, just a quick additional question: these DX11 mesh shaders, they all seem to behave a little different from the other none-DX11 shaders: the position of the visible point cloud is offset a good way from its origin and for some reason is suddenly only visible from certain angles? (I'm guessing this might have something to do with the normal direction? however I prefer (and rather need) that the points are visible from all directions akin to the androidcolorsize shader or similar) Is this fixable either in point cloud or in the shader?
     
  5. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    can you email/pm me unity package where the mesh clouds are wrongly offset or disappears, i can have a look. (or gif/video clip), or your original point cloud data, with some info/steps how you converted it.

    are you viewing this in editor or in vr? (not all shaders are modified to support vr yet)
    also when converting to meshes, are you using the [x] auto-offset near 0,0,0? (this should be usually enabled)
    also, if your point cloud data doesnt have normals, then cannot use the shaders that require it.
     
  6. EntangledOthers

    EntangledOthers

    Joined:
    Nov 23, 2016
    Posts:
    10
    Thanks very much! I'll PM you a link shortly (this is in editor, VR isn't planned just yet) .
     
  7. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    Our last project using this awesome tool! ;)

     
    mgear likes this.
  8. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    Super cool. So you're using latest shaders right? with fog and lighting support.

    Is the data loaded as you go?
     
  9. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    I'm using a beta version with some addition, i think, not yet available in the official asset.The shader is a DX11 unlit shader with fog support.
    I added only some little modification and a simple trigger system to optimize the clouds visualization (many segments of clouds but max two at the same time).
     
    Last edited: May 4, 2018
  10. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    Cool

    Here something I was working on. Sadly I've given up on this project.

     
    Dover8, mgear and sjm-tech like this.
  11. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    734
    Wow ... super cool! :)
     
  12. IsDon

    IsDon

    Joined:
    Feb 27, 2015
    Posts:
    35
    Loving this toolset for PointClouds in Unity. Couple of requests:

    Could the Import Settings - (Convert to Binary/Mesh windows) be saved per project, so I don't need to reselect PTS format, No Scaling, Manual Offset with each file?
    and,
    Would it be possible (not too much work for you) to have a folder processed in one go? Allow a folder or list to be dropped on the Source File position and go through all files in that folder, outputting to another selected folder with the same names just extension of .bin?
    (edit: Folder processing appears added in 1.8 patch notes which i've just read, thankyou!)

    Thanks again, and looking forward to the improvements you've flagged that you're working on (dynamic cloud reduction and AA in particular will be amazing)

    Don
    have a great day
     
    Last edited: May 15, 2018
  13. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    thanks! yeah, that should be easily doable with EditorPrefs, ill try to add in the next or next-next update.
     
  14. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    this .LAS problem is fixed in the next update. (email/pm if you need the fix earlier, just needed to change few lines)
     
    glenneroo, sjm-tech and TooManySugar like this.
  15. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    cool, now that you're messing with the importer. Notice that for the manual shifts I used to enter them positive while in other softwares XZ was negative.

    Also I noticed that in LAS vs LIDAR the XYZ shifts needed to be swaped as if for a las file it was like:
    550054.4 362 4763897

    XYZRGB was
    550054.4 4763897 362

    Also a little helper script would be cool for when you use mesh clouds to swap the shader on all renderers. As if you whant to swap the shader afterwars it would be almost imposible due to many pieces and many lods on each. May be the root obj of the mesh could come with it attached by default and have a button with "apply material" like caption. Also when generating mesh lods being able to update all lod params at bulk would be handy.

    notice: I'm not using the plugin atm but theese are things I found while using it.
     
    mgear likes this.
  16. godspd

    godspd

    Joined:
    May 11, 2018
    Posts:
    2
  17. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    Hi, i updated the page to add basic steps for viewing that .bin file
     
  18. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    preview from the new point picking tool (for taking measurements or just getting selected point position)
    - replaces old, slow octree system (octree initial processing time with 50m points=61900ms, with new system=5100ms)
    - picks the nearest point (instead of picking through point 'walls')

    [image with 50million random points]
    pointpick-50m-points.gif
     
    Last edited: Jun 12, 2018
    sjm-tech likes this.
  19. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    Heads up for anyone following this thread and thinking about buying this plugin,
    i have some big updates and new features coming up in the next releases,
    so most likely will increase the price to 100-150usd range. (gradually or in one go, depending how many features get in)

    *(existing users still get free updates, its not upgrade-package, just price change)
     
    IsDon, sjm-tech and EntangledOthers like this.
  20. BoSALL

    BoSALL

    Joined:
    Apr 19, 2015
    Posts:
    4
    what about recap rcp ... can I use this format in point cloudviewer Tools ?
     
  21. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    not supported, but if they have released the file format structure, i could have a look (but i think its not available?)

    so have to export to some of the supported formats from recap, like .pts
     
  22. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    finally going some cleaning up and updating release notes,
    so getting ready to submit this biggest update (hopefully) in the coming weeks.
     
    sjm-tech and EntangledOthers like this.
  23. TritecVR

    TritecVR

    Joined:
    Dec 6, 2017
    Posts:
    1
    Has anyone worked with a large complex scan in recap through to VR (SteamVR) and cares to share a workflow? Looking for a relatively simple workflow to utilise our in-house VR toolkit. This plugin seems to do some of the work but I can't get the point clouds import into Unity using .pts to .bin. It happily creates meshes from the same pts though.
     
  24. Beodom

    Beodom

    Joined:
    Dec 14, 2016
    Posts:
    5
    I don't have a "relatively simple" workflow.
    • Export from SCENE as pts
    • Import pts into Geomagic
    • Export from Geomagic as ply
    • Import ply into MeshLab
    • Export from MeshLab as ply (Uncheck Binary)
    • In Unity, convert to binary.
    I did it recently with an rcs in the same process I just didnt write down at which step.
    While my workflow may seem convoluted and time consuming, it's the only guaranteed way I have right now. I believe I had success with las files as well.
     
  25. Beodom

    Beodom

    Joined:
    Dec 14, 2016
    Posts:
    5
    @mgear I'm still using this on 2017.3, is it compatable with the latest unity version?
     
  26. IsDon

    IsDon

    Joined:
    Feb 27, 2015
    Posts:
    35
    I use Recap Pro Exports and convert with the plugin in Unity - I found adding a second line to the ascii file with 0 0 0 allows for more consistent offset when pulling in multiple pointclouds - you might find it worth trying for other purposes as well.

    File contains a first line of number of points, then a series of XYZ RGB rows (6 figures in each row, maybe intensity too making 7) and I just insert a row of "0 0 0" in after the count of points to give a global offset origin.

    Don
    have a great day
     
  27. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    oh i see.. yes, otherwise it would use the first points position for offset (which is probably different in each cloud).

    in the next update i've adjusted/fixed that manual offset bit more,
    so i'm thinking it should work better when trying to align multiple clouds.
    (to properly give same offset for each conversion)
     
    IsDon likes this.
  28. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    yes, should work (i've briefly tested on 2017.x and 2018.x versions), but haven't tried with HDRP/LWRP yet though..

    *unlit shaders are supposed to work in those pipelines, tested few in 2018+hdrp and it works.
    Only issue is that most shaders do not have linear color calculations, so it looks overly bright. ill fix that soon.

    ** oh, noticed that there are some issues after all, mesh shaders work, not dx11 so far.
     
    Last edited: Sep 28, 2018
  29. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    almost there for the update..:D

    preview of improved point cloud collisions (gif recorded using 8fps capture..so not very smooth)
    pointcloud-collisions.gif
     
    sjm-tech and TooManySugar like this.
  30. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    Its cool but may be it would be more efficient to have a collision mesh without mesh renderer or create a collision msh from the cloud in unity or something like that.
     
  31. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    yeah, definitely better to reconstruct mesh outside unity and use that as a mesh collider to get proper collisions.
    this is more of a side-product from the new point picking system. (so the box kind of does point picking to check collisions within its bounds)
     
    IsDon and TooManySugar like this.
  32. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    upload_2018-11-2_21-30-55.png

    while waiting, heres release notes for this update 2.0
    https://github.com/unitycoder/UnityPointCloudViewer/blob/master/ReleaseNotes/release-notes.txt

    *Upgrade notes:
    Since the whole folder structure has been changed and many files renamed,
    you should probably completely delete old plugin (pointcloudtools folder) first.
    (And always make a backup first or use version control, before importing this new package).


    Few highlights from this update

    - Supports commandbuffer drawing (and can force drawing to depth, to use image effects that require depth buffer)
    - Last minute feature, [x] Pack Colors toggle in PointCloudViewerDX11. (50 million rgb points on laptop, cpu main stats went down from 120ms to 74ms) *but only one billboard shader supports this for now, more to follow
    - Much faster point picking (and supports multiple clouds, also now its easier to have multiple viewers in same scene, no more static vars/singletons on the viewer)


    And some of the next planned steps are
    - Upload with 2017.4.f1 (this current update was latest update for 5.x)
    - Cleanup/combine shaders (currently its bit messy.. will be combined into few "uber" shaders with feature toggles)
    - Add multithreading to runtimeviewer
    - check more into hdrp/lwrp (currently dx11 viewer doesnt support it)
     
    Last edited: Nov 2, 2018
    IsDon, LaserSaber and sjm-tech like this.
  33. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    IsDon and sjm-tech like this.
  34. StarCoop

    StarCoop

    Joined:
    Nov 26, 2016
    Posts:
    44
    Hi there,

    could you tell me if the asset works in runtime as well?
    That means, if I create a Windows standalone with your tool, can I load point cloud data and convert it to a Unity mesh/GameObject at runtime?
     
  35. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    yes can, runtime version uses the DX11 cloud (no runtime mesh converter yet, that would be possible too),
    so it just parses those supported files on the fly (instead of you going the conversion in editor).
    runtime viewer formats: https://github.com/unitycoder/UnityPointCloudViewer/wiki/Import-Formats


    actually that reminds me, should add [x] cache cloud option for runtimeviewer,
    so that it saves it into .bin file, to read it faster next time.

    *added to list https://github.com/unitycoder/UnityPointCloudViewer/issues/51
     
  36. StarCoop

    StarCoop

    Joined:
    Nov 26, 2016
    Posts:
    44
    Hey,

    thanks for the really quick answer!
    As we'd use it for architectural purposes, saving to .bin for quick reading next time would be awesome.
    I think we don't need to convert to a Unity mesh atm. Is the DX11 cloud viewer actually faster in this case?
     
  37. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    just tested 25m points to meshes (split to 1m per mesh) was actually bit faster than DX11 (22ms vs 28ms, althought bit different shader on those).

    and using meshes would have some advantages, like easier to draw on depth buffer (if need that for post processing effects), they are regular gameobjects, so you can access them easily to turn on/off etc.

    *also just tried enabling depth on those Mesh/ shaders, and it works.. ill add it for next update
    https://github.com/unitycoder/UnityPointCloudViewer/issues/52
     
  38. StarCoop

    StarCoop

    Joined:
    Nov 26, 2016
    Posts:
    44
    Awesome.
    Just turns out that we also would be interested in meshes from point clouds at runtime, because me want to try our tool on the new (fast) iPad Pro. And there's no DX11 apparently.
     
  39. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    ok, ill add runtime mesh converter there next.
    (once it works, will post here and here https://github.com/unitycoder/UnityPointCloudViewer/issues/53 )
     
    sjm-tech likes this.
  40. IsDon

    IsDon

    Joined:
    Feb 27, 2015
    Posts:
    35
    It would also be good to enable saving a randomised cloud to bin, even if it was .dat already, as a near-billion points file set becomes a bit slow to load when randomising on load...
     
  41. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    yeah, eventually i'd like to add it inside converter, but since it currently outputs directly into file,
    cannot randomize there (until change it to read into array first)..

    i can add caching option for the .bin file also:
    https://github.com/unitycoder/UnityPointCloudViewer/issues/55
     
  42. IsDon

    IsDon

    Joined:
    Feb 27, 2015
    Posts:
    35
    Sounds good - I'd be happy with it outputting 2 files, one with a suffix "_rand[.bin]" if the option was checked - is that pretty much what you mean by a caching option?
     
  43. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    yes exactly, and should be easy to add, pm me if you want test version early. (probably working on in this coming weekend)
     
  44. flutes

    flutes

    Joined:
    Jun 16, 2017
    Posts:
    7
    Hello,
    I use your asset recently, and I particularly appreciate the fact of being able to generate several LOD. What annoys me on the other hand is the fact of being able to cut each meshes on the X axis (or Y or Z by changing the code).
    (I still try to edit the code, but I have the impression that there are some issues related to the indexArray). I saw one of your comments in the code possibly announcing a possible feature to cut the Meshes in a grid.

    Do you plan to integrate this feature in the future?
    Or did people manage to implement this feature?

    Thank you, and sorry for this approximate 'google English'.

    P.S. : Happy new year !
     
  45. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    Yes, i would have to redo the mesh lod system, as its not really useful currently..
    After i finish and submit the next update i can have a look into that.

    I dont think there is easy fix for the current version.. but could try modifying the loop after comment:
    // process all point data into meshes

    so that it collects vertices for your list of grid cells (maybe custom struct),
    then call buildmeshes for those vertices on each cell list.
     
  46. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    did some test with the old performance tester, *this is 2 years old build, so it doesn't have the latest updates.

    *Note: Screen refresh rate affects maximum fps. (some values are capped)

    1024x768 full screen, fastest, 50m points

    GTX 970m (laptop) + i7-4720HQ 2.60ghz: 16 fps
    Quadro P4000 + xeon w-2135 3.70ghz (desktop) : 37 fps
    msi GTX1070 ti + i5-9600k 3.70ghz (desktop) : 53 fps
    GTX 1080 + xeon w-2135 3.70ghz (desktop) : 55 fps
    Titan Xp + xeon E5-1650 v3 3.50ghz (desktop) : 75 fps
    Nvidia RTX 2080 ti, i9-9900k 3.60GHZ (desktop) : 60 fps
    Nvidia RTX 3070, i9-9900k 3.60GHZ (desktop) : 60 fps
    Nvidia RTX 3090, i9-9900k 3.60GHZ (desktop) : 95 fps
    i7-13700KF, MSI GEFORCE RTX 4070 VENTUS 2X 12G OC (desktop): 153fps

    1024x768 full screen, fastest, 100m points
    Nvidia RTX 3070, i9-9900k 3.60GHZ (desktop) : 32 fps
    Nvidia RTX 3090, i9-9900k 3.60GHZ (desktop) : 49 fps
    i7-13700KF, MSI GEFORCE RTX 4070 VENTUS 2X 12G OC (desktop): 81fps
     
    Last edited: Dec 1, 2023
    sjm-tech likes this.
  47. WbmCanada

    WbmCanada

    Joined:
    Oct 12, 2018
    Posts:
    4
    Hi There,

    I know that this question is asked before somehow (in 2015), but is there any way to use this plugin for real-time data? I want to process my lidar and imu data and create 3d point cloud on the fly and visualize them in Unity in real-time.

    Thanks
     
  48. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    With the asset store version, you would have to supply the vector3 data yourself from your source.
    related example scene is the your-own-data.scene, which fills the array with random points,
    so instead of giving random points, you would feed in the actual lidar or other data.

    I have separate version that supports Velodyne lidar files and also realtime streaming data, but that is specific to their format.

    what kind of lidar data you have?
    and if you can send me a sample file and specs, i can have a look and say if its easy or hard to add.
     
    IsDon likes this.
  49. WbmCanada

    WbmCanada

    Joined:
    Oct 12, 2018
    Posts:
    4
    That's great! I am using Sick TIM lidar (2D) and trying to use IMU to get the 3D point cloud (still struggling!), for sure I can send you sample file of either lidar data or processed data, would you please advise me a good way to send them?
     
  50. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    you can send link to dropbox with private message or email.
    or if you know some sample files online can link into those.

    looking at this, it certainly should be possible to make a plugin to read it in realtime.. but ill check more with the file.
    https://www.sick.com/media/docs/3/3...TiM57x_Ranging_Laser_Scanner_en_IM0053133.PDF
     
    WbmCanada likes this.