Closed emanhamed closed 5 years ago
Can you check if meshFile.texture_image
or meshFile.texture_filepath
exists?
If it does, you can use MeshViewer.set_texture()
. See here:
https://github.com/MPI-IS/mesh/blob/master/mesh/meshviewer.py#L573-L580
We will push some tutorial docs soon.
Hi! I was able to display the texture on the imported mesh. However, when I try to display the same mesh but after rotating it, the texture is not displayed. I'm using this code:
meshFile = Mesh(v =vertices, f= tris)
meshFile.texture_filepath='/media/samba/frame1.bmp'
mv = MeshViewer()
mv.dynamic_meshes= [meshFile]``
so vertices in this case are different than the initial vertices !
Also, the case when I succeeded to display the texture on the mesh was when I imported the mesh using the filename not the vertices and faces. So, is there a way to display the texture while feeding the vertices, faces and the texture image ?
Thanks for your help
The problem is not very clear to me. Can you paste the outputs here, how the mesh looks, and what removes the texture?
Closed due to no activity.
I have 3D textured mesh of type .obj where the texture is defined by both .mtl and .bmp I have been trying to display the mesh using mesh.py and meshViewer.py but the texture is not overlaying. This is how I'm defining the mesh.
meshFile = Mesh(filename='/home/eman/frame0.obj')
Do I need to explicitly refer to the texture files? thanks for help