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,441
    Tested with the latest brekel export and v1.8 point cloud viewer, seems to work..

    Are you are using the older version v1.7 perhaps?
     
  2. ikuohololab

    ikuohololab

    Joined:
    Jan 13, 2017
    Posts:
    4
    Hi I just got Point Cloud Viewer Tools today.

    And tried to load Brekel.BIN, too.
    But I cannot load neither...
    Did Ranzaro solved this problem ?

    I am using,
    CPViewerTools is V1.8 (latest?)
    Brekel Point Cloud Pro V2.41 (Latest version)





     
  3. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,441
    Can you send me the .bin file? (pm or email download link)

    (I tested from brekel v2.39 and v1.8 latest in store)
     
  4. jacktsai526

    jacktsai526

    Joined:
    Dec 19, 2015
    Posts:
    1
    Hi I also have the same question how to do animation function for point cloud file?

    I use Brekel Pro 2.39 and import its official sample data file:
    http://brekel.com/brekel-pro-pointcloud-v2/pro-pointcloud-2-download-trial-buy/
    (please download "Example Files", and import Color.bpc into Brekel Pro)
    then check "UnityCoder Point Cloud Binary" to output, I got the Color.bin as output file.

    then I switched to your Unity sample project and open the "BinaryViewerDX11" scene.
    I clicked the gameobject "@BinaryViewer" in hierarchy tab, then changed the content of "Base Folder" and "File Name" in Inspector tab, and also checked "Is Animated"

    and the debug log show the following error:

    Reading pointcloud file: C:/Users/Jack/Documents/Unity Projects/PCviewer/Assets/Data/new3/Color.bin
    UnityEngine.Debug:Log(Object, Object)

    Reading Animated Point Clouds in Separate thread is not supported
    UnityEngine.Debug:Log(Object)

    NullReferenceException: Object reference not set to an instance of an object
    unitycodercom_PointCloudBinaryViewer.BinaryViewerDX11.Update () (at Assets/PointCloudTools/PointCloudBinaryViewerDX11/Scripts/BinaryViewerDX11.cs:131)


    and the line 131 in BinaryViewerDX11.cs is:
    System.Array.Copy(hugePointArray, hugeOffset[currentFrame], points, 0, numberOfPointsPerFrame[currentFrame]);



    I would like to figure out how to use animation function in Point Cloud Viewer, Is there anything I did wrong for point cloud animation?

    Thanks!
     
  5. ikuohololab

    ikuohololab

    Joined:
    Jan 13, 2017
    Posts:
    4
    Thanks for your quick reply,




    Thank you for your support !
     
    Last edited by a moderator: Mar 4, 2017
  6. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,441
    Aha - founded it, PointCloud2Mesh converter does work, but if you try to load in binaryviewerdx11 it gives errors.
    Should be simple fix, ill post here once its working (probably during this weekend).

    Also note: update to latest brekel 2.41 as it has one bug fix for .bin color export.
     
    ikuohololab likes this.
  7. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,441
    Last edited: Mar 3, 2017
  8. andonegr

    andonegr

    Joined:
    Jan 20, 2013
    Posts:
    7
    Hello mgear,

    I have been playing a bit with the free version of your point cloud viewer and i am getting some very interesting results, so i would like to buy your asset.
    I am building an exploration game - i know you refer to it as not appropriate for this - but i would like to integrate some point cloud elements inside my scene. So, probably a stupid question, but since in the free version i can't, does the package let me:
    -view the point cloud in the editor?
    - edit it's transform (scale position rotation) so i can generate it in a specific area of my scene?
    - will it run with htc vive?

    Thanks!
     
  9. mgear

    mgear

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

    For dx11 viewer, need to uncomment the [ExecuteInEditor] line in the script,
    but it would be easier to use PointCloud2Mesh converter instead (ouput would be normal gameobjects that you can use).

    For dx11: In the included shaders, they dont support that,
    but i do have a shader version available that supports transform position, ill include in the package for next updates.
    have to check about rotation and scale..

    With point meshes, this works normally already.

    I havent tested.. also been unable to test with the new vr single pass shader, so if anyone knows do let me know.
     
  10. luobo1995

    luobo1995

    Joined:
    Apr 14, 2017
    Posts:
    1
    Hi,

    I want to buy the asset to load the format .pcd into the unity and make it shown in 3d as the environment to finish my work.
    So is the asset support the .pcd?

    Thanks!
     
  11. mgear

    mgear

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

    Not supported.. so would have to use some 3rd party tools to convert it first..

    *but since its some "open format", should be easy to add, ill put in the todo-list.
     
  12. sudupa1

    sudupa1

    Joined:
    Apr 18, 2017
    Posts:
    4
    Hello,

    I just purchased your assett in hopes that it would allow me to view my point clouds in the Oculus Rift. I'm very new to Unity and VR development. I'm trying to follow your PDF users guide to import my clouds, but am having a hard time selecting my file as a source. Where is the Sample Data folder that you are referring to in this guide?
     
  13. sudupa1

    sudupa1

    Joined:
    Apr 18, 2017
    Posts:
    4
    I'm essentially trying to recreate the demo with the trees and the park that is included with the asset download. I would appreciate it if you could help me figure out the best way to go about this.
     
  14. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,441
    StreamingAssets/ folder has that 'sample.bin' file

    *looks like in docs it still says Resources/.. ill update that.
     
  15. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    Reading 5.6 stuff found that gpu instancing stuff is now much faster. Wouldn't it be possible to have like a point element and instance it all over the place?
     
  16. sudupa1

    sudupa1

    Joined:
    Apr 18, 2017
    Posts:
    4
    Thank you, I was able to convert my point cloud into a mesh and save it as an asset, I think. How do I view the mesh in the Unity scene?

    Also, if I want to view my point cloud through the Oculus, which would be better: using the binary format or the mesh format?

    Thanks for the quick response time! Really in a time crunch here.
     
  17. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,441
    Better test both, and use which ever feels better. (dx11 version can display more points, but mesh version is easier to use, since they are normal objects in scene)

    If you use the mesh converter, it adds them to scene after conversion,
    if cannot see anything, enable or disable scaling (they might be too small, all in 1 point)

    Or if you have problem with the conversion, email me link for the data file so i can check.

    Also note, that sample.bin is already in dx11 format, cannot convert into mesh.
     
  18. sudupa1

    sudupa1

    Joined:
    Apr 18, 2017
    Posts:
    4
    I sent you a PM. Appreciate the help!
     
  19. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,441
    Ok, so just for reference, some of the issues were:
    - original point cloud data was in Binary .PLY (only Ascii .PLY is currently supported)
    - ply to xyz conversion with Meshlab, RGB data is not included (so need to export into .ply ascii instead, and check [x] color in the export dialog)
    - mesh was pink: In the PointCloud2Mesh converter dialog, should assign material that is used for the meshes in the field: "mesh material", can use "PointCloudColorMesh.mat" (if data contains RGB colors)
    *can do this after conversion also, select all pink meshes in the scene, assign that material on them
     
  20. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    I recommend Cloud Compare to export to XYZ with color. Also exports ply but XYZ is faster export.

    http://www.danielgm.net/cc/
    Its free
     
    mgear likes this.
  21. WHKS

    WHKS

    Joined:
    Dec 13, 2011
    Posts:
    61
    how fast is this system on a 1080 card or is there no way to get 90 fps using point clouds? and will have 2 1080 make any difference? want to spec out a demo machine to show off to clients. Let me know thanks
     
  22. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,441
    For me it felt like gpu didnt make that much difference, have tried nvidia quadro5000 too, 970m and few others.. also i dont think SLI helps in unity either.
    But I could make some heavy demo scene .exe to test. (probably on next weekend)
     
  23. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    I've 1080 someone put a demo with fps reader I report.
     
  24. WHKS

    WHKS

    Joined:
    Dec 13, 2011
    Posts:
    61
    Ah ok im doing a system for construction companies an they use PC for checking progress an coordination and i wanted to see what would it take to make this run at 90fps they have a lot of funding so building a comp wouldn't scare them

    Let me know if anything 1-2fps is ok but if there is something we can do let me know I'm interested to see what it would take to crank this up a level.
     
  25. WHKS

    WHKS

    Joined:
    Dec 13, 2011
    Posts:
    61
  26. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    I did some testing with my i7 3820 and gtx 1080
    LOL.---> I knew I made some tests in teh past:
    https://forum.unity3d.com/threads/released-point-cloud-viewer-tools.240536/page-3#post-2936649
     
  27. WHKS

    WHKS

    Joined:
    Dec 13, 2011
    Posts:
    61
  28. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    Check the link in the post above!! It even includes sample photos and point number/fps ratio in two test cases.

    I don´t know if ressults are limited by the cpu or if it does even rely more in cpu than gpu etc...
     
  29. swalz

    swalz

    Joined:
    Apr 19, 2017
    Posts:
    8
    After you convert your point cloud to a .bin, how do you view it in your scene? I have an LAS file that seems to go through the conversion process, but I can't figure out the next steps...I've reviewed the documentation available and followed the steps on the dragon example, but nothing shows up. When I go to play, all it shows is a link. If I convert LAS to a mesh, it pops up in my screen, but it doesn't read the true colors...I can only set it to a mono color.

    Any help would be greatly appreciated!

    Thanks

    Steve
     
  30. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    I believe that bin files are only visible in runtime.
    If you need to overimpose geometry you could have a non bin point cloud for in editor reference and dissable it for the build version.

    I don´t get the "shows in a link" it's a while since I don´t use it. I remember it required you to place some routes to where the data is within editor inspector.
     
  31. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,441
    to view .bin files, need to use that BinaryViewerDX11, see the included example scenes (and adjust your path on the inspector to load your.bin file)

    For mesh converter,
    need to enable [x] read RGB, and use a material that supports colors, for example "PointCloudColorsMesh.mat"
    (you can assign that material on the converter window bottom field, or manually to the converted meshes)
     
  32. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,441
    Heres quickly made performance tester.exe for windows

    - Press 1 to add 1 million points, 5 to add 5mil, 0 to add 10 million *uses array resize so adding is bit slow
    - WASD + Shift + Mouse to look and fly around
    - F1 toggle FPS counter
    - Esc = quit

    https://www.dropbox.com/s/23huto75j8dpm03/PointCloudTesterV1-537p4.zip?dl=1

    Do post screenshots, would be interesting to know results.
    ** some results here:
    https://forum.unity.com/threads/released-point-cloud-viewer-tools.240536/page-7#post-4223734

    *tested building the exe from 537 and 2017 (without changing anything) no difference in fps
     
    Last edited: Dec 1, 2023
  33. Beodom

    Beodom

    Joined:
    Dec 14, 2016
    Posts:
    5
    Hi there, recently updated to Unity 5.6.0, and am now receiving this error on the ColorSizeDX11 shader: 'UnityObjectToClipPos': cannot implicitly convert from 'float4x4' to 'float4' at line 72 (on d3d11).
    The same thing is on ColorSizeLinearFixDX11 at line 76.
    The regular ColorsDX11 is working correctly.
    Shader language is gibberish to me any help to get it back working again is appreciated!
     
  34. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,441
    seems to be issue in the geometry shader, checking it!

    hmm looks like something happening here also,
    https://issuetracker.unity3d.com/is...ippos-star-faulty-replacement-breaking-shader
     
    Last edited: May 2, 2017
  35. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,441
    Ok, i have fix for this one.., tested on 2017 at least works, ill post it somewhere over the weekend or before.

    *Just preparing package for asset store v1.9 (if anyone is in a hurry, email me so ill send the few lines to copy paste for shader fix)

    ** submitted v1.9 to store, release notes: https://github.com/unitycoder/UnityPointCloudViewer/blob/master/ReleaseNotes/release-notes.txt
     
    Last edited: May 13, 2017
    Beodom likes this.
  36. Volkerku

    Volkerku

    Joined:
    Nov 23, 2016
    Posts:
    114
    Shader issue
    Not sure if this concided with the update to Unity 5.6, but I can't get the DX11 shaders to workanymore (but the simple ColorDX11).
    The error message from Unity "Shader error in 'UnityCoder/PointCloud/DX11/ColorSize': 'UnityObjectToClipPos': cannot implicitly convert from 'float4x4' to 'float4' at line 74 (on d3d11)".
    I'm no expert with this, but it sounds like a mismatch in types.
    Any help?
     
  37. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,441
    yeah, that's fixed in the v1.9 update (currently in asset store queue, uploaded yesterday).

    If you are in hurry, send email so ill give the snippets to copy paste there.
     
  38. ranzaro

    ranzaro

    Joined:
    Aug 22, 2016
    Posts:
    6
    Hi Mgear,
    thanks for the update on that, I confirm that Brekel animated point clouds are working and perform amazing now!

    From my understanding Animated Point Clouds through your viewer are limited to this Brekel format though.
    Is there any other way to read Animated point clouds from any other format?
    Reading the animation as a sequence of PLY for example?
    Or any other way, like converting a sequence of PLY (or any other format) into the same Brekel .bin format?

    Many thanks
     
  39. jabaggett

    jabaggett

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

    I have been using PointCloudTools to view LIDAR scans from a cave for a portion of my thesis. I have managed to use the point cloud to mesh function successfully, and I have managed to change the color of the point cloud with the shaders, but I can't seem to get the point size function in the shaders to work. I am relatively new to Unity, so I apologize if this is something overly simple.
     
  40. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,441
    Yes, currently limited from brekel only, but definitely would be possible to convert any data into this .bin format..
    From which software your animated data would come from, which format?
     
  41. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,441
    With DX11 mode in unity, have to use one of the MeshPointsDX11 size shaders. (instead of the PointCloudMeshColorSize.shader)

    *in the latest v1.9 version, you can use
    MeshPointsDX11QuadOffset material
     
  42. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,441
    Last edited: May 16, 2017
    sjm-tech likes this.
  43. jabaggett

    jabaggett

    Joined:
    May 15, 2017
    Posts:
    6
    That worked. Thank you!
     
  44. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,441
    nice!


    also,
    just in case anyone has issues with .pts files,
    one bug founded on pointcloud2mesh converter, it doesnt correctly skip .PTS format intensity value if its there when rgb should be used..
    https://github.com/unitycoder/UnityPointCloudViewer/issues/30
    (pointcloud2binary works fine with .pts)
     
  45. ranzaro

    ranzaro

    Joined:
    Aug 22, 2016
    Posts:
    6
    Hi Mgear,
    We're using Zed stereolab cameras to generate point clouds from depth maps, their Zedfu software allows to export multiple formats.
    We're working with .pcd file sequences now, but could work with .ply sequences as well.
    Due to the growing volumetric capture market and devices I believe it would be a great feature having the ability to convert point cloud file sequences into that animated .bin format!

    Thanks
    Matteo
     
  46. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,441
    Thanks, ill have a look soon.

    The package does include shader to play color + depth map video on a plane that it extrudes, that might look pretty similar.
     
  47. mgear

    mgear

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

    I'd probably want to upgrade to some newer unity version for example update (like 5.6),
    or does anyone still need 5.3, 5.4, or 5.5 versions?
     
  48. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,441
    Just a note here, the mesh version seems to work in webgl2.0 build.
    (that is the point meshes created with PointCloud2Mesh converter)
     
  49. smtabatabaie

    smtabatabaie

    Joined:
    May 6, 2013
    Posts:
    45
    Hi , I wanted to record a video with my Kinect v2 in point clouds (which I can do with brekel and get an alembic model) I wanted to import this model in Unity and use it in my VR application. I wanted to ask if your asset can help me to achieve that.
    Thanks very much
     
  50. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,441
    You can export that animated data into unitycoder binary file from the Brekel export window (*.bin) ,
    and then play the animation using BinaryViewer scene (enter path to .bin file in inspector, should place it under StreamingAssets/..)

    Or you can convert those frames into separate point mesh gameobjects with PointCloud2Mesh converter.
     
    smtabatabaie likes this.