Announcement

Collapse
No announcement yet.

Point Cloud Plugin

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Love the plugin. Is the collision taking into account every point or some lower sampling distribution?

    I have a need to compare each point to a collision object in the world, separate out those that penetrate it (it's an inclined plane) and colorize them, and set them into their own cloud.

    Can this be done through this plugin? I dont mind diving into the code but I thought I'd ask to see how much work it may be.

    I also then have to export those points to file, but not with ue4 coordinates but rather those that correspond to the cloud geolocation originally assigned. Also would love to add another column to the export that represents metadata of some kind (property owner name, tax info...etc.).

    Any insight would be appreciated!

    Great job so far guys.

    Comment


      Originally posted by PA VR View Post
      Love the plugin.
      Thanks!

      Originally posted by PA VR View Post
      Is the collision taking into account every point or some lower sampling distribution?
      All of them

      Originally posted by PA VR View Post
      I have a need to compare each point to a collision object in the world, separate out those that penetrate it (it's an inclined plane) and colorize them, and set them into their own cloud.

      Can this be done through this plugin? I dont mind diving into the code but I thought I'd ask to see how much work it may be.
      The closest thing I can think of, that's already in, would be to use GetPointsInFrustum - using your plane as the near plane. However, if collision performance is crucial, implementing a simple plane intersection test may be a little faster.

      Add a variant of GetPointsInFrustum, which returns the points as copies instead of pointers (look at FPointCloudOctree::GetPointsInBox and FPointCloudOctree::GetPointsAsCopyInBox for reference).

      Once you have the array of points, just iterate over them and assign the desired color.

      Finally, use UPointCloud::CreateFromData to generate the new cloud.

      Originally posted by PA VR View Post
      I also then have to export those points to file, but not with ue4 coordinates but rather those that correspond to the cloud geolocation originally assigned.
      Set the OriginalCoordinates of the new cloud to the value of the original cloud. This will be automatically added to the data during export

      Originally posted by PA VR View Post
      Also would love to add another column to the export that represents metadata of some kind (property owner name, tax info...etc.).
      There is no built-in way to add custom columns at this point. You will need to have a look at UPointCloudFileIO_ASCII::HandleExport to add the extra columns.

      Originally posted by PA VR View Post
      Great job so far guys.
      Thanks again!

      If you need further help, find me on the Discord chat - will be faster that way
      LiDAR Point Cloud Plugin: Marketplace | Project Website | Forum Thread

      If you need help: join me on Discord

      Comment


        Thanks for all your work with the plugin. I was wondering if you would know how to dynamically import point clouds based on its number of columns, as some contain only XYZ values, some contain RGB, normals, intensity, etc. Thanks.

        Comment


          Originally posted by DeusUpperX View Post
          Thanks for all your work with the plugin. I was wondering if you would know how to dynamically import point clouds based on its number of columns, as some contain only XYZ values, some contain RGB, normals, intensity, etc. Thanks.
          By default, the importer assumes columns to be in XYZ RGB Intensity order, and if you use Create Point Cloud From File node or UPointCloud::CreateFromFile, this is how it will attempt to import the data.

          However, you can override the default behavior by using Create Point Cloud From File (ASCII) node or, if using C++, setting up ImportSettings parameter for UPointCloud::CreateFromFile (look at how UPointCloudFileIO_ASCII::CreatePointCloudFromFile does it for reference).

          In there, you can modify the default mapping by providing the desired order of data to use.
          So if your data contains XYZ Normals RGB, you would have to specify the following:
          LocationX = 0
          LocationY = 1
          LocationZ = 2
          Red = 6
          Green = 7
          Blue = 8
          Intensity = -1

          Note the -1 for Intensity - this would instruct the Intensity to be skipped.

          Also, if the index is larger than the number of available columns, it will be skipped. For example, if the cloud is only XYZ, but you use the default mapping (XYZ RGB I), it would still apply the XYZ data correctly, then skip RGB and Intensity sources (as their specified Indices will be unavailable).

          I hope I understood the question correctly and this answers it
          LiDAR Point Cloud Plugin: Marketplace | Project Website | Forum Thread

          If you need help: join me on Discord

          Comment


            Originally posted by phoboz View Post

            By default, the importer assumes columns to be in XYZ RGB Intensity order, and if you use Create Point Cloud From File node or UPointCloud::CreateFromFile, this is how it will attempt to import the data.

            However, you can override the default behavior by using Create Point Cloud From File (ASCII) node or, if using C++, setting up ImportSettings parameter for UPointCloud::CreateFromFile (look at how UPointCloudFileIO_ASCII::CreatePointCloudFromFile does it for reference).

            In there, you can modify the default mapping by providing the desired order of data to use.
            So if your data contains XYZ Normals RGB, you would have to specify the following:
            LocationX = 0
            LocationY = 1
            LocationZ = 2
            Red = 6
            Green = 7
            Blue = 8
            Intensity = -1

            Note the -1 for Intensity - this would instruct the Intensity to be skipped.

            Also, if the index is larger than the number of available columns, it will be skipped. For example, if the cloud is only XYZ, but you use the default mapping (XYZ RGB I), it would still apply the XYZ data correctly, then skip RGB and Intensity sources (as their specified Indices will be unavailable).

            I hope I understood the question correctly and this answers it
            Yes thank you this was very helpful.

            Comment


              On, https://pointcloudplugin.com/downloads the download for 0.7.1-4.22 links to 0.7.1-4.21 version. Is this intended behaviour?

              Comment


                Originally posted by xmak View Post
                On, https://pointcloudplugin.com/downloads the download for 0.7.1-4.22 links to 0.7.1-4.21 version. Is this intended behaviour?
                Oops, must have missed it, thanks!
                Fixed now.
                LiDAR Point Cloud Plugin: Marketplace | Project Website | Forum Thread

                If you need help: join me on Discord

                Comment


                  Apologies for the inconveniences but I have another question. Some of the point clouds I import are a little bit offset in terms of its position (this is the issue of the imported point clouds themselves, their origin point is different from where the point cloud begins). Is there a way to get the position of the actual point cloud and set it to the origin to accommodate for any offsets? Thanks.

                  Comment


                    Originally posted by DeusUpperX View Post
                    Apologies for the inconveniences but I have another question. Some of the point clouds I import are a little bit offset in terms of its position (this is the issue of the imported point clouds themselves, their origin point is different from where the point cloud begins). Is there a way to get the position of the actual point cloud and set it to the origin to accommodate for any offsets? Thanks.
                    No need to apologize!
                    I hope I understood you correctly - in this case, you can either turn the centering off (which will shift the cloud to its original position) or use the OriginalCoordinates property from C++ to get the offset used for centering of the cloud.
                    LiDAR Point Cloud Plugin: Marketplace | Project Website | Forum Thread

                    If you need help: join me on Discord

                    Comment


                      Is there an option to change the position of point cloud points in realtime and fast?

                      I'm thinking about gathering image data from a depth sensor and display it as a point cloud via this plugin.

                      Comment


                        Originally posted by xmak View Post
                        Is there an option to change the position of point cloud points in realtime and fast?

                        I'm thinking about gathering image data from a depth sensor and display it as a point cloud via this plugin.
                        The simplest way would be to run Empty + Insert Points on each update, however, this won't be applicable to a larger set of data.

                        If the data location doesn't change too much between updates, simply modifying the Location parameter of points will result in their update on the screen. Look into ExecuteActionOn... series of functions to apply modifications (see https://pointcloudplugin.com/using-point-selection for examples). I strongly suggest performing all such data modifications from C++, due to it being performance-critical. Keep in mind, however, that this may produce LOD artifacts if the updated locations vary too much from the original.

                        If this approach doesn't work for you, let me know, and I'll explain a bit more hackish solution
                        LiDAR Point Cloud Plugin: Marketplace | Project Website | Forum Thread

                        If you need help: join me on Discord

                        Comment


                          Can I acces individual points directly via a point index?

                          From the depth sensor I will be getting an array of depth values (index calculated from x,y cooridnate), and using point selection or Empty+Insert seems it will be too slow for running in realtime. I need to update the locations of all the points (640x480 or more of them) several times per second and lookinf for the best FPS I can get.

                          Here's an example of what I'm trying to achieve:

                          https://drive.google.com/a/studioart...w?usp=drivesdk

                          This one is implemented via StaticMesh objects (each for one depth point) and the point cloud implementation I'm looking for doesn't necesarilly need to have collision and interaction with other objects (although it would be a bonus if it could).

                          Comment


                            As a slight spin off from handling point cloud data, I assume as this tool is efficient at handling large amounts of point data, would there be a way to leverage its functionality for working with voxel data? Possibly using HISM to help manage performance for voxel elements that could be instantiated per point.

                            Basically using the point cloud data structure for voxels. Does this sound feasible or even implementable with the current plugin?
                            David Gillespie
                            Associate
                            Foster + Partners

                            Comment


                              Originally posted by xmak View Post
                              Can I acces individual points directly via a point index?
                              Due to how the data is stored internally, unfortunately, no. But you could get the next best thing doing the following:
                              - Get the first frame of data
                              - Generate the initial cloud from it
                              - Get pointers to all points
                              - Update locations of those pointers with the new data

                              Overall, something like this:
                              Code:
                              // You would only do it once after the cloud has been initially created
                              // Get an array of pointers to all points in the cloud
                              TArray<FPointCloudPoint*> Points = MyCloud->GetPoints();
                              
                              
                              // Below you would do per frame
                              {
                                  // Grab the pointer to the data - to speed up iteration
                                  FPointCloudPoint** DataPtr = Points.GetData();
                              
                                  for(int32 x = 0; x < 640; ++x)
                                  {
                                      for(int32 y = 0; y < 480; ++y)
                                      {
                                          // Here, you would update the location data
                                          (*DataPtr)->Location = GetNewLocation(x, y);
                              
                                          // Iterate to the next point;
                                          ++DataPtr;
                                      }
                                  }
                              }
                              LiDAR Point Cloud Plugin: Marketplace | Project Website | Forum Thread

                              If you need help: join me on Discord

                              Comment


                                Originally posted by david.gillespie View Post
                                As a slight spin off from handling point cloud data, I assume as this tool is efficient at handling large amounts of point data, would there be a way to leverage its functionality for working with voxel data? Possibly using HISM to help manage performance for voxel elements that could be instantiated per point.

                                Basically using the point cloud data structure for voxels. Does this sound feasible or even implementable with the current plugin?
                                Hi David!

                                If you need to work with large data sets, I would concentrate on optimizing for memory and performance as much as possible. As such I would rather use a dedicated solution to leverage all available advantages of different properties of voxels (uniform size, grid-based location, solid surfaces, etc.). While there might be some overlap in terms of a high-level approach, the implementations would be tailored.

                                Have you seen the Voxel Plugin (https://voxelplugin.com/)? I haven't used it personally, but if you want to kickstart your project or make some initial prototypes, that could be a good starting point
                                LiDAR Point Cloud Plugin: Marketplace | Project Website | Forum Thread

                                If you need help: join me on Discord

                                Comment

                                Working...
                                X