Let’s start by creating a new function, which will contain the whole process (you are free to apply the exact same principles as Events or any other set up). Let’s call it MyPointCloudFunction.
Once the function is ready, we’ll go straight into loading the data and storing it as an asset variable.
This determines the path of the file to use for loading.
Properties First Index and Num Points to Read will determine the range of points to process while reading the given file.
Setting the Num Points to Read to 0 will read data until the end of the file, setting both to 0 will read the whole
Click here to learn more.
This will determine normalization and clipping range for color values
Setting this to (0, 255) will result in all values being clipped to 0 - 255 range, then normalized for 0 - 1 range.
-100 would be clipped to 0, then normalized to 0.0f
0 does not need to be clipped, and will be normalized to 0.0f
51 does not need to be clipped, and will be normalized to 0.2f
255 does not need to be clipped, and will be normalized to 1.0f
512 would be clipped to 255, then normalized to 1.0f
If set to (0, 0), the best match will be automatically determined based on the data contained within the file.
WARNING: Applying incorrect range will most likely result in incorrect color representation.
This determines, which columns to use, as which data sources
Use 0-based indexing when specifying the column ID
Set to -1 to skip this data source
Example of importing ASCII file with Intensity only
Example of importing a file using default settings
At this point you can do with the asset as you would with one imported through the Content Browser.
In this example, we'll create a new Point Cloud Actor and assign our asset to it.