What material do I need to use to implement this kind of sphere?

Hi, community, I need to implement a sphere composed of multiple small pieces of paper. I am a beginner and used point to implement the sphere. What kind of metrial should I use to achieve this effect in the picture?

Here is the demo in codesandbox
codesandbox

1 Like

Looks like a box turned into a sphere :thinking:

3 Likes

https://threejs.org/examples/?q=point#webgl_interactive_points

yes indeed, it looks like a cube that’s had it’s positions array normalized…

const SphericalCube = () => {
  const cube = new BoxGeometry(6, 6, 6, 10, 10, 10);
  const noralizedVertices = [];
  for (var i = 0; i < cube.attributes.position.array.length; i++) {
    if (i % 3 === 0) {
      const nV = new Vector3(
        cube.attributes.position.array[i],
        cube.attributes.position.array[i + 1],
        cube.attributes.position.array[i + 2]
      );

      nV.normalize().multiplyScalar(3);
      noralizedVertices.push(nV);
    }
  }

  const geometry = new BufferGeometry();
  geometry.setFromPoints(noralizedVertices);

  return (
    <points geometry={geometry}>
      <pointsMaterial color={"#FDFDFD"} size={0.05} />
    </points>
  );
};

2 Likes

For me it looks more like instanced planes in the spherical formation, based on a box :thinking:

Demo: https://codepen.io/prisoner849/full/poXbKGo

4 Likes

Wow, your implementation is really amazing, very close to the requirements, the dark spots do not appear randomly in the sphere, but the sphere rotates like the moon, each particle is facing the center of the sphere at the same angle, the lower left corner will be dark because of the angle of the particles. Thank you very much!

2 Likes

Purely in terms of form, it reminds me of this:

MorphBoxSphere

from the Collection of examples from discourse.threejs.org

3 Likes
let box = new THREE.BoxGeometry(1,1,1,10,10,10);
let v = box.attributes.position.array;
let tmp = new THREE.Vector3()
for(let i=0;i<v.length;i+=3){
   tmp.set(v[i],v[i+1],v[i+2]);
   tmp.normalize();
   v[i]=tmp.x;
   v[i+1]=tmp.y;
   v[i+2]=tmp.z;
}
let m = new THREE.Mesh(box, new THREE.MeshStandardMaterial());
scene.add(m)