How to use point clouds in Unreal Engine 5

Unreal Engine is a very powerful game engine, with Unity being the other popular choice. I’ve worked with Unity a little bit and I like how tightly it integrates with C#, but I’ve decided to take a close look at Unreal Engine 5 for two reasons:

  1. It is programmed in C++, which is the language that I use for all of my point cloud processing code.
  2. It comes with powerful point cloud functionality built-in via the Lidar Point Cloud Plugin.

The downside is that the available documentation is quite limited. Epic have a Programming with C++, C++ Programming Tutorials, and C++ API Reference online. But there’s not that much C++ documentation around, as most documentation focuses on Blueprints, UE’s visual programming approach. So it took quite a bit of experimenting to put together something that actually works. Luckily, I was able to find much of the required information on the UE forum.

The end result is a program that can

  • read all LAZ files from a specified folder;
  • align and merge them into a single point cloud and build collision;
  • compute the offset between world coordinates and view coordinates;
  • allow for navigating and clicking on point clouds for retrieving coordinates.

You can find the code on Github.

Een reactie plaatsen

Je e-mailadres wordt niet gepubliceerd. Vereiste velden zijn gemarkeerd met *