LiDAR in UE4

What is LiDAR?

pointCloud
  • Light Detection and Ranging

  • Similar to Radar

  • Uses light detection to create 3D points

  • A collection of these points are known as a “point cloud”

What is a point cloud?

Point clouds are large data sets composed of 3D point data. Aerial LiDAR (Light Detection And Ranging) laser scanners are the most common instruments used to collect geographic point cloud data. Geographic LiDAR data is most commonly available in LAS (LiDAR Aerial Survey) or ASCII (. xyz) format.

How to create them quickly for use in Unreal Engine

Epic Games has provided a Free plugin for the Unreal Engine that allows their users to import and manipulate LiDAR Point Cloud data into their engine. Once downloaded, you will want to go into the Plugins window of your project and enable the plugin. This will require a restart of the project.

pasted image 0.png

Required Equipment / Software

Video Camera (cellphone will do)

  • Video editing software (we’ll need to export the video into an image sequence. While you can do this in UE4, I recommend a program like Premiere or After Effects)

  • Agisoft Metashape (link)

  • And of course….Unreal Engine

Collect Sample Video

The higher the resolution the better

  • Recommended 4k

  • Record while slowly around targets and capturing all the angles

Using Adobe After Effects, set the frame rate to something low. This will help keep the number of points generated to something more manageable.

AE.PNG

Next, Export > Add to Render Queue.

pasted+image+0+%281%29.jpg

Next we’ll need to change the Output Module Settings to export into either a PNG sequence or a JPEG Sequence.

pasted image 0 (2).png

Render out the sequence. This part may take a while depending on the size of the video.

pasted+image+0+%283%29.jpg

Once it’s finished, upload those photos into Agisoft, click on Workflow > Align Photo. The following window will pop up and you’ll probably want to set your settings to medium and Sequential if they aren’t already.

pasted image 0 (3).png

This will essentially turn each photo in reference to the last and create the depth and color of each point in the point cloud. For this example I chose only three photos to save on time. The higher the settings from the previous slide will create more points but also increase your render times.

Next we want to select Workflow > Build Dense Cloud
This will, well, make the point cloud more dense. It will also do a better job at getting a more accurate depth from the cameras.

pasted image 0 (3).png

t this point you are able to export the point clouds for Unreal Engine. File > Export..

Using the LiDAR plugin you are able import the point cloud data as either .las or .txt files
Under Workflow, you can also generate a model from the point clouds.
This model will likely be noisy and high poly but could be cleaned up using other programs such as Blender.

SampleVideoSnippet.PNG
unnamed.png

Once the point cloud data is inside of Unreal Engine you can add collision, remove points, merge with other point clouds and much more.

unnamed (1).png
unnamed.gif

Override Audio Listener

Setting Custom Software Cursors

Setting Custom Software Cursors

0