> For the complete documentation index, see [llms.txt](https://ms-kb.msd.unimelb.edu.au/next-lab/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ms-kb.msd.unimelb.edu.au/next-lab/sensing/body-tracking/animated-point-clouds-ue.md).

# Animated Point Clouds(UE)

This is one potential workflow for previewing frame-by-frame point clouds that come out of the Kinect. More research and techniques are underway.

***

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>UE5 Template (Download)</strong></td><td><a href="https://unimelbcloud-my.sharepoint.com/:f:/g/personal/7020us-ohs-flowuser2_unimelb_edu_au/EqEaxv_nhDJFtOfMOerN4cUBi8RsNl7E856Lk58cfST0OA?e=6wFnKo">https://unimelbcloud-my.sharepoint.com/:f:/g/personal/7020us-ohs-flowuser2_unimelb_edu_au/EqEaxv_nhDJFtOfMOerN4cUBi8RsNl7E856Lk58cfST0OA?e=6wFnKo</a></td></tr></tbody></table>

Migrate the following assets from the above template to use in your own projects:

<figure><img src="/files/GrDQKpRq5D65OSTiASyy" alt=""><figcaption></figcaption></figure>

***

## Project Setup

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

***

## Import CSV

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.

<figure><img src="/files/0eF3rhIBluFO7pCMOCa4" alt="" width="563"><figcaption></figcaption></figure>

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.*

***

## animPtCldFromCSV Blueprint

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.

{% hint style="info" %}
**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.**
{% endhint %}

***

## Sequencer Setup

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)

<figure><img src="/files/SEJlDYvPFI8it2jIyzI0" alt=""><figcaption></figcaption></figure>

***

## Simulate

Better to use Simulate (from the Play Menu (Top)).

Messages in the viewport will tell you the progress of loading.&#x20;

Once done, scroll through the sequencer to see, adjust animation as required.

***

## Render

For rendering, add a delay to the startup to account for the loading, this will usually be the amount of frames \* your delay time.
