Merge points of pcd files

Hello everyone, this is my first query here. I am new to Three.JS and I wanted to know is it possible to merge points of one pcd file to another pcd file. If possible, then can it be done without loosing the RGB properties of each file.

three.js does not provide a PCD exporter so you have to write the logic by yourself. The actual merge of geometries in three.js can be done with BufferGeometryUtils.mergeBufferGeometries().

It is of course possible to retain vertex colors. Just keep in mind that partial color definitions are not supported. Meaning if you merge two point clouds but only one of them has vertex colors, you have to define default values for the other one (e.g. white).


Thanks for the reply, can you please also explain the merging with an example for PCDLoader?

Well, you do the merge essentially like in webgl_geometry_minecraft.

Instead of plane geometries like in the example, you use the geometries from your point clouds. The usage of BufferGeometryUtils.mergeBufferGeometries() is the same.

Thanks alot