Loading and displaying lidar data (las, laz)

Has anybody tried using lidar data (usually las or laz format) for 3D viewing and measuring?
A typical file would range from as small as a few thousand points (xyz and intensity or rgb values) to over 1 billion. I am mostly interested in just loading under 100,000 points but 100 million would be great. I haven’t tried using this software yet and I’m curious what it can do.

Good question :slight_smile: We should be able to display even huge number of points, but it also depends on how they are organized. If they are just a simple mesh → easy.

This image:


shows a mesh with 4.5 million triangles (from Vectors changes, to avoid a trap with modifying a temporary value – Castle Game Engine ).

I don’t have any knowledge about Lidar data formats. But if you can find a converter to convert them to any supported format (any on Supported model formats | Creating Game Data | Castle Game Engine , in particular glTF is recommended and popular and efficient) then you can use that with Castle Game Engine / view3dscene then.

Thanks for the quick reply. I’m glad to know that millions of points is really no issue.
Let me explain the nature of our data just a bit more. Lidar data in our case is captured by a UAV (drone) or a car. We collect up to 6 million points per second, but most often reality would be closer to just less than 1 million. When you scan for 20 minutes, you can get a lot of points in a hurry. And we sometimes scan all day.
The data itself is stored in a series of files but each point consists of a GPS time stamp, and XYZ coordinate and either an intensity value (like a black and white image) or an RGB color (or both).
The data is usually ordered by time, roadway, and or flight line.
What I need to do is provide a good 3D viewer for taking basic XYZ coordinate measurements from a segment of the data.
It looks as though there is a way to load individual points rather than an obj or ply file. If that is the case, I can rapidly read and load such points. I really just needed to know that such an interface was available and millions of points poses no problem.

I am open to any further advice. Again, thanks.

Ah, then let me give some more directions :slight_smile:

( My first response above, “find some software to convert your data to glTF or X3D”, was more for non-developers who’d like to visualize data using our ready view3dscene: Viewer for glTF, X3D, sprite sheets and other model formats | Castle Game Engine . If you want to get your hands dirty and do development to make it happen, that’s great, that’s what Castle Game Engine is about! )

You can load any custom file format in CGE by reading the file and constructing a “graph of X3D nodes” on output. Such nodes can be loaded into TCastleScene instance, and thus you can construct yourself any 3D content you need and have the full capabilities – that is, our built-in loaders from e.g. glTF or X3D also use the same nodes, no cheating, so you can build everything yourself using any algorithm.

For start, follow our manual Manual | Manual | Castle Game Engine and especially take note of

In particular the last link has a section " 11. Building a mesh using code" which is what you do when you load a model from your own file: Writing code to modify scenes and transformations | Manual | Castle Game Engine

More information about X3D nodes is in Scene graph (X3D) | Castle Game Engine , see in particular section " X3D in Pascal" there. It contains a number of subpages documenting various X3D nodes and Pascal examples.

You can also take a look at existing loaders. Some are quite complicated, but some are trivial and can be a useful starting point. For example loader from the STL file format is very simple: castle-engine/src/scene/load/x3dloadinternalstl.pas at master · castle-engine/castle-engine · GitHub .

Hope that these are useful starting point(s) :slight_smile: