9

I'm loading a .ply file using PLYLoader and rendering it using the PointCloud object in three.js.

var loader = new THREE.PLYLoader();
loader.addEventListener('load', function (event) {
    var geometry = event.content;
    var material = new THREE.PointCloudMaterial({ vertexColors: true, size: 0.01 });
    var mesh = new THREE.PointCloud(geometry, material);
    scene.add(mesh);
});
loader.load(file_url);

It's working okay, the points are rendered correctly. However the points are rendered as a square. Is it possible to change them to a circle? If so, how?

I found this old thread that shows the picture of a three.js sample. We can clearly see the circles. However that same sample today shows squares (after they changed the ParticleSystem to PointCloud).

Thank you

Community
  • 1
  • 1
  • The circles are probably from this example: http://threejs.org/examples/#canvas_particles_random – dekkard May 14 '15 at 21:50

2 Answers2

2

There are multiple ways to do this:

  1. Use an image with a circle as the input like this.
  2. Use a <canvas> as the input (and draw a circle to the canvas) like this.
  3. Use ShaderMaterial and draw a circle with GLSL like this.
Zach Saucier
  • 24,871
  • 12
  • 85
  • 147
0

A solution is associate circle images to each Point Cloud.

Could you have a look on this example :

https://threejs.org/examples/#webgl_points_billboards

Maybe in that you have the solution.

Zach Saucier
  • 24,871
  • 12
  • 85
  • 147
user3410517
  • 295
  • 3
  • 18