Hi all got a function for create points:
function generateSpherePoints(size, count){
geometry = new THREE.Geometry(spherical);
for(let i = 0; i < count; i++){
geometry.vertices.push(setRandomPointInSphere(50));
}
var material_medium = new THREE.PointsMaterial({color: 0xffffff, size: size,alphaTest: 0, transparent: true});
points = new THREE.Points(geometry, material_medium);
return points;
}
how without textures i can change point shape from box to sphere?
1 Like
Did I get it correctly, that you want to have shape of points as circles instead of squares?
yes. box - squares. Sorry…
or may be better use sprites?
Mugen87
5
Maybe this article is helpful to you:
https://www.desultoryquest.com/blog/drawing-anti-aliased-circular-points-using-opengl-slash-webgl/
In three.js
you need to adjust PointsMaterial
to achieve anti-aliased circular points. You can find the shader code for this in the linked document.
Before you do that: Why not just using a texture?
3 Likes