Announcement

Collapse
No announcement yet.

Point Cloud Plugin

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

    Originally posted by Lolukok View Post
    Hi There!

    First of all, thank you for this fantastic plugin. Currently I try to calculate the points that collided with my collider sphere. Therefore I have some questions, that maybe someone more experienced could help me with.

    I think my main problem is to get the individual points that belong to an octree node. I first assumed that the numbers in the IBCache Array in "PointCloudOctree" where the index of the Point in the Array that stores all the Points. But the numbers in the IBCache Elements are way higher than my actual number of points, what leads to an "out of bounds" error.
    So where and how can I acces only the points that belong to an certain Node?
    Hi and thanks for the feedback!

    Unfortunately, using the IBCache will not be a good way to extract the points' indices in the main array, as its contents and order of the data will vary depending on few factors and might be difficult to extract efficiently. Its purpose is to aid in selecting relevant rendering data to be used by the GPU and, unless you know exactly what you are doing, shouldn't be modified manually.

    The simplest solution that comes to my mind would be to add reference array inside the FPointCloudOctree::Node struct (inside PointCloudOctree.h), like so:

    Code:
    ...
    struct FPointCloudOctree
    {
        struct Node
        {
            TArray<uint32> IBCache;
            TArray<uint32> PointsIndices;
            uint32 NumPrimitives;
    ...
    Then, to modify the FPointCloudOctree::Node::BuildIBCache function (inside PointCloudOctree.cpp) to populate this array, like so:

    Code:
    ...
        for (double i = 0; i < InPoints->Num(); i += Tree->SkipValues[LOD])
        {
            CacheNode->PointsIndices.Add((uint32)i);
    
            if (Tree->bUsesSprites)
    ...
    This new array should then store correct indices used by the Points array, accessible via UPointCloud::Points.

    Hope this helps
    Point Cloud Plugin: Project Website | Forum Thread

    If you need help: join me on Discord

    Comment


      Hi phobos,
      thank you so much for your answer, it works!

      While playing around I was wondering, whether I could somehow change the color of the points in the cloud, without reassigning the point cloud data as shown in your "runtime operations" tutorial. I imagine that getting all the data and change the color of some points, and then reassigning and rebuilding the cloud is rather inefficient. I tried setting the color on the reference to the points of the cloud, but that did not seem to work.

      Another thing i was wondering about is the Scale / Offset setting. with my tool I register collision somewhere near the cloud and not where the actual points are rendered. Are the offsets only applied to the renderer?

      Thank you so much again!

      Comment


        Originally posted by Lolukok View Post
        Hi phobos,
        thank you so much for your answer, it works!

        While playing around I was wondering, whether I could somehow change the color of the points in the cloud, without reassigning the point cloud data as shown in your "runtime operations" tutorial. I imagine that getting all the data and change the color of some points, and then reassigning and rebuilding the cloud is rather inefficient. I tried setting the color on the reference to the points of the cloud, but that did not seem to work.

        Another thing i was wondering about is the Scale / Offset setting. with my tool I register collision somewhere near the cloud and not where the actual points are rendered. Are the offsets only applied to the renderer?

        Thank you so much again!
        Glad it worked

        Currently, the cloud needs rebuilding to propagate any changes to the buffer on the GPU, otherwise, you are changing the values stored in RAM only (I have a potential solution for it tho, which I'll try to test soon).
        The scale and offset are applied to the point itself, so it should be the same everywhere.
        Point Cloud Plugin: Project Website | Forum Thread

        If you need help: join me on Discord

        Comment


          Hi, thanks for the awesome plugin. Currently using it in an animation production for creating a "dream" effect.

          I am trying to have a point cloud appear gradually. As in, it should be completely hidden in the beginning, and then points should start appearing, and finally you see the whole cloud.

          I've achieved a close effect using a mask applied in post (Fusion). See the attached picture for how it looks midway. But is there any way of doing it using your plugin? Or maybe an Unreal method that I don't know of?

          Thanks in advance!
          Attached Files

          Comment


            Originally posted by AutreWeg View Post
            Hi, thanks for the awesome plugin. Currently using it in an animation production for creating a "dream" effect.

            I am trying to have a point cloud appear gradually. As in, it should be completely hidden in the beginning, and then points should start appearing, and finally you see the whole cloud.

            I've achieved a close effect using a mask applied in post (Fusion). See the attached picture for how it looks midway. But is there any way of doing it using your plugin? Or maybe an Unreal method that I don't know of?

            Thanks in advance!
            Hi AutreWeg and thanks for the feedback!

            Animation capacity of the current version is very limited. You could enable / disable the points manually, but it would require a rebuild for the changes to take effect and, depending on the cloud size, could quickly hit your performance limit. I think the post-processing mask is a sound approach here.

            The upcoming version should make it much more usable as the points are being streamed fully dynamically, so the changes should be immediate (in theory, at least )
            Point Cloud Plugin: Project Website | Forum Thread

            If you need help: join me on Discord

            Comment


              Plugin seems great from testing. If I wanted to import multiple point clouds aligned in software such as Scene, what process would be best for importing into Unreal. Using an XYZ file, loses the points alignment.

              Thanks.
              Richard Frost

              Head of VR & AR
              Pilbrow & Partners

              Comment


                Originally posted by pp_rfrost View Post
                Plugin seems great from testing. If I wanted to import multiple point clouds aligned in software such as Scene, what process would be best for importing into Unreal. Using an XYZ file, loses the points alignment.

                Thanks.
                Hi pp_rfrost

                The default behavior will center the clouds after importing. You can change this by opening the asset's settings and selecting None as its Offset, following by a rebuild. This will then use the raw coordinates from an import.

                However, please be aware of the precision loss if the coordinates are too large. In such a case, the precision loss guard may trigger and will force-center the cloud. It is best if you align the cloud pieces and recenter them as a group in your software of choice, before importing into UE4.

                Hope this helps. If you still experience any issues, please let me know
                Point Cloud Plugin: Project Website | Forum Thread

                If you need help: join me on Discord

                Comment


                  Originally posted by phoboz View Post

                  Hi pp_rfrost

                  The default behavior will center the clouds after importing. You can change this by opening the asset's settings and selecting None as its Offset, following by a rebuild. This will then use the raw coordinates from an import.

                  However, please be aware of the precision loss if the coordinates are too large. In such a case, the precision loss guard may trigger and will force-center the cloud. It is best if you align the cloud pieces and recenter them as a group in your software of choice, before importing into UE4.

                  Hope this helps. If you still experience any issues, please let me know
                  Perfect, thanks for letting me know.
                  Richard Frost

                  Head of VR & AR
                  Pilbrow & Partners

                  Comment


                    Getting Serialization Error on Build as others has before. Can't see a fix mentioned on the thread, was any resolution found for this?
                    Richard Frost

                    Head of VR & AR
                    Pilbrow & Partners

                    Comment


                      Originally posted by pp_rfrost View Post
                      Getting Serialization Error on Build as others has before. Can't see a fix mentioned on the thread, was any resolution found for this?
                      Thanks for the report. Happy to say it's already been fixed for the v0.5.6, scheduled within the next few days.

                      If you need it sooner and don't mind re-compiling the plugin, just change line 89 92 in PointCloud.cpp from

                      Code:
                      if (!FPaths::FileExists(Ar.GetArchiveName()))
                      to:

                      Code:
                      if (!FPaths::FileExists(Ar.GetArchiveName()) && !(Ar.IsCooking() && Ar.GetArchiveName().Equals(FPaths::GetBaseFilename(FStringAssetReference(this).ToString(), false))))
                      Last edited by phoboz; 05-14-2019, 05:05 AM. Reason: Corrected the line number
                      Point Cloud Plugin: Project Website | Forum Thread

                      If you need help: join me on Discord

                      Comment


                        Originally posted by phoboz View Post

                        Thanks for the report. Happy to say it's already been fixed for the v0.5.6, scheduled within the next few days.

                        If you need it sooner and don't mind re-compiling the plugin, just change line 89 92 in PointCloud.cpp from

                        Code:
                        if (!FPaths::FileExists(Ar.GetArchiveName()))
                        to:

                        Code:
                        if (!FPaths::FileExists(Ar.GetArchiveName()) && !(Ar.IsCooking() && Ar.GetArchiveName().Equals(FPaths::GetBaseFilename(FStringAssetReference(this).ToString(), false))))
                        That's great, thank you.
                        Richard Frost

                        Head of VR & AR
                        Pilbrow & Partners

                        Comment


                          With a number of point clouds being loaded, whats the best way to optimise map loading times?
                          Richard Frost

                          Head of VR & AR
                          Pilbrow & Partners

                          Comment


                            Click image for larger version

Name:	0.5.6.png
Views:	1
Size:	32.1 KB
ID:	1619354

                            Point Cloud Plugin v0.5.6
                            Release Notes

                            New Features / Improvements
                            • Removed the necessity of using SetEnabledOverride to mark the points’ status as persistent
                            • Added more options for LAS importing
                            Fixes
                            • Fixed many issues and potential stability problems with serialization
                            • Fixed many issues and potential stability problems with importing clouds
                            • Fixed issues with compiling Volumetric materials
                            • Fixed issues with precision loss guard not triggering correctly is some cases
                            • Fixed missing Blueprint exposure for LAS importing
                            • Fixed Render Method not switching to RGB after reimport
                            • Fixed incorrect behavior when providing Color Range with negative values during imports
                            Point Cloud Plugin: Project Website | Forum Thread

                            If you need help: join me on Discord

                            Comment


                              Originally posted by pp_rfrost View Post
                              With a number of point clouds being loaded, whats the best way to optimise map loading times?
                              By default, the clouds will only be pushed to the GPU if they are set as visible. You could potentially load the map with all of them invisible, then toggle one by one to somewhat limit the initial stutter. Alternatively, v0.6 (EA) is using GPU streaming, so the initial stutter should be minimal in comparison.

                              However, keep in mind that the engine will still load all assets referenced by the particular level when said level is being loaded itself. One way to overcome this would be to use Level Streaming and break it into several pieces, each containing a number of clouds. This way you may be able to load some of the data in the background, reducing the initial stutter.

                              Hope this helps
                              Point Cloud Plugin: Project Website | Forum Thread

                              If you need help: join me on Discord

                              Comment


                                Originally posted by phoboz View Post

                                By default, the clouds will only be pushed to the GPU if they are set as visible. You could potentially load the map with all of them invisible, then toggle one by one to somewhat limit the initial stutter. Alternatively, v0.6 (EA) is using GPU streaming, so the initial stutter should be minimal in comparison.

                                However, keep in mind that the engine will still load all assets referenced by the particular level when said level is being loaded itself. One way to overcome this would be to use Level Streaming and break it into several pieces, each containing a number of clouds. This way you may be able to load some of the data in the background, reducing the initial stutter.

                                Hope this helps
                                Thanks phoboz,
                                I'll setup level streaming for the clouds.
                                Just tried v0.5.6, and getting "Fatal error!" dialog — no other information appears.
                                Richard Frost

                                Head of VR & AR
                                Pilbrow & Partners

                                Comment

                                Working...
                                X