How to correctly load a pcd file which fields includes rgba?

.PCD v0.7 - Point Cloud Data file format

VERSION 0.7
FIELDS label x y z rgba
SIZE 4 4 4 4 4
TYPE U F F F U
COUNT 1 1 1 1 1
WIDTH 640
HEIGHT 480
VIEWPOINT 0 0 0 1 0 0 0
POINTS 307200
DATA binary_compressed
When I use PCDLoader to load a pcd file above, it happened something wrong. First, the information: THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The “position” attribute is likely to have NaN values. was raised. The position array was all NaN when I use the code below to display them.

Object.keys(geometry.attributes).forEach((key) => {
                    const attribute = geometry.attributes[key];

                    console.log(`Attribute: ${key}`);
                    console.log('Data: ', attribute.array);
                    console.log('Item Size:', attribute.itemSize);
                    console.log('Count: ', attribute.count);
                });


So when I try to use geometry.center(), it failed.
Thanks a lot if someone can help me to solve this problem.

As a general thumb rule, I’d recommend to try loading a shorter, non-binary file first, just to be sure you are passing consistent data.

Regarding rgba, AFAIK you’d need to edit the loader to accomodate for 4-digits instead of 3. Try to share a live example, like a codepen, to make revisions easier for all here