I’m sure this has been asked before but I’ve searched around and haven’t found a direct solution for the problem I’m having.
I’m trying to apply a texture to a THREE.Points object, but so far I’ve only been able to wrap the whole texture around each point. Ideally, I want it to sample the color of each point from the corresponding location in the texture.
I already wrote some code that does this manually, but it is of course very slow. I was wondering if there is a built-in way to do this and if so what exactly is it?
I’ve included images to explain what I mean:
This is the model being created as a THREE.Mesh where the texture works fine
Code:
const material = new THREE.MeshBasicMaterial({map: texture});
const mesh = new THREE.Mesh(teacherModel, material);
And this is what is happening with THREE.Points
Code:
const material = new THREE.PointsMaterial({map: texture, size: 0.2});
const mesh = new THREE.Points(teacherModel, material);
Any help would be greatly appreciated.