mesh
mesh copied to clipboard
Adding Texture
I took the smplx_texture_m_alb.png
texture image file (see image below) from the SMPLX Blender Add-On
(available at https://smpl-x.is.tue.mpg.de/download.php). I wanted to add texture to the SMPLX mesh using this image outside of Blender.
Following the documentation of MPI Mesh, I used the following command: Mesh.set_texture_image('smplx_texture_m_alb.png')
. However, I am facing an issue with the eye positioning in the output (see figure below):
What is causing this issue? Note that the texture is getting loaded correctly when imported in Blender add-on. (see figure below)
@Shreeshail-Hingane Have you solved this problem ? I encountered the same issue when texturing smplx template human
from psbody.mesh import Mesh, MeshViewer
save mesh with uv map
mesh = Mesh(v=vertices, f=data['f']) mesh.vt = data['vt'] mesh.ft = data['ft'] mesh.write_obj('./temp.obj')
reload and add texture
mesh = Mesh(filename='./temp.obj') texture_path = './smplx_blender_addon/data/smplx_texture_m_alb.png' mesh.set_texture_image(path_to_texture=texture_path) mv = MeshViewer() mv.set_static_meshes([mesh])
I just used a different texture file that worked. Like this file: https://github.com/YadiraF/PIXIE/blob/master/data/smplx_tex.png
I just used a different texture file that worked. Like this file: https://github.com/YadiraF/PIXIE/blob/master/data/smplx_tex.png
it works. thanks.