Search Unity

[Released] Point Cloud Viewer Tools

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

  1. smtabatabaie

    smtabatabaie

    Joined:
    May 6, 2013
    Posts:
    45
    Thanks very much, is there any way or trials I can try the asset with the solution you mentioned?
     
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,438
    no trial versions, but if you can send me small sample data set, i can check that it works.
     
    smtabatabaie likes this.
  3. smtabatabaie

    smtabatabaie

    Joined:
    May 6, 2013
    Posts:
    45
    Thanks very much , I have uploaded the bin file as you instructed here : https://we.tl/roKNIhwXIY
    I'll appreciate if you can test the file on both of the solutions you mentioned so I can use the asset.
    Thanks very much again , I appreciate your help.
     
  4. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,438
    Thanks got the file, you can remove link if needed. I'll pm you the results image/gif.
     
  5. smidling

    smidling

    Joined:
    Mar 13, 2014
    Posts:
    4
    Hello!

    I am interested in displaying .pcd file format in Unity. Can your asset do that?

    P.S. I have read the extension list and am avare that .pcd is not on that particular list, but also I am quite certain that .pcd is rather similar to .xyz file formats, so maybe your asset could do it.

    Thanks in advance for reply, I am just not comfortable spending 60eur just to try it out ;)

    Best,
    Bojan
     
  6. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,438
    Not yet possible, its high on the todo-list (since it should be simple to add *the ascii version).

    although looks like current version kind of manages to read some of it,
    tried to import this sample data as an .xyz file,
    http://pointclouds.org/documentation/tutorials/pcd_file_format.php

    and it skips most of the invalid header data, but incorrectly parses few of them as points..
    (you could manually remove the pcd header data to avoid that)
    upload_2017-6-14_11-11-37.png
     
  7. smidling

    smidling

    Joined:
    Mar 13, 2014
    Posts:
    4
    So Basically what you are saying is:
    if I skip the info part during parsing of the .pcd file, I can treat rest of it as xyz file and simply use your asset to display the data?
     
  8. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,438
    Yes, i mean the parser currently already skips bad rows, but to avoid those couple stray points,
    you could manually remove the header data from pcd file with text editor, then its same as xyz file.

    If you have sample data, can send me a download link so i can test it first also.
     
  9. smidling

    smidling

    Joined:
    Mar 13, 2014
    Posts:
    4
    How about this one.

    Also if I could trouble you to attach a screenshot?

    P.S. just remove extension .txt on the file, forum wouldnt let me post it otherwise... :/

    Thanks!
     

    Attached Files:

  10. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,438
    without modifying the header:
    Looks like Binary converter fails on that (for dx11 clouds), but mesh converter works:
    upload_2017-6-15_11-55-5.png

    if remove header, and add point count as first line manually,
    then it loads as an .CGO file to dx11 converter.

    It should be only few lines to fix this, so ill check.

    ** Actually the RGB value can be encoded differently in pcd files, so you would miss color information if its not 0-255 int values
     
    Last edited: Jun 18, 2017
  11. HITLabAUDev2

    HITLabAUDev2

    Joined:
    May 2, 2017
    Posts:
    1
    Hi, I was wondering of you could make your classes inheritance friendly please... Currently, to make changes I have to hack the original code files from your asset, what I would prefer is to inherit from them and override the particular function I want to modify. This way when you update the Asset is don't have to modify your original files (unless I'm approaching this the wrong way of course, I'm an experienced programmer but new to unity).

    For example, I want to modify the Update() function in the MeasurementManager class, but inheriting from that class and re-writing the Update() function still requires me to change some of the variables to 'protected' in your class, as they default to private and I cannot access them. Once I did that, my Inherited and modified script worked fine...

    many thanks, great work BTW, very useful
    Simon
     
    mgear likes this.
  12. justin_GE

    justin_GE

    Joined:
    Jan 10, 2017
    Posts:
    1
    I am also running into issues with this. Was there any more testing done?
     
    mfleurent likes this.
  13. mfleurent

    mfleurent

    Joined:
    Mar 5, 2015
    Posts:
    25
    yep, could be perfect timing for me too
     
    Last edited: Jul 31, 2017
  14. champ619

    champ619

    Joined:
    Aug 17, 2017
    Posts:
    2
    Cool plugin. I purchased it yesterday, but I'm having an issue using the Binary DX11 Viewer with the Oculus Rift. The point cloud is only being rendered in the left eye. If I drop a generic cube into the scene, it gets rendered to both eyes, while the cloud is only in the left.

    I saw earlier in this thread that this plugin will work with Oculus, but those posts were a couple years ago. Do you have any specific instructions for using the viewer for VR? I'm using the standard OVRCameraRig pre-fab, and Unity 5.5.1.

    Any assistance you can provide would be greatly appreciated.
     
  15. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,438
    I'm unable to test, but can you check if disabling single pass stereo is the cause?
    https://docs.unity3d.com/Manual/SinglePassStereoRendering.html
     
  16. champ619

    champ619

    Joined:
    Aug 17, 2017
    Posts:
    2
    Aha, that was it! I changed from single-pass stereo rendering to multi-pass, and now the cloud is rendered in both eyes. Doesn't seem to have taken much of a performance hit either. Frame rate looks good.

    Thanks!
     
  17. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,438
    Nice to know, i do need to fix that eventually..
     
  18. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,438
    so in the meanwhile here's one hacky workaround for the WorldSpace canvas problem,
    can use this custom UI shader to occlude point cloud, its not pretty but at least can see the ui..

    - Download from https://github.com/unitycoder/Unity...Shaders/UI-Default-With-Occlusion-Pass.shader
    - Assign to world space UI elements

    let me know if that works!

    uifix.gif *recorded at 5fps to keep gif small
     
  19. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    This is untested but.... what about a shader that has a renderqueue modified to render on top of clouds.
    Or, what about render texture canvas to a plane.

    Just ideas.
     
  20. jkurucar

    jkurucar

    Joined:
    Mar 16, 2017
    Posts:
    4
    First of all, excellent tool. It is very helpful.

    1) Any plans on support .bpf format for the point cloud (would keep me from having to convert to .las using pdal).
    2) Is there any way to extend the "Single Color" viewer so that points with lower y values (vertical) are green and points with high y values are red. That way if you are viewing something like a terrain point cloud you can get a sense of depth from mountains and values (which is difficult with current single color).

    Any thoughts or solutions on these questions are appreciated. Thanks!
     
  21. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,438
    Thanks! yeah, rendertexture would definitely work,
    renderqueue doesnt help, because it gets drawn in that OnDrawObject, seems to happen after everything.
     
  22. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,438
    1) Not likely.. since its not that popular format (and there is that converter for now). I do plan to make separate external converter tool to handles more formats, so eventually it could be there. (definitely not this year)
    2) Yes, should be simple, ill try to add that in the next update, or send me email so ill send test version before it goes to store (you'll still need to give min-max heights to the shader though, to properly set colors)
     
  23. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    The color by height is a great suggestion, Microstation has that option and it really helps understanding terrains and aerial lidar. I can paste some aerial lidar dataset links if needed for testing.
     
  24. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,438
    Yes, i could test it out.. got it working already because had some ready code for it on another project.
    Added option to use gradient texture also. (or just 2 colors in another version)
    Still need to add some easy way to get those min-max values.

    upload_2017-9-15_22-14-27.png
     
    jkurucar and TooManySugar like this.
  25. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
  26. jkurucar

    jkurucar

    Joined:
    Mar 16, 2017
    Posts:
    4
    Thank you! I'll try to find your email somewhere, I'm happy to test (and would seriously appreciate the test version).

    1) Understandable, I think a converter tool would be very popular. For another idea, and converter tool that did both format conversion (las to xyz for example) but also datum conversions (aka reprojections, both xy and vertical datum). There is lot of lidar data out there and most of it is a mess :(

    2) Thanks again; getting the min/max heights is not a problem. Those are easy to get from qt reader / pdal.

    -JK
     
  27. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,438
    looks like the file works (there is las importer for the binary converter), emailed the shaders to jkurucar already for testing.
    upload_2017-9-16_16-47-8.png


    also thanks to your 4.8gb file :eek: , had to finally add cancel button to the converter (and bit more info on point count..)
    progress.gif
     
    TooManySugar likes this.
  28. jkurucar

    jkurucar

    Joined:
    Mar 16, 2017
    Posts:
    4
    Got some testing in today and this is a great feature even with manual y min / y max entries. I especially like the texture shadder where you can set your own texture to the material. Well done.

    Here's a sort of screenshot of some data.

    Thanks, I'll continue to watch this forum. I'd be happy to test things in the future.

    -JK
     

    Attached Files:

    TooManySugar likes this.
  29. Gary_B

    Gary_B

    Joined:
    May 29, 2017
    Posts:
    21
    Hi I have recently bought this Asset and so far it has performed as expected. Thanks.

    I am having a bit of trouble getting it to work with the hololens. When I build the scene I get various errors and the project doesn't build at all, are there any particular settings needed to allow it to build?

    Thanks

    upload_2017-9-21_13-12-52.png
     
    Last edited: Sep 21, 2017
  30. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,438
    Yeah, for now, you'll need to comment out all those error lines (basically need to disable the threading with thread pools)
    And that runtimeviewerdx11.cs can be deleted, not likely that you will use that in hololens (since its slower to read files)

    *or wrap those error lines/methods away from holo platform, i think it was WSA,
    #if !UNITY_WSA
    https://docs.unity3d.com/Manual/PlatformDependentCompilation.html
     
    Gary_B likes this.
  31. Gary_B

    Gary_B

    Joined:
    May 29, 2017
    Posts:
    21
    Great thanks for your reply. I've had a bit of a play around and I think I'm better off using the Point cloud to mesh. So far this has worked fine and is better suited to my needs. I can move it around, scale & rotate it etc.

    One more question I do have is, the xyz file I have was from a pts file and so it has an Intensity value associated with it. When I try to use the PointCloud2Mesh tool with the 'read intensity' checked it fails after a short time. If I leave it unchecked it builds fine. It would be really useful if I could use the intensity value. Do you know where I might be going wrong. I've given you a sample of the xyz with intensity below and attached a screenshot of my settings:-

    332501.2045 395226.01663 11.27909 19
    332501.32497 395225.96504 11.95209 81
    332500.26261 395226.45998 11.28609 21
    332500.10714 395226.56203 11.29009 22
    332501.32601 395225.96015 11.46209 95
    332500.82144 395226.20793 11.28509 19
    332500.14544 395225.95645 11.29009 45
    332499.62573 395225.82531 11.60809 48
    332500.19293 395226.31483 11.28909 25
    332500.07494 395226.27925 11.29209 29
    332499.6298 395225.80797 11.65809 42
    332500.95628 395226.0449 11.28109 25
    332500.31993 395225.86211 11.28509 33

    upload_2017-9-21_21-34-31.png

    Thanks

    Gary
     
  32. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,438
    your file extension looks like to be .xyz, mesh converter checks file extension to process certain files differently, i should add that to documentation somewhere (or give better error message).

    let me know if renaming it to *.pts works.
     
  33. Gary_B

    Gary_B

    Joined:
    May 29, 2017
    Posts:
    21
    That's correct I converted the PTS to XYZ but kept the intensity just in case. I didn't think or expect the the cloud to mesh to read pts. I'll try later on and let you know.

    Thanks
     
    Last edited: Sep 22, 2017
  34. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,438
    Probably got the single pass shader working (at least by testing in the editor it shows for both eyes)
    can you email me, so ill send one test shader? *or someone else with oculus/vive using this plugin
     
  35. Gary_B

    Gary_B

    Joined:
    May 29, 2017
    Posts:
    21
    Hi, yes the pts file works. Thanks :)

    Last question....hopefully. Is there a way of increasing the point size of the mesh? I'm using the following shader, but the point size is making no difference in the model.

    upload_2017-9-26_10-39-21.png

    Thanks
     
  36. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,438
    In that shader point size doesnt work with DX11 mode.
    try with these materials:
    upload_2017-9-26_17-49-23.png
     
  37. Gary_B

    Gary_B

    Joined:
    May 29, 2017
    Posts:
    21
    Hi, I'm not using DX11. I've used points to mesh as I need to view it in the hololens.
    Thanks

    EDIT - I have just noticed the Point to Mesh doesn't skip the Intensity value when reading the PTS. So it's reading the 'I' as the 'R'
     
    Last edited: Sep 26, 2017
  38. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,438
    hololens, have you tested if it works in device? (in editor need to enable DX9 mode from player settings)
    upload_2017-9-27_9-14-1.png
    can also test the android shader (PointCloudAndroidSizeColorMesh.mat)


    next update has that .pts bug fixed, hopefully going to store within few weeks time,
    here's few lines to fix it before that:
    https://github.com/unitycoder/UnityPointCloudViewer/issues/30
     
  39. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,438
    just noticed, 2017.3beta with DX12, point cloud meshes are much faster! (50m points, was 27ms, now 14ms, on gtx970)
    *if someone uses the older version with meshes, on desktop, maybe dx12 helps there also.
     
    Gary_B and Beodom like this.
  40. Beodom

    Beodom

    Joined:
    Dec 14, 2016
    Posts:
    5
    Love how quick you are to reply and how useful your updates are.
    1. Did you manage to get multiple point clouds in the viewer? say a vehicle and a scene.
    2. is there a way to animate the scan(vehicle)? if not, is it something you are working on?
    3. above you were converting a 4.8GB scan, was it successful? if so how was the fps looking?
    I am using the point cloud viewer with the HTC Vive so I am interested to test out the improvements you have made since I last posted :)
     
  41. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,438
    1. Yes, there is example scene included that displays multiple clouds
    2. Animate, do you mean, having point cloud frames (like the Brekel animations?), or manually move a scan around?
    3. Yes, 141million points, if not mistaken it was pretty much 0fps in editor if had all or most of those points in view (this was in laptop gtx970m)

    I do have VR single pass shaders coming up next, would need someone to test couple of them..
    Other than that, no big changes or reasons to upgrade old versions. (other than some bug fixes)
    https://github.com/unitycoder/UnityPointCloudViewer/blob/master/ReleaseNotes/release-notes.txt
     
  42. jabaggett

    jabaggett

    Joined:
    May 15, 2017
    Posts:
    6
    Hey mgear,

    Everything has been working very well thus far, but I did run into an issue recently. Sometimes when I am using the PointCloud2Mesh tool, if I create LOD's they will not show up after the process is finished, and I am unable to find/use the LOD's. The point chunk asset shows up in the editor without the LOD's, but it does not throw any errors in the console. Any idea what is going on?
     
  43. steffanPL

    steffanPL

    Joined:
    Oct 9, 2014
    Posts:
    40
    Hi,
    quick question - I want to build iOS app built with animations from Brekel.
    Just wanted to make sure if PointCloud2Mesh works with animations from Brekel (can convert them to animated .fbx) and it will run on iPhone6s ?
    Regards and keep up with the great work !
     
    Last edited: Oct 9, 2017
  44. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,438
    ill test later this week to confirm
     
  45. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,438
    briefly tested, did see the points in scene and game windows.. are you sure they are not getting culled? (camera is too far).
    if it happens with certain data, then could email me link to that point cloud file to test.
    or maybe add here or pm me some screenshots.
     
  46. jabaggett

    jabaggett

    Joined:
    May 15, 2017
    Posts:
    6
    So what is happening is that the lod groups get added into the scene and are in the hierarchy, but the only thing that shows up in the actual assets folder is the "point chunk" asset file, which doesn't contain the lod group(shown in screenshot). This hasn't been a problem, but sometimes after I run the pointcloud2mesh tool and make lod groups, the point chunk asset files show up in the assets folder but not in the hierarchy/scene. When this happens I can't get to the lod groups that were generated, and it doesn't seem to happen to specific files as far as I can tell. Usually when I run the tool, I get the files in the assets folder and the lod's show up in the scene/hierarchy immediately.

    edit: The files I'm uploading are fairly large (~1 GB). For clarity: in short, sometimes the tool finishes and nothing is added to hierarchy.
    PointCloudTools_scrncp.PNG
     
    Last edited: Oct 9, 2017
  47. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,438
    LOD meshes missing from project folder, that is currently the expected result, they only get added to scene.

    Tested with some large files also, havent yet seen the missing from scene problem..
    Can you post screenshot of your mesh converter window? (to see the settings there)
    And which unity version you are using?
     
  48. jabaggett

    jabaggett

    Joined:
    May 15, 2017
    Posts:
    6
    I'm using Unity 5.6. Also, this has happened while creating both 2 and 3 LOD levels.
     

    Attached Files:

  49. jabaggett

    jabaggett

    Joined:
    May 15, 2017
    Posts:
    6
    I figured out what was happening! Normally when the mesh/LOD generation process finishes, the LOD's are stored in a "pointclouds" game object. What was happening to me was that they were being stored under the last game object in the hierarchy without a "pointclouds" game object being created. Not sure why, but at least now I know where to find them. I apologize for blowing up the thread.
     
  50. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,438
    nice find!
    i think what happens is that, if you don't close the converter window, it keeps reference to the original first created point clouds gameobject folder, ill check some better solution for that.. maybe use the converted point cloud name for that empty root gameobject.