I am trying to use the TensorflowGraphics implementation of Three.js in google colab to apply an image to a mesh, but while it can handle modifying the color when I try to load an image it does not work and I'm not sure what is going wrong.
Here is the code:
context = threejs_visualization.build_context()
default_material = context.THREE.MeshPhongMaterial.new_object({
'map':context.THREE.ImageUtils.loadTexture(samplesfn + "missing_tex.png")
})
default_material['vertexColors'] = context.THREE.NoColors
mesh["material"] = default_material
_ = threejs_visualization.triangular_mesh_renderer(mesh, width=100, height=100)
threejs_visualization.triangular_mesh_renderer is provided at https://github.com/tensorflow/graphics/blob/master/tensorflow_graphics/notebooks/threejs_visualization.py
I know the problem is not that the image can't be loaded properly as in the same file openCV can load it.
Any help is much appreciated.