# PCDLoader doesn't work on my .pcd file

**URL:** https://discourse.threejs.org/t/pcdloader-doesnt-work-on-my-pcd-file/44264
**Category:** Questions
**Tags:** materials, loaders
**Created:** [November 2, 2022, 1:11pm UTC](https://discourse.threejs.org/t/pcdloader-doesnt-work-on-my-pcd-file/44264 "2022-11-02T13:11:03Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![ajitStephen](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/ajitstephen/32/29512_2.png) [@ajitStephen](https://discourse.threejs.org/u/ajitStephen)
#### Post date: [November 2, 2022, 1:11pm UTC](https://discourse.threejs.org/t/pcdloader-doesnt-work-on-my-pcd-file/44264/1 "2022-11-02T13:11:03Z")

</div>

```javascript
const points = useLoader(PCDLoader, url) 
<primitive object={points} />

```

Gives me empty canvas, no errors!

some context on .pcd file \>\>

original file was .LAZ from PIX4D  
.pcd file which created from PDAL v2  
renders in viewer just a black screen. Viewer I used : pcl-pcl-1.12.1/pcl\_viewer (Working on Ubunty 20.04)

I see this error when viewer is running:  
[fromHandlersToScreen] PointCloud \</home/ajit/Downloads/point\_clouds/low\_quality.pcd-0\> requested with an invalid geometry handler (PointCloudGeometryHandlerXYZ)!  
[updateColorHandlerIndex] PointCloud with id \</home/ajit/Downloads/point\_clouds/low\_quality.pcd-0\> doesn’t exist!

Failed to load on this example as well, [three.js examples](https://threejs.org/examples/?q=pcd#webgl_loader_pcd)

[Points\_Object.json](https://discourse.threejs.org/uploads/short-url/6MJ1R32pHkFRuK7c2sTEbX0yV4f.json) (1.3 KB)

 ![Screenshot from 2022-11-02 18-43-39](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/2/d/2d7dd63d5853006389df6b5e1fc2f158a90476c2.png)

---

<div class="post-metadata">

### Author: ![drcmda](https://avatars.discourse-cdn.com/v4/letter/d/91b2a8/32.png) [@drcmda](https://discourse.threejs.org/u/drcmda)
#### Post date: [November 2, 2022, 1:31pm UTC](https://discourse.threejs.org/t/pcdloader-doesnt-work-on-my-pcd-file/44264/2 "2022-11-02T13:31:53Z")

</div>

if the official example doesn’t load this would best be a github issue on threejs.

---

<div class="post-metadata">

### Author: ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)
#### Post date: [November 2, 2022, 3:20pm UTC](https://discourse.threejs.org/t/pcdloader-doesnt-work-on-my-pcd-file/44264/3 "2022-11-02T15:20:28Z")

</div>

> <https://github.com/mrdoob/three.js/issues/24899#issuecomment-1300652248>
>
> Gives me empty canvas, no errors on console!
> some context on .pcd file \>\>
> 
> or…iginal file was .LAZ from PIX4D
> .pcd file which created from PDAL v2
> renders in viewer just a black screen. Viewer I used : pcl-pcl-1.12.1/pcl\_viewer (Working on Ubunty 20.04)
> 
> I see this error when viewer is running:
> \[fromHandlersToScreen\] PointCloud \</home/ajit/Downloads/point\_clouds/low\_quality.pcd-0\> requested with an invalid geometry handler (PointCloudGeometryHandlerXYZ)!
> \[updateColorHandlerIndex\] PointCloud with id \</home/ajit/Downloads/point\_clouds/low\_quality.pcd-0\> doesn’t exist!
> 
> Failed to load on this example as well, \[pcd loader example\](https://threejs.org/examples/?q=pcd#webgl\_loader\_pcd)
> 
> 
> \*\*To Reproduce\*\*
> 
> Steps to reproduce the behavior:
> 1. Use PCDLoader example with my file
> 2. File Link: (getting confirmation from boss ~ NDA)
> 3. See results: Empty Canvas
> 
> \*\*Expected behavior\*\*
> 
> Loaded 3D Model 
> 
> \*\*Screenshots\*\*
> !\[Screenshot from 2022-11-02 18-43-39\](https://user-images.githubusercontent.com/12784114/199519840-9ef28f94-10c8-465e-8705-7f55b40f1eb1.png)
> 
> \[PCLoader Response Object.txt\](https://github.com/mrdoob/three.js/files/9921247/PCLoader.Response.Object.txt)
> 
> 
> \*\*Platform:\*\*
> 
> - Device: \[Desktop\]
> - OS: \[Ubuntu 20.04\]
> - Browser: \[Brave(Version 1.45.116 Chromium: 107.0.5304.91), Chrome(107.0.5304.87-1) \]
> - Three.js version: \[0.146.0, 0.138.0\]

@drcmda I appreciate your response here but please do not redirect users prematurely to GitHub. The OP should share its PCD file first so it’s clear if there is actually an issue in `PCDLoader`.

---

<div class="post-metadata">

### Author: ![drcmda](https://avatars.discourse-cdn.com/v4/letter/d/91b2a8/32.png) [@drcmda](https://discourse.threejs.org/u/drcmda)
#### Post date: [November 2, 2022, 3:33pm UTC](https://discourse.threejs.org/t/pcdloader-doesnt-work-on-my-pcd-file/44264/4 "2022-11-02T15:33:05Z")

</div>

> I appreciate your response here but please do not redirect users prematurely to GitHub. The OP should share its PCD file first so it’s clear if there is actually an issue in `PCDLoader` .

it’s because they said this:

> this example as well, [three.js examples](https://threejs.org/examples/?q=pcd#webgl_loader_pcd)

if the official example is broken it’s most likely a bigger issue, but no problem. it would have made more sense imo to open with that alone, also the easiest to profile since the pcd is open source.

---

<div class="post-metadata">

### Author: ![prisoner849](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/prisoner849/32/535_2.png) [@prisoner849](https://discourse.threejs.org/u/prisoner849)
#### Post date: [November 2, 2022, 9:22pm UTC](https://discourse.threejs.org/t/pcdloader-doesnt-work-on-my-pcd-file/44264/5 "2022-11-02T21:22:05Z")

</div>

> [@drcmda](#):
>
> if the official example is broken

Works for me in all browsers on Win 10 (Chrome, FF, Opera, Edge)

---

<div class="post-metadata">

### Author: ![ajitStephen](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/ajitstephen/32/29512_2.png) [@ajitStephen](https://discourse.threejs.org/u/ajitStephen)
#### Post date: [November 2, 2022, 10:14pm UTC](https://discourse.threejs.org/t/pcdloader-doesnt-work-on-my-pcd-file/44264/6 "2022-11-02T22:14:56Z")

</div>

Any suggestion how should i create .pcd from .las ? I cannot share my file [NDA]
