Mar
19
2014

[Asset Store] Point Cloud Viewer & Tools

unity_point_cloud_viewer

Point Cloud Viewer & Tools for Unity.

Asset Store link: https://assetstore.unity.com/packages/tools/utilities/point-cloud-viewer-and-tools-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


340 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”

  • Is it possible to animate point clouds using this asset? I have a point cloud video (indiviual PLY files in the sequential order). I want to load and render the point clouds in real time at 30 fps. Point clouds may contain 5 – 10 millions points.

    • i have work-in-progress standalone(windows) merge tool for creating animated point cloud from multiple ply files, but its pretty un-tested so far.. if you want to try it, email me so ill send it, or if you can send me your ply data, i can do testing with those to see if it works using real data.

      • I would loved to try this as well. When I tried to convert my dataset to the breaker format, it did not work. I don’t know the exact binary format specs.
        I got a series of xyzrgb txt point cloud data, which i could convert to ply. Basically 30 point-clouds per second of a dance performance.
        volkerku(at)gmail.com

      • Thank you for the reply. Could you please allow me to have a test on the merge tool to animate the point clouds. I have sent you an email in regards to this.

  • Is there a plan to add conversion for animated PCD files, as output from the Zed camera (https://www.stereolabs.com/)?

  • Hi, does this plugin have the ability to load point clouds at game runtime, or do you need to import them from within the Unity editor itself?

    • yes, can also read at runtime (but bit slower compared to that custom format).
      there is example scene included (set full path to point cloud file, click load ui button)

  • is RCP (out of Recap) supported ?
    The plugin does not make meshes out of point clouds to use it ?
    I need it for Infrastructure projects

    Best Regards
    Bodo

    • No .rpc (project) or .rcs (cloud file) support, but if there is some open information about the file format structure, i can take a look.. *ReCap can export .pts apparently so could use that.

      No mesh reconstruction, since there are lots of tools to do that better (outside unity)..
      although its definitely on the “wish list”, but quite many other features to do befor that.

  • Thank you for the reply for the query regarding animating the point clouds (PLY/PCD) using this asset. Could you please allow me to have a test on the merge tool to animate the point clouds. I have sent you an email in regards to this.

  • Thank you very much

  • I’m thinking about purchasing your asset, what’s the max simultaneous point cloud count you’ve had? I’m looking in the region of 100+ clouds.

    And what is the feasibility of having a point grouping tool within your asset? (I know things like recap can do this, but I want to have other models within the scene at the same time).

    Thanks

  • Could you please send me a sample PLY file that could work with your standalone(windows) merge tool for creating animated point cloud from multiple ply files

    varohaj@gmail.com

  • I’m interested to port Point clouds into Unity to build a VR experience of a forest.

    My question is what frame rate can you reach with a VR ready Computer with lets say 10m-20m points with RGB?

    Is it possible to animate the point clouds if converted into point meshes? Does that help the rendering and therefore expand the amount of points to be rendered efficiently?

    Last question even though I guess its a no, but is there a Mac support coming???

    Thanks in advance!

  • Hi Mgear,

    we tested your point cloud tool and are interested in purchasing it. We are seeking for a tool which can work with large data quantities at point clouds ( 75 mio – 2mrd) , but also with good performance (90 FBS +), so the user can also interact in the scene.
    To be sure that it is the right Asset for us I got some questions:

    How large are the data quantities your Tool can load?

    What about the performance? For exampele XX point clouds have a xx FPS in Unity (web, vr, etc.) with xx processor and xx videocard.

    Is the rendering of the point clouds only in the field of view or will it be rendered completely?

    Are there options regarding the point cloud color data. Like loading them with, without or more than one color?

    Do you use ascii or binary files or both are compatible?

    Looking forward to hearing from you
    Slice

    • i’d say anything over 100million is way too slow, if all the points should be visible within view,
      it is much faster to draw when not all points are within view (you can also decrease view distance on camera to help on that)
      *tested on gtx580, gtx970, gtx970m laptop, quadro5000 etc.

      Currently unable to test high point counts in VR (no devices)

      Most import formats are only supporting Ascii files, except LAS importer can read binary.
      https://github.com/unitycoder/UnityPointCloudViewer/wiki/Import-Formats

      For viewing there are 2 options to use,
      – DX11 viewer, can currently draw more points than mesh version
      – Mesh version, in unity 2017.x the added 32bit mesh index buffer improves performance for large meshes (previously single mesh could have 64k vertices only, so there are lots of gameobjects, but in 2017.x can have single mesh object with millions of points, better performance, and you can then manually control those meshes, to either hide by distance etc)
      – There is no dynamic LOD or Quadtrees to optimize point drawing, so all points are always drawn, although unity automatically optimizes it with frustum culling, so large cloud is faster to view, if not all points are inside view.

      But in general, you would have performance issues with that large amounts of points and VR added to that..

      here is example video of interaction that some user has done (UI is not provided in the package, just point picking only, returns point position closest to mouse click)

  • Hi, I’m looking to possibly purchase this but wondered why you state that this is not suitable for games and just for viewing?

    Do you know if this asset would also enable the easy incorporation of animated, plys, e.g. drawing a new ply scan frame by frame?

    Many thanks

    • Its just a warning that people dont except to build some unlimited point cloud worlds..:)
      i mean of course you could use this in a game some ways, but not really so useful right now.

      You can load new scans, or replace existing scan, or feed your own point data array into the viewer. That could work for a VR experience, where you jump from scan point to another.

      Or you can convert point clouds to standard unity meshes (with point rendering enabled),
      so those assets you can of course instantiate/destroy anyway you want.

      animated ply frames:
      there is some test version to convert animated plys into animated point cloud,
      but it could be quite buggy still, https://www.dropbox.com/s/9ismhttkpgsx1js/uPointCloudTools2b.zip?dl=0

      you could convert them separately into meshes, or dx11 viewer binary files, and load them yourself one by one.

      • Thanks ever so much for the reply. I just dropped you an email addressing all of this!

  • I am using the plugin and have imported some clouds as mesh and lined them all up nicely for viewing in google cardboard app. App works great on Android and on iOS with iPhone 6 and earlier. However, with iPhone 7 and later the cloud is not rendering. Graphics API is set to OpenGL. If I try metal then it renders, but all points are HUGE and you cannot see a thing clearly. Have tried using different materials and shaders on the mesh objects, but nothing renders on A10 and A11 devices.

    • sounds like a bug then, unfortunately i only have access to iphone6 for testing..

      If you use default unity particle shader on that mesh, does that work on both APIs?
      (doesnt support size, but that could be easy to add then)

      • Yes, I have tried all different shaders/materials and nothing changes the results.

        Here is the effect on Metal (not good): https://www.dropbox.com/s/r6cjl05wmp3fx4d/point_cloud_metal.png?dl=0

        Here is the effect on OpenGL with A10 or A11 processor (mesh not visible): https://www.dropbox.com/s/djiift90ah8p4xx/point_cloud_gles_A10.png?dl=0

        Here is effect on A9 (as expected): https://www.dropbox.com/s/8znl6xxkxry9702/point_cloud_gles_A9.png?dl=0

        These are all the same build, same scene. Unity cube has the same material as the point cloud.

        • which unity version you are using by the way? and ios version?
          do you get any warnings in unity or in xcode when compiling/playing in device?
          in the meanwhile, you could report it as a bug with unity bug reporter, just in case it is..
          *or actually if you confirm that the default unity Particles/Additive doesnt work either, then ill submit them those sample files.

          • I updated to the latest version of Unity and tested on iOS 10 and 11.

            One of my colleagues asked how many pixels a “point” renders at? And if there was any way to control this? Just in case that points are that small on the high end retina screens that they are actually just not visible?

        • by default the value probably is less than 1, which could make them too small (apparently 1 should be 1 pixel in ios devices), but in the shader-material there is that size option, so i doubt thats the issue..

          next week i can do some testing with iphone 6+, going to update ios to that also,
          to check those metal/opengl differences too.

        • Hi, got reply from unity that it works for them..

          (using these devices, iPad mini 4 iOS 9.2.1 A8
          iPad Pro 10.5 iOS 10.3.3 A10X
          iPhone 7 iOS 11.0 A10
          iPhone 8 iOS 11.0 A11)

          So if possible, can you submit your project with unity bug reporter,
          and refer “Case 1004756” in the report so they could check?

  • Hello.
    Feature request:
    Render multiple clouds at a time. I would need different clouds to have different material so they have different thickness.
    In unity 2018 beta yes does run faster but there is like a kick from time to time.

    • Multiple clouds is possible, there is example scene for loading multiple clouds (and they could use different materials).

      Ill need to check on 2018 beta more, if you happen to have profiler open can email me screenshot if it shows some spike there. (or even report as a bug if it looks like unity is doing something strange)

      • OH! but example isnt like one or the other cloud?! like is it possible to have 2 clouds at a time??!!

        I’ll try to do the profiler thing.

        • yes, 2 or more separate clouds can be viewed with DX11 viewer (or of course as meshes).

          Other simple way to test multiple clouds:
          duplicate the “@BinaryViewer” gameobject, set separate material and path to the cloud file.

          • I already did duplicate the binary viewer but that does not work. May be is a 2018 version issue.

            This is why after checking the multiple clouds you suggested I was getting mad like is just an instantiation of the prefab and value asign and is working and if I do so manually is not.

            So I came to the conclusion that if you set both clouds to load at start (or same time) wont work. (tested to have the script below running on Start() for both viewers.

            so Did this script attached to one binary viewer while the other does load at start and it works:

            using UnityEngine;

            public class LoadCloud : MonoBehaviour {

            public Material pointCloudMaterial;

            // Use this for initialization
            void Start () {
            Invoke(“cloudLoad”, 1f);

            }

            void cloudLoad() {
            var pc = gameObject.GetComponent();
            pc.useThreading = true;
            pc.cloudMaterial = new Material(pointCloudMaterial);
            pc.enabled = true;
            pc.CallReadPointCloudThreaded();
            }

            }

        • ok, that sounds like the multithreading might be causing that issue..

  • Feature request:
    I would love to see added a matte shadow shader.

    This way I could add a plane as ground and realtime shadows would be projected over that invisible plane and avobe the point cloud ground .

    The closest I got is this:
    https://github.com/keijiro/ShadowDrawer
    Works on 2017.3 but not on 2018.

    With that shader point clouds under the plane are not rendered and only geometry and I’ve floating shadows so almost but not there :\

    • so you have a point cloud terrain,
      and basically would like them to receive shadows in some way? (to darken them)

      • Yes, lets say I’ve a terrain, and I whant to have a car walking over it (with invisible collision mesh). That same collision mesh could act as a shadow receiver surface but just the shadows would be visible. Shadows coming from a character or a vehicle. In case point size is big you could have a separate shadow receiving invisible mesh shifted up.

        I’ve just tested making a road surface transparent looking for some kind of blending betwen mesh road and poitn cloud road and as I set transparent it gets invisible and points are rendered on top. Playing with renderQueue values seems to have no effect :\

  • Hi,

    I am trying to use your asset with my LAS file. I have followed all the steps as outlined in the PDF tutorial but still there are many problems:
    1. the frame rate is about 1 fps even though the model has 19 million points which according to the tutorial is within the limit (RGB disabled)
    2. the model doesn’t seem to be rendering correctly, it just renders a long thin line instead of the actual model.

    I have attached photos of how I have gone about it. also I have attached a link to the project itself. you can find the LAS file in Assets/PointCloudTool/SampleData. the file is called File1.

    Link to the images:
    https://ibb.co/nEsyrc
    https://ibb.co/kScnjx
    https://ibb.co/h7XL4x
    https://ibb.co/k4EBBc

    Link to the project:

    Thanks

    • ill check the file.

      fps drop is probably because you have the gameobject selected?
      that one is fixed in next build, or i can email you instructions to change 2 lines:
      https://github.com/unitycoder/UnityPointCloudViewer/issues/38

    • it seems that CloudCompare also fails to read the las file.. probably its missing some data or has some extra data? (also .las files should always contain rgb data, my converter tries to read rgb data so there it fails then)

      You could try saving your original data to las with rgb, or to some other supported format
      https://github.com/unitycoder/UnityPointCloudViewer/wiki/Import-Formats

      • Thanks a lot for looking into this. I have used lidarview.com to view the file and it seems like it can render it. although I am not sure if that’s exactly how the data is supposed to look like (the models are from one of our clients so I am not quite sure). I will have a talk with them and relay to them the information you provided and see if converting the data will help.

  • Hi

    I would like to know if the implementation done is presented in any cientific paper or was published as a general study in any conference.

    Thank you!

    • no.. its pretty much just using default / builtin unity features. (other than the custom import formats)

  • Improvements:
    Per my review, here are some improvements that could be done:
    1 – I am running Unity 2017.3, which now supports 32 bit meshes, so I made adjustments to 3 lines of code to make that work. Pretty easy. (2 related to the menu, since it sets that cap at 65k, and 1 to the mesh creation, setting the index format to 32 bit.

    2 – Global illumination doesn’t support vertex light maps, but since the objects are static, that is checked by default. I added one line of code in the mesh creation to disable static light maps only for the clouds. Which gets ride of the error messages constantly happening, even when not in play mode.

    3 – for some reason, the the code counts the lines, even if there is a header with the point count. I would prefer to just use that. Then it processes them, which doubles the time of inserting. The bigger issue here is that it creates a mesh with the number of vertexes you picked in the menu, not the cloud file. Example, 3k points, has a mesh of 4 billion points, most of which are at 0,0,0. Which kills performance. It would also be good to just process the vertexes as you count the lines. Unless the person wants to sort them.

    4 – The splitting of meshes is not that important, at least to me. Free open source programs like CloudCompare do it much better and faster. I’ll probably go through and scratch those options out.

    Those should help. I’m probably going to make those changes myself, email me if you want to get a copy of the code. (developer only)

    • thanks!

      1) yes, this will be added in the coming updates
      2) yes, have noticed that also, i can disable static light map box in next update
      3) this depends on the selected import format or file extension (ply, cgo, pts & pcd formats should use the linecount). Pointcount taken from given max value, yes.. previously not really issue since 65k was so low value that any cloud would have more than that, but will need to modify this when used with 32bit buffers.
      4) is this related to (1) ?

      ill send you email, would certainly save me some time if you have already done those! (currently finalizing few other fixes and updates before pushing to store)

  • How can i convert my .xyz file into a mesh while keeping the colour? This is to be imported into a hololens app

    • use pointcloud2mesh converter, with [x] read rgb enabled, so if your xyz file contains RGB data, then it would be transferred to the mesh.

      and need to use some shader that supports vertex colors, those mesh shader materials that are included will do that. (also unity particle materials would work)

  • Is the .E57 file format currently supported?
    If it does not work, will I know if it will be supported in the future?

  • I have a few questions.

    1. The .las file is not yet supported by the runtime viewer,
         What is the approximate date of support?
    2. I tried to load the las file after changing it to bin because of issue # 1
         You could not load bin files larger than 2gb.
         Can I get a guide if I have a good solution?

    Thank you.

    • 1. no specific date.. but if its important for your project, let me know (since the code for .las converting is already there, so it wouldn’t be too much work to use it in runtimeviewer, but this would be after current version gets released to store, which could take several weeks still..)

      2. large file support for animated .bin files and .pcap files is coming in the next update, so after that i can have a look of using that in the static .bin files too (although then c#’s max array size comes up..).
      *So for now, workarounds could be: splitting the cloud to multiple dx11 viewers, or using 32bit meshes..(32bit bit mesh support is not in store version yet, you can email me with order number so i can send latest version)

  • Hi. I just bought your assets today and was trying to follow up your tutorials.

    I got a problem with it. When I press the play button it shows up black screen. I fulfilled the three thing. what you said in pdf in case of the black screen. What could be possible problem within this?

    • Can you email me screenshot (showing the full editor view, in case i notice anything there)

      Does that happen with the example scene and data also?
      And try setting camera background color to gray, in case the point colors are somehow drawn in black.

      • Thanks for reply! The asset is awesome and sorry I am just a beginner experimenting unity… so didn’t know how to explain things in a proper way.

        Actually I had struggled with it for last few hours and finally it works right now. The problem was because of the field where .bin was placed in.

        And I still have some question.

        is it possible to import texture into the .bin file? because in game, I can see only black points but the original file(.xyz file) had some sort of a texture on it.

        And if I want to place the cloud on a certain position, how could I achieve it? Sorry for silly questions.

        Thanks a lot
        Bests,

        • ok nice!
          for importing colors, need to enable [x] read rgb in the converter, and that should do it. (and to use dx11 material/shader which supports colors)

          which format is your original data?

          offsetting data:
          in the current asset store version, need to use the [x] manual offset during conversion, and add some value to that..
          in the next update, dx11 viewer uses gameobject transform position as an offset too.

          • Oh that will be great update!

            I am using .xyz but gonna try .las file as well. Thanks for your kind

          • One more question.. I want to solve this problem.

            It does work importing .bin file in empty project that I newly created. But when importing the cloud into my personal project, it doesn’t work. The project is using light weight pipeline, postprocessing, shader graph and two different cameras. is it because of those setting? tried to figure out the reason for few days..

        • hdrp/light weight pipeline is not supported yet for the dx11 viewer.
          but if you use the mesh converter, those should work.

          • when I convert the .bin into mesh through your converter. it says that the input string was not in the correct format

            FormatException: Input string was not in the correct format
            System.Int32.Parse (System.String s) (at/Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Int32.cs:629)……..

            and also same happens in converting with Enable [x] RGB

        • can you copy few lines from your xyz file? (or share it with email)
          it should look something like:
          1234.123412 45345.123 34654.3123 155 53 23

          format is:
          float float float int int int

          can also use the
          Window/PointCloudTools/ShowHeaderDataHelper – tool to print out those lines

  • Hi. it works really nice. I have one question.

    when I convert a pointcloud file to mesh through the conversion, the resulting mesh is somehow flipped for some reason. how can I fix this?

    • if you enable “[x] Flip Y & Z values” in the converter window, does that help?

  • Yeah Thanks.

    It works everything now. I am building App with Occulus at the moment but I don’t see anything in it. what should I check? I already put all output in StreamingAssets.

    • So it works in editor? Do you mean oculus rift or the mobile oculus go? (mobile wouldnt work with the dx11 viewer)

      Then check player.log for possible error messages, and test few different shaders,
      because some of those might not work in VR, although it should still display on 1 eye though.

  • When I try to launch a build from another computer, I see in the player log that the point cloud is still trying to be accessed at the original file path used during authoring. Shouldn’t it be accessed within the build file structure? what am I doing wrong? thanks.

    • if you are using full path, as in c:/myfiles/reallybigcloud.bin it should load from there,
      if you use filename only, as in stuff/reallybigcloud.bin , it tries to load from ..yourbuildfolder/build_Data/StreamingAssets/stuff/reallybigcloud.bin

  • Is it possible to export a complete exe with the Binary Viewer?
    as the binary viewer seems to run a lot faster than meshing the point clouds.

    • you can build exe that views those binary files from external folder (like StreamingAssets)
      but need to convert your clouds into those .bin files in editor still.

      or if you want to convert your pointcloud files to .bin files at runtime,
      i just added that in the todo list here,
      https://github.com/unitycoder/UnityPointCloudViewer/issues/51

  • Hi. I turned here again and appreciate your help a lot.

    I kept doing things with your asset and went through the videoextruder which you provided

    and for now I got a big question.
    How can I build a game streaming a camera from laptop? If I build a script for converter going through from camera to ogv file is it hypothetically possible to represent real-time video extrusion?

    I am figuring out how to achieve this. could you please give me any advice for this?
    Thanks!

  • I am trying to remove the point cloud from one of the cameras in my scene using cullingmask and layers. However I can’t seem to get this work. Is the point cloud actually on the layer assigned to the BinaryViewer?

    Will removing the point cloud from a camera improve performance in a multi-camera scene?

    • in the recent versions, there is option to [x] render only in main camera,
      layers/culling masks wont help at the moment..

      yes, it would improve performance, since each camera would render the whole cloud again.

  • Thanks for the great tool, I got it working really well in VR with unity 2017.3
    However I’m having trouble viewing it with the LWRP in unity 2018.3.1
    The cloud shows up in the scene but isn’t visible through the camera.
    Any tips would be appreciated. Thanks

    • HDRP / LWRP is not supported in the DX11 version yet.. (so the issue is that the OnRenderObject() is not getting called, and last year that i checked, there wasnt any easy callback to do that.. only editor scene view seems to call it still though).

      You could try using the mesh version.

    • well now that i had a 2nd look, it seems to be bit easier now.

      Got DX11 viewer working with LWRP (might have some issues still, but at least points were visible)
      ill need to look into it a bit more, but if you want to beta-test, email me your order number (visible on your emails from asset store purchases) and note about this lwrp.

      • Sorry, the project i’m working on is too short for beta testing.
        It seems to be working ok in 2019.1.2f1 with a minor change in these scripts:
        PointCloudViewerDX11.cs
        WebplayerViewerDX11.cs
        RuntimeViewerDX11.cs

        //Graphics.DrawProcedural(MeshTopology.Points, totalPoints, instanceCount);
        Graphics.DrawProceduralNow(MeshTopology.Points, totalPoints, instanceCount);

  • Hi, I have RGB clouds with around 6 million points working well in VR. The one problem i have is when they are loading there is a spike in CPU usage and the VR load screen pops up.

    Profiler shows the spike is from – mainThread.Executer() [Coroutine: MoveNext]

    Do you have any tips on how to load the cloud slower and avoid these spikes?

    Cheers

    • it seems to happen in computerbuffer.setdata, which cannot be done inside another thread.. so there might not be easy solutions/workarounds..

      splitting cloud into smaller parts might work, and then using multiple viewers, which are loaded one by one.

      or did you try using the mesh converter version? then there is no data loading from this plugin side.

      • Rats, I was crossing my fingers for an easy fix.

        Thanks for your help

        • docs seem to mention that it supports nativearray, which might indicate that jobs (threads) can set it.. ill need to look into that later.

  • This plugin used to work well in my app but since revisiting after a couple months, something seems to have changed. It takes a lot longer for the app to load up. I am also using the Rewired plugin to manage a racing wheel. But it appears when I have the point cloud plugin enabled, the Rewired plugin does not work. When I disable the point cloud plugin, Rewired works. Is there an issue with recent Unity or Windows updates?

    • any error messages in console (or player.log)? which unity version?
      (unable to test rewired.. but sounds strange if they affect each other that way..)

      check profiler also (to see whats slowing it down), or email me some test project where it happens.

  • new standalone commandline converter is available (ply to v2 binary)
    https://forum.unity.com/threads/released-point-cloud-viewer-tools.240536/page-8#post-5085605

  • Hi,

    I bought your plugin and would like to know how to display pointclouds from C# script editor.

    I want to change this loop to something that I could just display a point cloud:

    foreach (var p in this.faroContext.Cloud)
    {
    GameObject cube = GameObject.CreatePrimitive(PrimitiveType.Cube);
    cube.transform.position = p.Location.ToHost();
    cube.transform.localScale = new Vector3(0.002f, 0.002f, 0.002f);
    cube.transform.parent = PointCloud.transform;
    Destroy(cube.GetComponent());

    }

  • Hi! This pointcloud library looks great. Had a couple of questions though. Does it come with the source? And if so, is it structured such that it would be easily extendable? I’m specifically looking into manipulating individual points from the pointcloud for things like interaction and animation. Thanks!

  • Does this tool include a point mesh to Triangle Mesh converter?

  • I am having an issue using Feature: (V3) Load Tiles On Demand shaders and VR. They only pop up when I am looking a certain direction and have my hands down in VR. also, sometimes when i stay looking in a direction where i can see the point cloud, if I move my hands the point cloud disappears as well. Is there a way to fix this? I want to use the v3 features because it is a very large point cloud

    It works prefect in non-vr though.

    Thanks

  • Hello, I am loving the tool, but am experiencing a bug. If I load one of the built in examples in the demo scenes, then switch windows to another program, then switch back to Unity, the point cloud disappears. This happens on Windows 10 and Unity version 2019.2.20f1 . Any help would be greatly appreciated.

    • i think its related to this,
      https://forum.unity.com/threads/is-this-a-bug-in-unity.710510/#post-4749092

      if yes, can you test it by adding this code into the viewer script:
      void OnApplicationFocus(bool focused)
      {
      Debug.Log(“focus = “+focused);
      if (focused) InitDX11Buffers();
      }

      i havent managed to reproduce it (alt tab doesnt cause missing points),
      does it happen with any alt tab always, or with some certain programs?
      Check if [x] run in background is not enabled in Player Settings (any difference if set enabled?)

      • Yes, re-initializing the buffers on application focus worked! If it helps for the future, it always happened with alt tab and run in background was enabled. Thank you so much!

        • Update! This code also worked for me:

          if (focused)
          {
          //InitDX11Buffers();
          cloudMaterial.SetBuffer(“buf_Points”, bufferPoints);
          cloudMaterial.SetBuffer(“buf_Colors”, bufferColors);
          }

          • thanks, thats good to know!

  • Hi

    Where could i get a copy of the older version of the tools (Prior to Feb update). I have a VR software which needs the older version of the converter for now (until we update it) and just after the install files.

    Thanks in advance.
    Dave

    • emailed v2.20 (without the example files, too big to send easily)

      *or if your project is in version control, and had the plugin inside, you could try downloading snapshot from older version.

  • Hello
    I want to use your Point cloud viewer unity plugin.

    My requirement
    -load runtime point clouds and show 3d model inside unity.
    -point clouds are photorealistic recorded from faro device.
    -need to add/edit point cloud and resave .

    Your plugin give all above features.
    Please respond asap.

    • 1) Yes, runtime viewer supports these formats https://github.com/unitycoder/UnityPointCloudViewer/wiki/Import-Formats#runtime-viewer-pc-only
      2) Looks like regular point cloud viewers (but note, no similar feature like potree for merging nearby points). Few examples https://github.com/unitycoder/UnityPointCloudViewer/wiki/Shaders
      3) No editing tools included (in editor and not runtime either), but you can access the point arrays (vector3’s), if you need to save them into your own format, or to my custom binary formats https://github.com/unitycoder/UnityPointCloudViewer/wiki/Binary-File-Format-Structure , but requires making your own Save and Edit features

      • Thank you !
        For your quick reply.

        May i know if any other plugin and resources are which can provide the below feature for mobile device.
        -point cloud view on mobile device may only high end model.
        -edit at runtime and re-save again into point clouds.

        • 1) Mobile, only point meshes work, and limited amount like below 10million (on new high end devices, Oculus quest could handle 5-6million with monoscope rendering or so).. It works in lower end devices also, but need to limit view distance and or reduce point count before converting to point meshes.
          2) I do not know such plugins, but its not too difficult to make (depending what kind of edit operations you need to do)

  • Good morning!

    I recently switched my platform from the HDRP to the URP for my VR setup. when I bring in the package I do not get the point convertor drop down under windows like I did before?
    Is this not compatible with the URP?

    • Hi, is there any errors in console? which unity version? render pipeline shouldnt matter for the converter menu.. but for rendering it does, HDRP/URP is not supported, but it could be easy to make it work, just need to call the OnRenderObject() in the viewer from your own helper script (within some camera pass/callback, because OnRenderObject() is no longer called in renderpipelines so nothing gets drawn).
      The mesh version might work as is, since they are regular unity meshes, except not sure if shaders require some extra tags.)

      *URP/HDRP support is certainly coming, just been waiting for them to stabilize.. after seeing all the horror from other devs trying support renderpipelines in their assets, with constant breaking changes.

    • also seems like URP already supports OnRenderObject(), so that means the DX11 viewer seems to work as is (although commandbuffer option didnt seem to work out of the box)
      https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@8.0/manual/universalrp-builtin-feature-comparison.html

  • Hi
    Is Point Cloud Viewer and Tools compatible with WebGL compilation?
    Trying to assess this I’m searching through the asset a loading method which works directly on byte[] without using file access (non allowed in webgl).
    Is it feasible by simply replacing the ReadAllBytes function with a custom streaming loader on the data array?

    Thank you

    • Might not work.. but actually havent checked in a long time since webgl1.0.. I’ll reply here after i test a bit. (to see what type of shaders webgl would support)

      for point mesh rendering there used to be this issue
      https://issuetracker.unity3d.com/issues/windows-meshtopology-dot-point-geometry-is-not-displaying-in-webgl

    • tested webgl builds on 2018.4.8f1
      – the mobile demo scene works as is (its using point meshes)
      – the binary viewer doesnt work, because structure buffers are not supported in shader

      so i would probably try:
      – read pointcloud data with unitywebrequest
      – push that data into point mesh vertices
      – and use the android mobile point cloud shader (it supports point size)

      i can try to add that as a example scene in next update if it works.

      • Hi!
        On webgl build on 2018.2 I am not able to change point size. Using mesh and android shader.
        Is it even possible?

        • it should work in the build (but not in the editor), can you test?

          • yes it is working in the build.👍

  • I bought it today.
    How can I parsing the .las file?

  • Hi. I purchased your asset off Unity and am trying to import a LiDAR scan from a local theater. I have tested with .laz, .las, and .ply formats using GeoSLAM Draw to export.

    The plugin crashes my editor each time I try and read the map as a mesh. RGB, intensity, and normal values are set to ‘off’. Scale multiplier is 0.0001. The smallest map I tested with is 85k points, and even it crashes.

    Please let me know why this plugin is crashing Unity every single time or we will have to refund it as it does not work. Thank you for your time.

    • Hi, have not heard similar crash reports (except one another today, unless that was you in the email), if you can email me to share some more info:
      – unity version
      – possibly small sample file that fails (or project)
      – or unity editor.log file (it might say some crash info, https://docs.unity3d.com/Manual/LogFiles.html)
      – note: if you have Orthographic camera, that can cause unity hangs (due to billboard shader fails to calculate size)

      • Hi, the email was my COO, I am the CTO. This is preventing progress on our current project, so I will provide the .las map via email and the Unity version along with that.

  • Hi,

    I try to launch the “PointCloud-Runtime-Or-Load-Cache” with the samplePTS file example.
    There is an error : “Input string was not in a correct format”.

    My PTS file return the sample error

    • Aha, one possible issue:
      runtime loader is missing the comma/dot fixes (that are needed if use unity 2019.x or later)
      if you can email me, i’ll send you a test update file.

  • Hi there,

    I’m using your Point Cloud Tool and I am running into some problems when trying to capture single images along a camera path to make a video.

    I am doing landscape visualization and manipulation. Everything worked out well when I loaded my LiDAR ALS scans (.las) format into Unity (Version 2019.4.13f1) and I could get my images to make a video (1).

    Now I manipulated the scans by cutting parts away in CloudCompare and prepared an ObjectLibary so I could fill the wholes and design my desired landscape (2).

    But now when I try to Play the camera I get the error:

    Failed getting triangles. Submesh topology is lines or points.
    UnityEditor.Build.BuildPipelineInterfaces:OnSceneProcess(Scene, BuildReport)

    Strange is, only some of the meshes are not displayed while others are (3). They are no different, I just duplicated them to manipulate the cornfields..

    Do you have an idea what is going wrong here?

    Cheers, Manuel

  • Hello Team behind the Point Cloud Viewer for Unity …

    will I be able to watch as well a PLY Stream by your sofware ?

    I mean a Multi Sensor recorded volumetric stream of an room and the movement inside of that room as an PLY Stream …

    Thx

    Martn

  • hi mgear!

    thanks for all this amazing work!

    I’ve read in a post of yours from 2016 that changing point size by distance was/is only available in DX11. As I am working with meshes I’d like to know if in the meantime this had been made possible for meshes too?

    Many thanks
    Manuel

    • and maybe a follow-up as well:

      I tried to change the point size for all points with the “PointCloudMeshColorSize” shader but it does not change anything. (Yes, I have unchecked “Auto Graphics API for Windows” under project settings –> player –> other settings.)

      If I use the other mesh renderers you suggested here (e.g. “PointMeshSizeDX11QuadOffset”) I can adjust the point size, but then Points in the background occur less dense. Like if I just use the “PointCloudMeshColor” renderer with standard point size the background is like perfect. Nicely dense and looks like a photograph =)

      • for DX11, need to use those MeshPointsDX11* materials, but yeah in the non-dx11 version size is pixel size in screen, while in DX11 its world space size.. i’ll add something for size by distance. (email or pm in forums to test it once its ready).

        • Ok thank you I’d be happy to test this!

          And I am sorry if this sounds stupid, I am quite new to the world of points and unity and:

          When talking about dx11 version and non dx11 version are you talking about the (point cloud viewer) PC to binary converter (point cloud viewer) and the PC to mesh converter of your tool or are we talking about that “Auto Graphics API for windows” checkbox I mentioned above.

          Because if its the latter this would mean that I should be able to use the “SizeByDistance” renderer for the meshes if I uncheck that setting right?

          Appologies for missing basic knowledge… ^^

          • yes, on desktop machines Auto Graphics api uses DX11.

            On desktop, i believe OpenGL would support that pointsize (so could work on mac’s), but on PC would have to start unity with special commandline parameter, to force opengl: “-force-glcore”
            https://docs.unity3d.com/Manual/CommandLineArguments.html

            So because of that, in regular pc desktop, with auto graphics api (=DX11) then requires special shaders to draw point as a billboard Quad (always camera facing rectangle).

            ill post here once i have something ready to test (and will include in next update of course)

          • Many thanks for your explanation!!

            Hmm okay, I tried the SizeByDistance shader with Auto Graphics api disabled but this did not work either. As I understood when disabled auto graphics api is disabled it operates by dx9 or the older version by default?
            I tried with dx12 (experimental) as well, also no result.

            Is there another reason why it does not work or am I just missing the point?

            Anyway I’ll look forward to the thing for testing =)

            cheers

          • I think dx9 was removed in recent unity version, after 5.x perhaps?
            (didnt have time to work on this yet, but ill post the info here then)

  • HI I bought the plugin but no format seems to be converted or previewed, clouds converted from cloud compare. the original cloud came from recap. please help is there something im doing wrong?
    thank you

    • some things to check: (or, if you can email me the file to test)
      is there any error in console during conversion or during play mode/loading?
      are you in a windows build target and dx11?
      are you converting to DX11 binary or with mesh converter?

  • Hi mgear,

    Awesome work! I have a few questions about the asset, hopefully, you could answer them. Is it possible to import during runtime? Can I detect collisions with a raycast? Is it possible to remap the colors of the points according to the distance to some point (like a heat map)?

    Thanks,

    Victorino Ogura

    • can import these formats at runtime:
      https://github.com/unitycoder/UnityPointCloudViewer/wiki/Import-Formats#runtime-importer

      but currently point picking is slower on the runtime version, but its possible to call SelectClosestPoint() with Input.mousePosition parameter.

      *also runtime viewer is desktop only (windows pc, not tested on mac/linux)

      remap colors:
      possible, if modify some of the included shaders (it should be simple in this case, if its single vector3 point that you want to check distance with and you give some max distance value also (to remap range into 0-1, so that easily can pick color within that range), i can help with that)

      • Hi, I’ve just bought your asset. Could you help me with the shaders and how can I compile to web?

        • For webgl, need to use the mesh converter.
          (DX11 version is not supported, neither is loading from binary files)

          if you need to load dynamic point cloud data inside webgl,
          would need to create your own loader (for example load raw vector3 position and color data)
          then build point meshes from that data.. (but on example included at the moment, i’ll try to add)

  • Hi Mgear!

    You guy have done very well and create a good tool for unity. But there some problem cause the tool not working.
    When I import small files into unity, it’s look good but when I import file that have the point count to billion each file, I used “Point Cloud to Mesh” option that in the documentation. I checked create LOD for the point cloud, after convert it mesh, the game feel extremely laggy, also in the editor.
    I saw that you guy have an example sceen that have 10 billion points on youtube, can you support me with this project? I have stuck for this step about a week but not have any result and solution that can help me with this.

    Khanh (Mr.)
    Nguyen Dang Truong Khanh

  • Hi,

    Do you know if your plugin support viewing point clouds in the Hololens 2 via MRTK?

    Cheers

    • replied in discord, but copying here for info:
      “not really tested, but the mesh version should work (since its regular mesh gameobjects, using point rendering), the “main” binary viewer doesnt work, since it uses threading classes : https://github.com/unitycoder/UnityPointCloudViewer/issues/25
      there is easy refunds in asset store, so i guess you could test and let me know if the mesh version works. (i’d suggest importing the package on separate project, process point cloud into meshes there, then export those meshes to your hololens project)”

  • I am looking for a plugin who can import las/laz file in runtime. I was reading thought the comments and saw someone already requested it (with a reply that you might start working on it).

    Is it already part of the plugin? Or is there a workaround? (Maybe the command line tool can be included to the unity project?) That would be awesome.

    Thanks!
    Sascha de Waal

  • Hi, great asset, thanks! Any chance of getting an Eye Dome Lighting (EDL) shader added?

  • Hi,can i get some advice?
    I made a point cloud viewer, my point cloud can be refresh with 30 FPS,then I want to endow the point cloud with the image data from the video stream.
    I try to use a video player to play video,but i can’t fit the point cloud UV so it looks like playing different colors.
    So is there any way to calculate the point cloud UV used to play the video?
    Thanks!

    • so,
      you want to project video into whole point cloud? (like bounds of the point cloud would be the full texture)

      or each point would show full video texture?

      • I wanna project video into whole point cloud.

        Actually, I have a lidar to gennerate point cloud data,then I try to add a real camera to work with my lidar so i can get the image info witch lidar can not generate.

        The end result is a real-time point cloud with real color information.

        I finished the generation and update part of the point cloud, but I had no idea to apply the image part of the point cloud

        Mainly I don’t know how to create the UV of the point cloud correctly so that it can display the video image correctly.

      • Or there’s another way i think (Since I’m not familiar with Shader, I’m not sure is this a viable solution)

        Since the point cloud is generated from the lidar, so the point cloud has a relative position.

        So according to this relative position, can we directly give the corresponding color according to the relative position of points through shader without UV?

        • so you have video feed of the lidar (same position as lidar),
          but point clouds only have intensity values?

          yeah i think you can then calculate UV coordinates from your XYZ,
          something like this https://gamedev.stackexchange.com/questions/135108/converting-back-and-forth-between-spherical-and-cartesian-coordinates-in-glsl

          • I have no video feed yet,I’m trying to add this function.my lidar only feed back postion and intensity values.

            YES,I try to recalculate the UV of the point cloud, although the current display is still wrong, but it proves that it is possible to display video on a point cloud if you calculate the right UV!

            thanks a lot!

  • Hi,it’s me again. Is it possible to convert point cloud from vertex mesh to triangle mesh?

    To be specific,we now have some dynamic point clouds from lidar scans, and i wanna try to use this vertices to triangles.

    In my imagination,the hardest part is how do i find the right triangular index for these point clouds.

    So does this idea work? Any suggestions if possible?If not, what is the biggest obstacle for a dynamic point cloud to do this?

  • Hello, I’d like to say thank you for making this point cloud.
    Before I buy your Point Cloud Viewer and Tools, I’d like to make sure that I really need to build Webgl file by Point Cloud Viewer.
    I mean that I want to see my point cloud source file on Webgl by using your Point Cloud Viewer and Tools.
    is it possible to build the source by Webgl or Is there any way to build webgl?
    please reply me.

    thanks a lot!

    • webgl support is quite limited, you can currently only use point meshes there.
      so cannot have large clouds, and loading external data would require adding few scripts to handle that yourself. (i can help with that though, its just a matter of loading data and feeding it into meshes, or could use asset bundles of course, but those need to be generated within unity editor first).
      simple webgl example here: https://github.com/unitycoder/UnityPointCloudViewer/wiki/Examples-&-Demos

  • Hey,

    I am using this to load point clouds in dynamically and have had to fix a couple things:

    PointCloudManager.cs from line 126 Adding Mathf.Floor and Ceil to the min and max values. This is required as SX etc at line 254 are ints. BoxIndex was returning larger than array size.

    PointCloudViewerDS11.cs UpdatePointData() Need to find and set cloudBounds.

    Cheers

    • ok thanks! i’ll add those to next update.

  • Hello,
    Your asset looks great, congrats. I’m on the verge of purchasing it knowing that I already have almost everything I need. What I still miss are good shaders for rendering colored vertices (I use meshes) on iOS , WebGL and UWP (Hololens 2) . Currently with what I have it’s either just point or cubes renderings and it looks OK but not great. Would your custom shaders work on those platforms and would they give more controls (point size etc) . Thanks !

    • there are ios and webgl shader (for mesh) with point size, *although i think they are opengl, not sure if ios metal works, there is one metal shader for desktop mac..

      i havent tested on hololens, so not sure what works there.. (but i have geometry billboard shaders for DX11, and DX9 supported point size shaders)

      btw. the asset store 50% sale ends april 29, so you could still buy the plugin, and if it doesn’t work, ask refund (unity accepts all refund requests)

  • Hello,

    I need to show an point cloud object (.ply) in a virtual reality scene and apply various lighting conditions on it.

    Would such a thing be possible with your plugin ?

    • Quite limited, there are couple shaders included for mesh pointclouds, to use Directional light, but not really nice looking or that useful..(and only for builtin renderpipeline)

      I think your best option would be to check if the pcx viewer has some VFX extension.

  • Hi,
    I created Random Cloud with New Format V2 (.ucpc) from Create test binary cloud and I’m testing it to make it Mesh, but I failed
    How do I create a mesh

  • Good afternoon, I faced a problem that the program converts las 1.4 file to bin file with 0 points. At the same time following warnings happen:
    1) LAS Import might fail – only pointDataRecordFormat #2 & #3 are supported (Your file is 7).
    2) LAS Import might fail – only version LAS 1.2 is supported. (Your file is 1.4) .
    If I change to file format las 1.2, the resulting bin file is not rendered exactly as needed.

    • did you convert inside editor, or using the standalone converter?

      if inside editor, try also the standalone version, can download from releases here:
      https://github.com/unitycoder/PointCloudConverter
      (if you start the exe without parameters, it opens GUI, or can use from commandline, see the docs there for params)

  • Hi,

    With your plugin, is it possible to make point clouds into addressable assets?

    Thanks in advance for your answer.

    • Not tested,
      but there are 2 different ways how data is converted:
      – Into custom binary file (it would have to be on disk to be read, so probably wont work)
      – Into unity mesh gameobjects/prefabs (this would probably work, but its less performant, cannot have huge clouds, due to unity getting slow with too many gameobjects, unless you stream these objects on demand..)

Leave a comment

Connect

Twitter View LinkedIn profile Youtube Youtube Join Discord Twitch

UnityLauncherPro

Get UnityLauncherPRO and work faster with Unity Projects!
*free unity hub alternative

@unitycoder_com

Subscribe to Blog via Email

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