Hello everyone,
I was using an old version of THREE.js and everything worked fine,
but yesterday I updated to the latest build for VR support and the texture wont load up, the mesh is all black.
anyone could help please?
here is the code:
https://github.com/Oz4/Vr_project/blob/master/script.js
the object on the right is a point cloud with point material , no problem there.
and here is the obj file:
https://github.com/Oz4/Vr_project/blob/master/Desktop4.obj
texture:
https://github.com/Oz4/Vr_project/blob/master/lq_kiz_texture.png
Im using visualsfm wtih meshlab to generate models from photos.
Sorry about the github links they were not working, I updated them.
update: maybe it could help someone having the same issue,
I used MeshMatcapMaterial and it worked,
so I will use it as a temporary solution.
The model is black since it defines no vertex normals. I think you can fix the issue by calling computeVertexNormals()
:
object.traverse(function (node) {
if (node.isMesh) node.geometry.computeVertexNormals();
});
Notice that MeshMatcapMaterial
works because similar to MeshBasicMaterial
it is an unlit material. Meaning it does not respond to light sources in your scene.
1 Like
Thank you very much that worked.