PCD - Point Cloud Data

 

 

What is a PCD?

The data for a Point Cloud can be provided by Blueprint, a Cube-Dataset, a PLY-File, a Material or a Static Mesh. If you open a PCD Data Asset, within the “PointCloudKit Content / Examples / PointCloudData” folder, you can see the different parameter collections for each creation methode. The first bool in a collection is called “Generate by …” and will activate that methode (only one can be active at once).

Such a Data Asset can be created by copying an existing one or by right clicking into the Content Browser, then go to Mics / DataAsset and select “PointCloudDataSetup” as a data format.

 

 

Point Cloud by Blueprint

This option will inform the Actor that it will be initialized by Blueprint. Any PointCloudActor has a PointCloudSystemComponent. Most of the Blueprint functions on the component itself will be also present on the Actor (for convenience). But to initialize the data, you need to access the arrays “PointLocations” and “PointColors” on the PointCloudSystemComponent directly. Fill these arrays and call the Blueprint function “UpdateData” on the Actor. For example take a look at the InitPointCloudData function in the BlueprintActor called PointCloudActor_Wave_BP (within the Examples/Blueprints folder). Note that for initializing a Point Cloud this way you actually don’t even need to have any PCD present but it is recommended, because this is the only way you can also override the Particle System template (more details look at Particle System Emitters). Use Blueprints only for initializing a Point Cloud and not for animation, because it is very slow (CPU bound), use a Material (GPU bound) within a PCA Data Asset instead.

 

 

Point Cloud by Cube

This will create a cube, plane or row grid distribution of Points. Useful as a starting point or for testing.

  • Point count for XYZ : Count of points along the X, Y, Z axis (local space of the emitter)
  • Point step size for XYZ : Step size between every point in X, Y, Z
  • Pivot Offset : Pivot offset in X, Y, Z axis (local space of the emitter)
  • Standard Deviation for XYZ : Standard deviation from Location. Note that other values than ‘0’ on huge Point counts can take some time, better to use the Material MAT_GenerateCubeLocations and initialize by Material in this case.
  • Default Color : Point Color (when no override is present).

 

 

Point Cloud by File

Currently the PLY ASCII file format is supported: de.wikipedia.org/wiki/Polygon_File_Format

Because there are no polygons nor edges in a Point Cloud, only the Vertex and Color data will be loaded. With the remapping feature you can load any kind of vertex property to a specific color channel. For example a LiDAR scan may have an “intensity” property, which can be remapped to the alpha or any other channel. Colors can be in uchar (0-255) format or in float32 (1.0 - 0.0) as Linear Color.

  • Transform Y-Up to Z-Up : Auto transform locations to a Z-Up system.
  • Scale Factor : Scale to to the needed unit range (1, 1, 1 : no scaling)
  • Offset Pivot : Offsets the Pivot on import
  • File Name : Name of the PLY file. The path can be set in the Plugin settings under “Edit / ProjectSettings / Plugins / PointCloudKit”. By default it uses the Plugin path + “Content/PLY/” but it can be changed to use the project path instead.
  • Max Distance : Will ignore all points further away from the Pivot (set on ‘0’ will import all points). This is useful for very huge LiDAR scans with several millions of points. By default Unreals GPU particle count is limited to 1.048.576 (more details look at Particle System Emitters).
  • Remap imported colors : Enables remapping of the color channels to other named property in the file vertex stream at import.

 

 

Point Cloud by Material

Internally all the position data will end up in a 2D floating point Render Target. The Unreal Engine™ provides a function called UKismetRenderingLibrary::DrawMaterialToRenderTarget which will render a Material as pure data calculations into a Render Target, without the need of a camera or viewport setup. The PointCloudKit framework provides an interface to script your own Materials to initialize (PCD) and animate (PCA) a Point Cloud. For more details on the Materials look at Materials for Location and Color.

  • Location Material : Material to create the location data.
  • Render Target Size : Size of the Render Target (Point count will be Size.X * Size.Y)
  • Point Count Override : Sometimes the Point count can be smaller than the Render Target, but It still needs to be smaller than width * height. Default: 0 = no override
  • Override Color by Material : Enable to override color by a Material even if the location was initialized by some other source (Blueprint, File, Cube, Mesh).
  • Color Material : Material to create the colors.
  • Vectors : User defined parameter list of Vectors to pass to the Material.
    • Name : Name of the parameter within the Material.
    • Vector : Vector (LinearColor) value.
    • LocationFromWS : If this value is meant to be a point or vector, does it come from Local or World-Space? This will transform the vector (r,g,b but not a) and convert it to Local Space before passing it to the Material.
    • Use : Should this Parameter be used for Location or Color or both?
  • Scalars : User defined parameter list of floats to pass to the Material.
    • Name : Name of the parameter within the Material.
    • Scalar : Float value.
    • Use : Should this Parameter be used for Location or Color or both?
  • Textures : User defined Textures to pass to the Material.
    • Name : Name of the parameter within the Material.
    • Texture : Texture reference.
    • Use : Should this Parameter be used for Location or Color or both?

 

 

Point Cloud by Mesh

The vertices in a Static Mesh, with their location and vertex color, will be used to create a Point Cloud.

  • Mesh Asset : Static Mesh reference to be used.

 

 

 

Point Cloud

These properties are independent of the import method. It will override the Particle System template or Material (for rendering the Particles) referenced by the Point Cloud. Otherwise the default Particle System template will be used, which can cause issues with multiple Point Clouds in a scene (more details look at Particle System Emitters).

  • Override ParticleSystem : If set this will override the default PS template.
  • Override Material : If set this will override the default Material on the PS template.