I am trying to add ambient light to vispy mesh. Here is the code that I am using to render a triangulated mesh.
meshdata = vispy.geometry.MeshData(vertices=r.vertices, faces=r.faces, vertex_colors=r.vColor)
canvas = scene.SceneCanvas(keys='interactive', size=(800, 600), show=True)
mesh = scene.visuals.Mesh(meshdata=meshdata, shading='smooth')
view = canvas.central_widget.add_view()
view.add(mesh)
view.bgcolor = '#efefef'
view.camera = TurntableCamera(azimuth=azimuth, elevation=elevation)
color = Color("#3f51b5")
axis = scene.visuals.XYZAxis(parent=view.scene)
if __name__ == '__main__' and sys.flags.interactive == 0:
canvas.app.run()
Somehow the mesh appears very dark and I want to add ambient lights to this. How can I do this? I searched online and it seems to be not easy. I want to start using python 3 and so trying to use vispy instead of mayavi. Any help would be greatly appreciated.