Animated Point Clouds(UE)
Last updated
Last updated
This is one potential workflow for previewing frame-by-frame point clouds that come out of the Kinect. More research and techniques are underway.
Migrate the following assets from the above template to use in your own projects:
Your project requires the following plugins enabled:
Lidar Point Cloud Plugin
In the Edit > Project Settings:
Search for 'Maximum Loop Iteration Count'
Set Maximum Loop Iteration Count to a higher amount
Construct a exact .csv in the following manner with these column names; where each point is in its own line, ending in the frame number of that point.
The [ptcldData] Structure asset
defines a way to import point cloud data.
Drag and drop your .csv file into Unreal Engine and select ptcldData as the DataTable Row Type.
This blueprint loads .csv files into point cloud files, which can then be animated to loop through its contents.
When imported into your level/map, it has these properties:
P Actor - A base Lidar Point Cloud file to overwrite. Base Data - .csv point cloud data with frames as in the previous step Delay - Gives the script some time to compute each frame, increase if errors occur. (Default is 1.0 seconds) Show Frame - Animated this slider via the Level Sequencer to loop through each frame of point clouds.
Open the blueprint and find the Delay variable in the bottom left panel, click the Eye to reveal it as an editable parameter in its properties. This may be required for slower machines.
Add the animPtCldFromCSV Blueprint to a sequencer by dragging it in. Animate by keyframing the 'Show Frame' properties of the Blueprint (use the diamond next to the parameter)
Better to use Simulate (from the Play Menu (Top)).
Messages in the viewport will tell you the progress of loading.
Once done, scroll through the sequencer to see, adjust animation as required.
For rendering, add a delay to the startup to account for the loading, this will usually be the amount of frames * your delay time.