I get same issue as Issues10:
An error "index 0 is out of bounds for axis 1 with size 0" occurred while exporting the material.
vertices, face_vertices, texturecoords, face_texturecoords = loadmesh_and_checkuv(mesh_fpath, out_dir)
This code gets the shape of the variables texturecoords and face_texturecoords are both (0,0). Why?
I load meshfpath using your code:
import igl
vertices, texturecoords, , face_vertices, facetexturecoords, = igl.read_obj('./exp_iron_stage2/xmen/mesh_and_materials_50000/mesh.obj', dtype="float32")
print(vertices.shape, texturecoords.shape, face_vertices.shape, face_texturecoords.shape)
here is the result:
(1432877, 3) (0, 0) (2865856, 3) (0, 0)
Do you know why?
Traceback (most recent call last):
File "render_surface.py", line 549, in
export_mesh_and_materials(export_out_dir, sdf_network, color_network_dict)
File "render_surface.py", line 347, in export_mesh_and_materials
export_materials(os.path.join(export_out_dir, "mesh.obj"), material_predictor, export_out_dir)
File "/home/ecoplants/hdd/changfa/PBR/iron/models/export_materials.py", line 168, in export_materials
vertices, face_vertices, texturecoords, face_texturecoords = loadmesh_and_checkuv(mesh_fpath, out_dir)
File "/home/ecoplants/hdd/changfa/PBR/iron/models/export_materials.py", line 153, in loadmesh_and_checkuv
pcd, pcd_uv = sample_surface(vertices, face_vertices, texturecoords, face_texturecoords, n_samples=10**6)
File "/home/ecoplants/hdd/changfa/PBR/iron/models/export_materials.py", line 51, in sample_surface
A = texturecoords[face_texturecoords[sample_face_idx, 0], :]
IndexError: index 0 is out of bounds for axis 1 with size 0
I get same issue as Issues10: An error "index 0 is out of bounds for axis 1 with size 0" occurred while exporting the material. vertices, face_vertices, texturecoords, face_texturecoords = loadmesh_and_checkuv(mesh_fpath, out_dir) This code gets the shape of the variables texturecoords and face_texturecoords are both (0,0). Why?
I load meshfpath using your code: import igl vertices, texturecoords, , face_vertices, facetexturecoords, = igl.read_obj('./exp_iron_stage2/xmen/mesh_and_materials_50000/mesh.obj', dtype="float32") print(vertices.shape, texturecoords.shape, face_vertices.shape, face_texturecoords.shape)
here is the result: (1432877, 3) (0, 0) (2865856, 3) (0, 0) Do you know why?
Traceback (most recent call last): File "render_surface.py", line 549, in
export_mesh_and_materials(export_out_dir, sdf_network, color_network_dict)
File "render_surface.py", line 347, in export_mesh_and_materials
export_materials(os.path.join(export_out_dir, "mesh.obj"), material_predictor, export_out_dir)
File "/home/ecoplants/hdd/changfa/PBR/iron/models/export_materials.py", line 168, in export_materials
vertices, face_vertices, texturecoords, face_texturecoords = loadmesh_and_checkuv(mesh_fpath, out_dir)
File "/home/ecoplants/hdd/changfa/PBR/iron/models/export_materials.py", line 153, in loadmesh_and_checkuv
pcd, pcd_uv = sample_surface(vertices, face_vertices, texturecoords, face_texturecoords, n_samples=10**6)
File "/home/ecoplants/hdd/changfa/PBR/iron/models/export_materials.py", line 51, in sample_surface
A = texturecoords[face_texturecoords[sample_face_idx, 0], :]
IndexError: index 0 is out of bounds for axis 1 with size 0