Mar
19
2014

[Asset Store] Point Cloud Viewer & Tools

unity_point_cloud_viewer

Point Cloud Viewer & Tools for Unity.

Asset Store link: https://www.assetstore.unity3d.com/#!/content/16019?aid=1101lGti

Unity Forum Link: http://forum.unity3d.com/threads/240536-Released-Point-Cloud-Viewer-amp-Tools


 

Main features:
– DX11 Point Cloud Viewer (up to 40 million points using single color *could depend on your hardware stats)
– Single color and RGB point cloud shaders included (for both DX11 & non-dx11 modes)
– Supported import formats: XYZ, XYZRGB, CGO, ASC, CATIA ASC, PLY (ASC)
– Editor plugin#1: Point Cloud To Binary (saves data to custom binary format for faster reading)
– Editor plugin#2: Point Cloud To Unity Meshes (splits point cloud data into 65k meshes)
– Brekel Point Cloud Pro v2 binary file support (view & convert animated point clouds)
* Check pdf below for more details!


Main limitations:

– Main viewer requires DX11 (does not work on Apple Macs)
– Can only display 1 cloud at a time (so you must combine clouds and filter them to have suitable data)
– If you use RGB colors, maximum is ~20million (instead of 40mil) *New: With Unity 5.1 tested loading 75million points (single color) ~10fps in editor..
– Current version loads the points at Start() function, you need to modify the viewer script if you want it to load them some other time
– There is no any “API”, just few normal unity c# scripts & shaders to display the points
– Not much error checking is done on imported files, if they are different from supported file formats, most likely it breaks


Documentation PDF:

PointCloudViewerTools_web13.pdf *old version


Roadmap/future plans:

– Support for float RGB values (currently it expects int values 0-255)
– DX11 point size (if its possible to make it work)
– New import formats
– Add touch screen flying controls for the mobile demo
– Include webplayer compatible reader (instead of using System.IO) : (*In v1.3)
– Support for point normals (*New v1.3 import normals for PLY (ascii), only for cloud2mesh, not in DX11)
– .LAS file format support (import) (*in v1.8)
– .PTS file format support (import) (*in v1.8)
– more.. (feel free to comment/request)


Wishlist / Requests:

– DX11 Point Size
– .E57 file format support
– Support for point normals dx11 (need to somehow pack the normals into position or color values..)
– Support for .abc / .fbx / .obj formats
– Shaders for points + unity lights (pretty much needs normals, unless make it just distance based brightness)
– Clipping boxes  / planes
– Taking measures *available as customized work (but starts to get slow with over 5-10mil. points)
– LOD (based on camera distance and/or octree lods)

– Compressed or less precision binary format (smaller files)
– Oculus version of the pc demo scene

Bugs:
– (14.4.2014): Mesh Converter: If point amount is less than “Vertices per mesh” amount, cloud meshes are not generated. This will be fixed in next update (or email me for manual fix) **Fix submitted to asset store 27.4.2014)

Demos:
PC exe 2.5million points (dx11) : mediafire | dropbox
Android (.apk) 2.5 million points (non-dx11) : mediafire | dropbox (*60fps in Samsung Galaxy S4)
iPhone5 : Doesnt seem to work properly, hangs, point sizes are wrong etc.. will test again with unity4.6 or 5..

Tutorials:
(more tutorials, coming here later)

Sample data download:
manuscript : mediafire | dropbox 

  • Instructions
    • unzip the file
    • Copy “manuscript.bin” into Unity project folder (under Assets/PointCloudTools/Output/)
    • Open scene “BinaryViewerDX11”
    • Select “@BinaryViewer” from hierarchy
    • Enter “Base Folder” = PointCloudTools/Output/
    • Enter “Filename” = manuscript.bin
    • Press play!

Screenshots:

Main windows:
One for converting point cloud data into faster loading binary format:

pointcloudviewer_ss00a

and one for converting point cloud into Unity mesh assets:

pointcloudviewer_ss00b

Point cloud tests ( data from http://graphics.stanford.edu/data/3Dscanrep/ )

pointcloudviewer_ss06

pointcloudviewer_ss07

Point cloud tests (data from http://www.libe57.org/data.html )

pointcloudviewer_ss08

pointcloudviewer_ss09

Same as above, but using RGB data:

pointcloudviewer_ss01

This one is unity mesh mode (point size can be adjusted here, but cannot adjust point size for DX11 viewer)

pointcloudviewer_ss05

pointcloudviewer_ss04 pointcloudviewer_ss02

More from http://graphics.stanford.edu/data/3Dscanrep/

pointcloudviewer_ss03

pointcloudviewer_ss10

Unity mesh box + Points:
unity_point_cloud_viewer_model

18.05.2014 : Support for importing PLY vertex normals (using default vertexlit shader here)

point_cloud_viewer_ply_normals


157 Comments + Add Comment

  • I am excited to try this out, I will keep checking to see if it’s available in the asset store. I really think 3D scanners will be the next form of photography.

  • It looks awesome, I can’t wait to try this out 🙂

  • Hi, very impressive work. Is there any way to get this working on a mobile platform (android or iOS) if given a suitably stripped down pointcloud to work from? I’m interested in using it in augmented reality projects.

    • the non-dx11 (mesh) version worked on android (i’ll test on ipad/iphone soon), with 1.2GHz dual core, 256ram it was able to display ~900k points with colors, but crashes if started to move.. 300-500k points didnt crash anymore, bit slow of course..

      (i’ll add some .apk demo downloads here later)

  • Hi there, I’m wondering if there is any feedback on the submission status already or an ETA. I’d love to give this a try…

    • still in queue..
      “Point Cloud Viewer & Tools : 646.5 KB : Pending Review : 2014-03-19”

      *Finally got email, they want to have ready sample data to test it..

  • Any chance of supporting .abc, .fbx, and/or .obj point cloud file formats? Can the point clouds co-exist with geometry/lighting in Unity? This looks quite cool

    • Adding those formats to “wishlist”, will check later how would it work.

      Yes, can have other stuff in the scene (^Added screenshot with points + box)
      Points wont be affected by lights currently, because they dont have any normal direction information. (Some point cloud formats do support normals, so it should be possible, adding to the list also)

    • Yes, especially obj would be appreciated. The format does support point primitives, but unitys built-in obj importer seems to ignore them 🙁

  • is it possible to interact with the point cloud? for example – having the points within the box geometry not render? or for example in your exterior point cloud, make a clipping object that hides a tree in the point cloud? Maybe this could be solved by breaking up the cloud into separate point clouds that can be turned on and off.. hmm

    also, a way to animate the cloud density? so it goes from showing 1 point to all points in a gradual ramp?

    • No interaction with points, unless make some script for it.. basically its just array of points, so can do anything with it (havent actually tested yet how well KDTree would work on it, so that could snap on nearest points for taking measures for example..)

      Clipping: I think shader modification could do it (hide or use different color, if point coordinate is not inside given coordinates), but having lots of separate boxes wouldnt work so well on this.. Or actually could probably adjust from script the invidual point colors, not sure how slow it gets if there are millions of points..

      cloud density: not exactly sure what you mean, do you have some image how it would look or more info?

      • Can the point size be adjusted? larger or smaller dots? Last question I swear! 🙂

        • In the current versions point size cannot be adjusted on dx11 version, only in the non-dx11 version..(for some reason it doesnt work in dx11, but will try to fix it if its possible)

  • oh, its alive: http://u3d.as/content/mgear/point-cloud-viewer-and-tools

    I’ll upload the documentation PDF here later today, dont buy before reading it carefully.

    • yuhuuuu… awesome news… what about does who payed it (twice) while in development, any discount ? thanks

  • Hmm, I got the plugin and am trying to import my own point clouds (as xyz ascii) into Unity as Meshes. I can’t seem to get it to work, though. I am importing the .xyz file into Unity, then use the conversion to mesh window in a way similar to the tutorial you posted. I get a “PointClouds” transform but no meshes. Is there a way to send you the file? The .xyz format is pretty trivial, but perhaps I am missing a detail.

    • How big file it is, if you can send by mediafire/dropbox (password protected) ?
      Or copy paste few lines from the file to my email for a quick check.

      • I’ll send you an e-mail, the file is pretty small. Thanks!

        • replied and added it as first bug in the list 🙂

          • Didn’t get the reply, yet. Can you try again? Is there a workaround I can apply to the file or will I have to wait for youto fix it?

  • Some progress info here:
    – Bit delayed on the new features & testing, had a new Instance(); in the family, suddenly free time doesnt exists that much :), but they are still coming (normal map import for PLY already works, just havent uploaded it yet)

  • Updates:
    – Webplayer viewer is working (loads binary point cloud file from web server, displays progress counter 0-100%, might be possible to display the cloud while its still loading points)

    Still need to add few things before pushing to asset store (but next update should certainly be within this month)

    • Can I publish previously imported point clouds to a web-player? I’m not considered with loading them from a server. But, I am curious if that feature is live yet. Thanks.

      • In the next (1.3) version yes. (just need to updated the docs a bit and then submitting the update, hopefully within this week).

        Also note to my previous comment there ^, not possible to display cloud while its loading, limitation in the unity WWW (it doesnt give access to the data until its completely loaded, otherwise it would be possible to “stream” the points and display while its loading).

        • 1.3 is live (since Jul 23, 2014), didnt get any email alert that the update had been accepted long time ago..

  • Does this tool allow deleting points from the cloud and saving it to file? If not, do you have some idea of how this could possibly be accomplished?

    • Not at the moment, but should be easy to do.. (its just an array of points).
      – How you would want to select the points that need to be deleted? (by area, by cutting plane, or filter by distance or something else..?)
      – in editor or runtime?
      – other requirements for editing the cloud?

      (But you could also delete the points in 3rd party programs also, before bringing to unity)

  • Hi there,

    I tried both the desktop app and the phone app, really impressive stuff. I was wondering how do I move around using the phone? I see the point cloud but I can’t move around.

    Also, I was considering coupling this with the Durovis Drive SDK (https://www.durovis.com/sdk.html), do you think that would work?

    Thanks!
    Ervine

    • Yeah the current android viewer doesnt have touchscreen flying.. (added to todo list),
      but anything would work, just needs something to look around & move, that durovis would work also.

  • Graet Tool, but everytime I try to Buil a project I get an the following error: “Assets/PointCloud/Scripts/PointCloudManager.cs(155,17): error CS0103: The name `UnityEditor’ does not exist in the current context”
    I use Version 4.5.4f1

    • If you can email me the script (sounds like its your custom script?) then I can check it.

      Most likely could move that script into into Editor/ folder (if its used in editor only)
      or wrap the code inside #if UNITY_EDITOR
      http://docs.unity3d.com/Manual/PlatformDependentCompilation.html

      Of if it needs to be used in the build at runtime,
      then need to remove the code it uses from directive “using UnityEditor;”

      • Thanks, I rebuild the project from the scratch and now it works. #if UNITY_EDITOR also works. Have you ever tried your player with the OculusUnityIntegration DK2? Using your player and the OVRCameraController seems not to work. The preview windows shows the right content but when you try to use the Oculus to display the project you get a black screen.

        • ok. Early version worked with dk1, will try to test with DK2 soon.

  • Hi there,

    I just purchased your plugin and it’s all really good.

    I’m just wondering why I can’t seem to increase the point size in mesh mode? I created a new mesh output from an XYZRGB file and increased the pointsize in the PointCloudColorsMeshPointSize script from 5 to 500, but nothing changed.

    Please advise.

    Thanks!
    Ervine

    • Hi,

      First thing to test:
      – Disable DX11 mode

      • Thanks! It works!

        Too bad performance takes a big hit when not using DX11 though. I need to downsize the point cloud a fair bit.

        Just FYI, Oculus DK2 works fine with this. I just attached the OVR prefab camera to the main camera and I was flying through clouds in no time.

        Excellent work, I hope you manage to find a way to increase point size in DX11 as well as allow the toggling of visibility of multiple point clouds within the player.

        Thanks again!

        • Yea, the .fls files are a lot smaller, but I’ve exported it to .pts, I have a couple of questions.

          – I don’t see .pts as an option in PointCloud2Mesh, are they not supported?

          – While trying to view the binary file created from my ,pts files, I received this error…

          ‘ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
          Parameter name: startIndex’

          Is there a limit to the size of the collection? Looking at the file, the Y point is negative, is that an issue?

          • I’ll add .fls in the TODO list (and just contacted Faro to request access to their SDK, would be nice if can just use external DLL to handle importing..will see.)

            – .pts 2 Mesh: oh yeah, it wasnt added there yet, but its coming in the next update.
            – pts error: This should go away in the next update also, there were couple cases where double or triple spaces between values caused errors, or having values with exponents like -e005

            (that error message is usually caused when: in the binary header the point count value is larger than actual point data, so it is problem in the PointCloud2Binary converter, its missing some points for some reason) *ps. How many points you actually have in the file?

            I’m working on the next update currently, so it should be out “soon” (hoping to have it in a week)

        • I am frustrated, I cannot get this to work. I am using a pts file exported from Recap. It’s a real world example with the origin a ways off. The first problem I’m having is there is a bug preventing me from using pts files to create binary clouds, and the mesh clouds don’t support pts files. I managed to convert it to an xyz in MeshLab and created the binary cloud without error. But I cannot find it. I’m sure it has to do with the scaling and base point. The cloud is super dense so I’m only using a small portion for testing. I have included a link to download the pts file. Would anyone be willing to try to get this into Unity and share their workflow with me, Including whatever file type you ended up using and what software you used to convert it? I would really appreciate it. Thank you.

          https://virtualziggurat.sharefile.com/d-sbd1981d3c104ce1a

          • I emailed you the latest Binary2Mesh version, seems to work better there. Checking the binary file next.

  • Some updates whats coming up next:
    – Faster binary loading (sample scene original time ~6400ms, new time: ~850ms), although still need to test if this works with large files
    – 1 New import format (more info later, once its working, but its not one of those in the wishlist yet)
    – Code cleaning up and better variable/function names etc.

  • V1.4 is now live in the asset store:
    http://u3d.as/6Xx

    Experimental binary import support for Brekel Point Cloud Pro V2 (can view single cloud or animated frames) *DX11 only
    Can also convert animated Brekel point cloud frames into unity meshes
    Much faster binary loading (somewhat experimental still)
    Mobile demo scene included (its currently quite heavy, will be adjusted in coming updates, and hangs on iphone5, works better on androids)

    “Brekel Pro Pointcloud V2 is a Windows application that records 3D pointcloud using a Kinect sensor” : http://brekel.com/brekel-pro-pointcloud-v2/ *Note v2.08 or later requirer

  • Hi mgear,

    This tool seems great. Is there a way of overlaying the point-cloud mesh with the photos that were taken by the laser scanner? (My understanding is that laser scanner take pictures whilst scanning)

    I am new to Unity, so apologies in advance if this is a silly question. Thanks!

    Dalts.

    • Adding 360 image as unity skybox could work, but I think the positions wouldnt match at all.. (especially when rotating camera)

      In Faro webshare you have 360 image in view, but cannot see the actual clouds (can still take measures from 360 image though), I think LFM Netview was similar.

      If you have some example application that does those (displays 360 image & point clouds), can you link to it?

  • Project reference (point cloud viewer & tools were used on this project)
    http://datumexplorer.universalassemblyunit.com/

  • Hi,

    We have very large point clouds 10-12 gb, will it work with this tool?

    • Most likely not, because the point limit is ~40million.

      So you would have to first filter them down to that amount.
      (or split to multiple files and then implement custom script to display one 40mil. cloud at a time, cannot have more than 1 cloud visible at a time)

      • Would it be possible to “cloud walk” from a point cloud to another by having “tiles” of clouds that overlap each other and load them while walking through it one at a time?

        Last question, could we use this with the Oculus Rift Package?

      • Actually, what causes the limitation of 20/40 mil. points?

        • Walking:
          Yes, it would be possible to create “chunks” of points and load them when necessary or other option, have big chunks (~40mil each) and then “enter to view them” using custom minimap or such..

          Currently the viewer uses single huge array for the points,
          and basically you could simply set each point position directly to the array: position[index] = new Vector3(x,y,z), so you could make custom loader to feed the point positions there..

          Yes, works with Oculus, but it causes quite a big slowdown (might have to limit point amount to half even)

          Its unknown why ~40million is the limit.. but also it gets slow on that point already, so even if that amount could be doubled, it would be too slow..

          Actually havent tested the maximum amount on 64bit Unity5 yet (planned to do that soonish).

  • How do the meshes produced reconstruct the surfaces? Do they use ball pivoting or poisson sampling or some other algorithm? What do the meshes look like up close?

    • There is no mesh reconstruction, I’d suggest using external software for that. (MeshLab, Catia, Geomagic or others).

  • submitted v1.5 update:

    v1.5
    – Added: “.LAS” import support for binary cloud converter *Only LAS format#2 is currently supported
    – Added: “.PTS” import support for binary cloud converter (PTS: XYZ, XYZI, XYZIRGB, XYZRGB) *For now intensity value can be converted as RGB
    – Added: “Window/PointCloudTools/Create test binary cloud” for creating random point clouds with adjustable point amount (for debug purposes)
    – Added: “Window/PointCloudTools/Show header data helper” for printing out text based file headers (for debug purposes, to see what the file contains)
    – Added: “isLoading” boolean to check if we are still in loading

    – Changed: Added “rotateWithRightMouse” bool into “SimpleSmoothMouseLook.cs”, so you can rotate view while right mouse button is down
    – Changed: BinaryViewer now automatically adds “.bin” to end of the file, if its missing in the inspector field
    – Changed: .ASC reader now tries to skip all comment lines from start of the file (to allow reading Geomagic .asc files)

    – Fixed: Manual offset values (had .x for all axis, instead of .x .y .z)
    – Fixed: BinaryConverter now removes double or triple spaces between values, to fix Geomagic .asc import

    – Note: MeshConverter does not yet support .LAS or .PTS importing (use some external tools to convert them to another supported format)

  • […] Point Cloud Viewer & Tools for Unity […]

  • Are .fls file types / point clouds supported?

    • Not supported.. would there be some extra benefit to support that format?
      (if yes, then I can of course have a look if its possible to add)

      Since you can easily export that file to other supported formats from inside Faro Scene etc.

  • When I run this I get a single pink point in the center of the screen. Not sure what the issue is. The console indicates SUCCEEDED(hr). I have built and run it stand alone with the same result. I am using the xzyrgb_dragon data and the file size is 42MB. The sample.bin data yields identical results.

    • Hi, which unity version? and is DX11 enabled?

      • Running Unity 5.1.0

        DX11 is running and DirectDraw, Direct3D, and AGP Texture Acceleration are enabled according to dxdiag

  • submitted v1.6 to store just now (published with unity 5.1.0f3)

    v1.6
    – Added: New material “PointCloudColorsMeshAlpha.material” (and shader “PointCloudMeshColorsAlpha.shader”) with adjustable color tint & alpha
    – Added: PointCloud2Mesh now imports .LAS & .PTS files
    – Added: **Experimental** PseudoLight & VertexPush scene “scene_MeshPointPush” for mesh clouds (sets point brightness based on distance to give object and pushes(displaces) points away form given object)
    – Added: Basic decimate cloud for PointCloud2Mesh (remove every #nth point)
    – Added: Display selected file size (below sourcefile field)
    – Added: **Experimental** [x] Optimize Points for PointCloud2Mesh (easier to see from scene view while playing), it sorts the points along X axis (to allow mesh pieces to get culled easier), but doesnt work well with all values, if your cloud seems to be missing points, disable Optimize points.

    – Changed: Project is now updated to Unity5.1
    – Changed: Point data is now internally read as doubles instead of floats (to avoid loss of precision during scaling)
    – Changed: DX11 viewer & DX11 shaders now use less memory
    – Changed: Improved .LAS parsing PointDataRecordFormats #2 & #3 are now supported
    – Changed: With PointCloud2Mesh you dont need to select import format anymore, instead parser tries to read any suitable point cloud data (in common formats)
    – Changed: Progress bar now also display during mesh saving
    – Changed: Deleted 20 mesh clouds from “scene_mobile_heavy01.scene” to make it lighter

    – Fixed: PointCloud2Mesh AutoOffset (it didnt work if FlipYZ was not enabled)
    – Fixed: Fixed several parsing problems with some files (.asc, .pts, .las, .xyz)
    – Fixed: .LAS colors values are now scaled to 0-255 (some files had different ranges)

    – Note: DX11 Point clouds doesnt seem to work if Unity v5.x “[x] Virtual Reality Supported” is enabled
    – Note: DX11 point clouds or Mesh point clouds doesnt seem to work with WebGL viewer

  • Just got the plugin, it works very well. Nice work.

    I am using the Oculus Rift DK2, and would like to see points rendered through DX11. When in game mode in Unity (510f3), I see the points.

    But when I do a Unity build, I don’t see them any more.
    Can you confirm you can use DX11 points for the DK2?

    Thanks

    Luke

    • Yes should work, if you use the oculus package, not the unity builtin [x] virtual reality support.

      Common problem with build mode is that the point cloud file doesnt get included in the build,
      seems that even from resources folder it doesnt get copied, so copy it manually to your build Data/ folder. (same place where it would be in the Assets/ folder)

      If in the editor the file is in /Assets/points.bin
      Then copy to your build /Data/points.bin

  • Hi MGear

    Thanks for your suggestions, You were quite right about including the .bin file in the actual build.

    The issue now is that I get a strange artefact. I get the colored points rendered correctly, but in addition they seem to be being copied into the center of the screen in black: see attached image

    https://www.dropbox.com/s/313u860vb8zolah/oculus_dx11_issue.png?dl=0

    I have wrestling with this for some time and wondered if you might know what’s going on.

    Luke

    • Tested with Unity 5.1.2 + Oculus 5.0.1beta Unity plugin, didnt see similar problems..
      Which versions you are using? Do you have any image effects enabled? Or are there any other cameras in scene?

  • Hi MGear, your Point Cloud Tools are excellent and are serving me quite well!

    I have one issue currently, though: Trying to use the webplayer viewer to load a point cloud .bin file from a server, my graphics card (Intel HD Graphics 4000) crashes. (Or, more precisely, I should say that the driver crashes).

    Generally, the “loading” counter is somewhere between 0% and 60% when the crash happens.

    The regular viewer works just fine, no issues.

    Any idea what might be to blame here?

    Thanks,
    -dan

    • hmm.. does that also happen when loading from my server (with that included webplayer demo scene) ?

      If it crashes in editor, can you email me the editor.log http://docs.unity3d.com/Manual/LogFiles.html

      • Yes — it does happen when using the included webplayer demo scene. Looking at the editor log, I’m thinking there may be a network issue relating to my corporate proxy…? Anyway, I’ve emailed you the log, let me know! Thanks.

        • Looks like memory or DX11 issue, “OutOfMemoryException: Out of memory”
          “VRAM: 128 MB”, that is quite small amount..

          Does your unity editor title bar has text [DX11] or [DX11 on DX10 GPU] ?
          If its the DX10, then it usually doesnt work..

          You could test it with small amount to see if its memory issue (the demo has ~2.5million points), but of course it wont very useful if cannot display millions of points..

          • So for som e, I tried it on a coworker’s (much heftier) machine, which has an NVIDIA Quadro K5000 with 4GB of VRAM, and the exact same thing happened. I’ll email that logfile as well, maybe it’ll be helpful.

            -d

        • hmm.. there is that “403 Proxy Unacknowledged” error message, so it must be that then.. if its possible for you the test it outside that network, then that would confirm it.

          I didnt really find anything interesting related to unity with that error message, so not yet sure how to fix or avoid it..

        • You could try setting this env. variable:
          http://blog.gfx47.com/2011/03/08/unity3d-httphttps-proxy-problem-solved-o/

          At least in editor it fails to play that webplayerdx11 demo, if the proxy connection is not working (when behind company proxy/firewall)

          • OK, so I did confirm the problem is related to the proxy, as the webplayer demo works just fine when I’m outside the corporate firewall and the proxy settings are turned off.

            However, I also confirmed that the system *is* correctly loading web data through the proxy (I have the HTTPS_proxy and HTTP_proxy set properly) in general, but for some reason the point cloud data is causing the graphics driver to crash when loaded through a proxy.

            I’ll be doing some more testing, and I’ll let you know if I come up with anything…

  • Hi MGear, great tool man!
    So Im just running into some issues with getting point clouds in from trimble realworks.
    Currently i have to go through meshlab and convert to .xyz to get it to work.
    Im fairly new to things point cloud so maybe im just being a retard.
    I have been trying various common formats between realworks and your tool with no success.
    Currently trying .Las and get the follow errors

    BinaryVersion is not 2 – reading file most likely fails..

    EndOfStreamException: Failed to read past end of stream.

    any suggestions?

    • Are you using the latest v1.6 version?

      Did you try to convert las file into mesh or dx11 points?

      If you can email me some sample file from trimble realworks,
      I’ll test it (or if you know some files online. post link).

      • hey thanks for getting back to me so fast!
        I think the current version id 9.1.2, i converted into mesh, did not think to try the dx11, will
        give it a try now.
        Also gonna mail you a small las from my scene.

    • Hi, LAS file seems to work fine, just need to use the converter first (point cloud to binarydx11, that error message seems like its trying to open LAS file directly to viewer, instead you need to convert first then view).

  • Have another quick (?) question for you…

    Is it possible, using the DX11 point viewer, to make the points appear larger than a pixel?

    Thanks,
    -d

    • Not possible (other than using post effects to blur or add edges..but not really nice). With oculus can set render texture resolution, but that doesnt look good either.

      This is quite common request so I have it on TODO list, one option is to use billboard sprites (but that probably requires 3-4 vertices per point (compared to 1 vertex=1 point), so its not really ideal solution..)

  • Couple quick tests with Oculus, created random cloud with 10m and 50m points:

    in editor (5.1.3p3, [x] vr supported)
    10million rgb points: 25fps
    50million rgb points: 9fps *same in exe

    specs: intel xeon E5-1630 v3 @ 3.70Ghz, NVidia Quadro 5000, Oculus 0.6.x

  • just bought this, and works well within Unity Editor, but can’t get it to show point clouds after build. Everything else in the scene shows, but it does not seem to find the .bin file ? I used the Resources folder.

    • yes, it seems to drop it even from that folder when building.. Currently then have to copy it by hand to the same place in build data folder. (it should display the missing file path so can see which folder it is).

    • Better solution:
      – Move yourcloud.bin file into StreamingAssets/ folder (create the folder to be in Assets/StreamingAssets/)
      – Then point into that file with “@BinaryViewer”, by settings basefolder=”StreamingAssets/” and fileName=”yourfile.bin”

      Then it gets included in build.

  • Is there any way to manipulate the points on an individual basis?
    I am hope I can create a point or sphere with falloff that can for example transform the points in the Z direction when near points in the data set.
    My goal is to create a pulse or wave in the data originating from where the camera is.

    Is this possible with the asset as it stands now or anytime in the near future?

    Thanks!

    • yes, it would be possible inside shader or from the script by modifying the point array (script version would be slow, if have to compare each point every frame).

      For the mesh version there is example included “vertexcolorsDisplacePseudoLight.shader”, it pushes points away near the player.

  • I’m having a very weird issue with something that should be trivial: I cannot convert to a Unity mesh anymore :S Please see screenshot:

    https://www.dropbox.com/s/xfg4ri3zogr663e/PC2Mesh%20problem.jpg?dl=0

    With the PointCloud2Mesh tab open, I can fill up all the fields and when I get to the save dialog I cannot Save because the dialog has a problem with the type of file I’m saving. In fact the only type available is “all files”

    No name will work: “mymeshname” “mymeshname.asset” “mymeshname.allfiles”…

    Is there completely stupid I’m missing?

    The weird thing is that I’ve used this feature before, but on a Win7 machine. I’m now on a new Win8.1 machine.

    Thank you for your help!

    • Someone else had similar problem, he solved it with unity re-install,
      but try first not to touch the file type dropdown at all, just enter some filename like “test”, without extensions. *I see you already tried that..

      This had only started to happen recently, so could be something that has changed in unity versions.. Which versio you are using? And which windows version?

      http://forum.unity3d.com/threads/released-point-cloud-viewer-tools.240536/page-2#post-2318672

      *also in your image you have not assigned any material to the generated meshes, but that wouldnt cause this issue though, it just helps so that you dont have to do it manually later.

    • Ok, got the same problem happening with 5.2.1p3, it works fine with 5.1.0f3, 5.1.3f.. so have to check whats happening there.

      Ok, seems to work if you fix this line at PointCloud2MeshConverter.cs
      // FIND LINE
      savePath = EditorUtility.SaveFilePanelInProject(“Mesh assets output folder & basename”,”PointChunk”,””,”Set base filename”);

      // REPLACE WITH (added file extension .asset)
      savePath = EditorUtility.SaveFilePanelInProject(“Mesh assets output folder & basename”,”PointChunk”,”asset”,”Set base filename”);

      • That line of code edit it worked!

        FYI, I was on Unity 5.2.1f1

        Thank you for your help.

  • v1.7 was submitted to store yesterday

    v1.7

    – 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 couldnt 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

  • Also did some stress tests converting 3.8gb LAS to binary,
    and then viewed in editor (152million points).. ~2fps on laptop..

  • I convert a kinect scan with MeshLab to XYZ file as describe in the tutorial. But the color is all gone. What is the correct way to convert a kinect .ply file to .bin file with color? Thanks!

    • Export as ply, with Vert [x] color (and disable others like Face color etc)
      Then inside unity, Window/PointCloudTools/Convert point cloud to binary,
      Select the ply file as source,
      Input format PLY, [x] read RGB values (rest of the options can be anything needed), convert.

      Then with BinaryViewerDX11.scene, use cloud material “PointCloudColorsDX11”, then it should work.

      • oh… I forgot to uncheck [ ] as binary file… Thanks!

  • Opened github for posting issues/bugs/feature requests (easier to follow up there)
    https://github.com/unitycoder/UnityPointCloudViewer

  • Hello, I recently purchased this point cloud viewer. But I cannot make it work, I followed the instructions but it doesn’t let me see the point cloud.

    I notice that when I click on @BinaryViewer on the Hierarchy panel, on the inspector this message is displayed “The associated script can not be loaded. Please fix any compile errors and assign a valid script”

    I went to the script and it have few errors associated to “var data = File.ReadAllBytes(fileToRead);” The compiler shows an error message like ReadAllBytes doesn’t exit on that context.

    Please help me to get this up and running, so far it’s been like two month’s since I purchased this software and still doesn’t work.

    I hope you could catch on this soon.

    Robert

    • Hi, Which target platform you have? (filesystem wont work on webplayer or webgl) and unity version? *If you had issues already 2 months ago, should had messaged right away.. 🙂

    • Ok, if target platform is samsungTV it also makes that error message, here is fix to remove the error: (by disabling the script on that platform)
      https://github.com/unitycoder/UnityPointCloudViewer/issues/10

  • Hey! thanks for replying.

    I am currently using Unity 5.3.4f1. I got a little confused using this plug-in. I made it work somehow.

    But I thought this would convert xyz to meshes, and I still think that it would do that, but it’s not doing it for some reason. So far when I’m trying to convert point cloud to meshes I got this error message “EndOfStreamException: Failed to read past en of stream.”

    I managed to make the viewer work and it looks good, I just need to play around with it.

    Let me know what I am doing wrong, I will appreciate your help.

    Robert

    • Yes, can convert to meshes and that doesnt need the File.IO in builds.

      Looks like some issue parsing the point cloud data, Which format it is and could you email me the file for testing? (using dropbox or others if its large) *or copy paste some part of the data

      • Thanks for replying,

        I was able to play around and it seems like I have figured out how to convert to bin and meshes. However, the first two point clouds came out amazingly good. But now that I am converting other point clouds, they are coming out with the red color superimposed. I don’t know how to explain accurately, but the cloud looks a little darker than the original with a red tint all over.

        I was guessing that it might had something to do with the material I chose. But after using different materials it came out the same.

        Do you know why is that happening?

        Robert

        • First check the material, if you are using one of those shaders that support color tint,
          like “PointCloudColorsTintDX11”, have to set maincolor to white if don’t want tint.

          Or if you don’t need tint colors, can use the default “PointCloudColorsDX11” material (which uses shader UnityCoder/PointCloudColorsDX11.shader)

          If not solved, email me few screenshots to check, or sample point cloud data. (can also use the ShowHeader data tool to get few lines of data for checking: https://github.com/unitycoder/UnityPointCloudViewer/wiki/Using-ShowHeaderDataHelper-tool )

  • Is it possible and easly get Kinect Point Cloud and convert it to a usable 3D mesh into Unity?
    Is there a tutorial or example for that?
    Thank you.

    • I’d use external tools for that (and then import the ready mesh into unity).. like SceneCT, KinectFusion and other similar ones.

  • Hello,
    i try to change depth of point, can you say me how ?

    • Do you mean size?

      • Depth points

        • I search a method to resize the depth of each points,

          the process can authorize reduce the number of points

          • I’m not exactly sure what is that, do you have a link to such method?.. Or do you mean shader should hide points based on distance to camera or something else..?

          • Yes, when we approched
            the points disappear, and i search a method for fix it

          • Maybe the scale is too small (then camera near clip plane will make them disappear).
            Can you record video or screenshot of whats happening?

  • With few meters
    http://prntscr.com/bv9oik

    When i approched
    http://prntscr.com/bv9otd

    • Ok i see now. Are you using the DX11 viewer or converted them to Meshes?
      If using Meshes, you can use those PointMeshDX11 Shaders founded in PointCloudTools/Materials/Shaders/Extras/ link, with that you can adjust point size,
      but currently it sets the size for all points.. I think you want only the nearby points be larger?

      I’ll test if can make it work.

      • I use DX11 viewer

        • Ok, i think it works now, see instruction on that link ^

          • thank you !
            i will try it tomorrow

          • Thank you mgear, it’s work !

            I try to manage all points in realtime and i have a problem,

            i want send to the “buf_points/buf_colors” shader parameter a array of ComputeBuffer.
            do you know how do that?

            example:

            start for
            create a array of points arround me
            end for
            cloudMaterial.SetBuffer(“buf_Points”, array);

  • I tried to create one material by group of points for manage each group, but i think is the same instance for all.

    Material tempMat = new Material(cloudMaterial);
    MaterialPoints.Add(k, tempMat);

    • Is that for, trying to load multiple clouds?

      • Yes and manage each group in realtime without reload all buffer.

        I managed all points cloud in a box 1mx1mx1m, after i check what box are next to me. and i show it.

        But when a box is already showed, i don’t want reset the buffer.

        • Ok, in BinaryViewerDX11.cs,
          // Find line:
          void OnDisable()
          // Replace with:
          void OnDestroy()

          Then it wont clear the array when disabling gameobject

          • Thank you,

            i managed each points by box ,

            i added in each box a material with shader and manage the buffer by box. When a box have several distance between the camera, i disable it.

            All worked but one thing,

            when i launch application, i have black points in 0,0,0:
            http://prntscr.com/csht40

        • That is interesting idea.. not yet sure why there would be black points, do you get any messages in console (like “skipped … rows, bad data”?). If not, can you send me your example binary or point cloud source file?

  • Nice video of point cloud viewer in action:
    https://www.youtube.com/watch?v=AjuEogkfBGo
    *Note that measurement system is not yet included in the asset store, also they have some custom UI controls added here

  • Hello,

    I just purchased Point Cloud Viewer and Tools today and would like to request a refund.

    I am new to Unity and didn’t realize that this tool will not allow me to import the point cloud as an object in a scene, so I can do walkthroughs of the point cloud in VR.

    Could you please advise me on how to get a refund?

    Thanks and sorry for the inconvenience.

    Brett

    • Hi,

      You can convert point cloud to point meshes (they are actual objects in the scene),
      or use the DX11 viewer (not “real” objects, since its done in the shader, but you can see the points in editor – without playmode, if you enable the commented code in the viewer script, that “execute in editor” part). So both would work with VR walkthrough. (you would need to create colliders though)

      Refunds are done through asset store support, so need to contact them.

  • Hello,
    I’m looking for ways to shoot a character performing a short action with a multi slr camera / kinect setup and then stream it in VR.
    The idea is to have a full 3d animated point cloud of the characters, generated “stitching” together all the camera / kinect takes, and then import the result in Unity, convert it in particles and play it on a VR headset .

    Is it possible with Point Cloud Viewer to import point clouds and convert them in particles, using the Unity particle system, so they could later on collide with other objects in the scene?

    In our team we have some very very basic coding skills, we don’t have any proper developer so any solution that requires real coding skills is not suitable for us.

    Many thanks
    Matteo

    • Yeah, that sounds like a quite complicated task.

      I could add particle converter, as i had tested it long time ago, its not included in current version.. but that wouldn’t be animated. (so you could only convert 1 frame of data at a time)

      Doing the point combining part should be done outside unity, not sure if there are
      proper tools for combining animated point clouds, probably have to combine them 1 frame at a time..

      If it would be just 1 kinect data, that would be bit easier to stream out..

      • Thanks for your quick reply,

        Combining the point clouds should be kinda doable in brekel pro v2 alpha.

        Then I was thinking to bring in Unity the resulting animated point cloud and convert it in particles, maybe after decimating the point cloud a bit to keep performance.

        I’d need then to convert those points in particles following the animation, it could even be that every frame new particles are emitted to match the points positions but they should follow the animation.

        Do you think it’s possible?

        Many thanks for your help
        Matteo

  • Point transparency in relation to distance (DX11 shader)

    First a big thanks, I think point Cloud tools are awsome. I’m using the tools for an experimental/artistic VR documentary (a trailer is here

    600fd27a7d ). This is all done none real-time.

    Here my question, would it be possible to write shader for DX11 which not only displays the point RGB color but also dynamically fades the points out (changing alpha value per point) in relation to the camera position. So if the the camera moves closer, the point gradually vanish instead of just dropping out with the camera near clipping plane.

    Thx, Volker

    • Hi, thanks for the video! yes, fading by distance should be quite simple,
      please send me email so i’ll make some version for you to test out.

      • Great and yes please, would love to try this.
        volkerku at gmail dot com
        Thanks.

      • Another thing interesting to experiment with would be point size in relation to camera (or object) proximity.

  • Hi, I am super happy with this asset is very useful! Congratulation for it!
    I been using the previous version of “Point Cloud Viewer and Tools” and I have a problem with visualization, when I am walking thru the point cloud, the closers points are disperse and the points in the background are dense, I want to ask if this is can be change in the newest version, because I will really like to have the closer point dense rather than the ones that are in the background! If this is can be change I will like to buy the new version too!

    • That should be possible, as i just added extra shader for scaling out points when they come near to camera (instead of suddenly disappearing in the camera near clip).. ill need to test a bit and will let you know.

  • the RGB of pts seems not correct in red and green!

    • can you print out few lines of the point cloud data? (just to check how does it looks like)

      • I think I have to check the pts and xyzrgb fornat for the point cloud tools first.
        Cloud you give me the pts and xyzrgb formats? (include the first line in the file)
        Mabey I make the mistake of the formats.

        For example, the pts format:

        1st line: points number
        2dn line:X Y Z R G B
        3rd line:X Y Z R G B
        ……

        Above correct ?

      • I find the reason. The reason is the format. I use the wrong format.

        Thank you for reply for me.

      • HI! mgear:

        3183222
        -1123.46930000 3165.29360000 126.19820000 753 254 254 252
        -1123.46840000 3165.29510000 126.19940000 833 254 254 254
        -1123.45820000 3165.30060000 126.19800000 1073 255 255 253
        -1123.45690000 3165.30180000 126.19860000 1089 254 254 254
        -1123.45560000 3165.30270000 126.19870000 1137 254 254 254
        -1123.45410000 3165.30350000 126.19860000 1137 254 254 254
        -1123.45290000 3165.30480000 126.19930000 1185 254 254 254

        above is my original datas.
        I think the 4rd column is not necessary.

        • that is correct data, X Y Z INTENSITY R G B

          it should work when you select PTS format and load either [x] RGB values or [x] INT values,
          if you select [x] RGB then it skips the intensity field.

          but if it doesnt, you could try converting it to XYZRGB or other supported formats,
          and if possible send me sample file of that .pts that has issues.

        • ahaa, are you using point cloud 2 mesh converter?
          I just founded possible bug there, it doesnt correctly skip Intensity value.
          Should be easy fix, ill check it later this week.

        • here is temporary fix for the .pts mesh converter with intensity bug
          https://github.com/unitycoder/UnityPointCloudViewer/issues/30

  • Is the latest version/any version of this tool compatible with HoloLens?

    I’m interested in converting a point-cloud to a unity-optimized format and displaying them in the HoloLens. Would this be possible?

  • Hi,

    I am not able to use the DX11 materials on the example scene (the editor bar has ). When I assign PointCloudColorSizeByDistance to the GameObjects in the example scene nothing is rendered. Is common problems in this regard?

    • blog stripped the editor bar text out, can you type it again.
      Are you using meshes or the DX11 viewer?

      Does any other material work? like the default “PointCloudColorDX11”

Leave a comment

@unitycoder_com

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.