Can not render point clouds with DRACOLoader

I have a Draco-encoded point cloud (in.drc format). I used DRACOLoader() to decode and get the corresponding geometry. However, the point cloud model was not rendered to the screen, and no errors are reported.

    dracoLoader.load('output.drc', function (geometry) {
      // console.log(geometry.attributes.position)
      console.log(geometry.attributes.position.count)
      const material = new THREE.PointsMaterial({
        size: 15,
        vertexColors: true
      });
      let ptcl = new THREE.Points(geometry, material);
      ptcl.position.set(0, 0, 0);
      scene.add(ptcl);
    })

I really need some help!!! :disappointed_relieved: :disappointed_relieved: :disappointed_relieved:

Your code looks OK, but we don’t know anything else about your app, or the model you’re loading. You may need to share more of a full demo. I might also suggest checking the bounding box of the geometry and see if it’s much smaller or larger than your camera framing.

Thanks a lot :smile:! The issue was indeed related to the camera parameters not being set correctly :sweat_smile:.

1 Like