PyMeshLab icon indicating copy to clipboard operation
PyMeshLab copied to clipboard

Mesh with obj format converts to point cloud ply format with color?

Open Heroism502 opened this issue 1 year ago • 1 comments

Hello, I want to convert obj format with textures to ply with color, but I do not find the interface to read texture. Please give me a suggestion. Thanks very much.

  1. Here is the scripts: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% import os import pymeshlab ms = pymeshlab.MeshSet() ms.load_new_mesh("11/111.obj") m = ms.current_mesh() print("Input mesh has", m.vertex_number(), 'vertex and', m.face_number(), 'faces' ) ms.apply_filter('generate_simplified_point_cloud',samplenum=1000000) ms.apply_filter('compute_color_from_texture_per_vertex') # compute_color_from_texture_per_vertex ms.save_current_mesh(file_name = "111.ply", binary = False, save_wedge_texcoord=False, save_vertex_quality=False, save_vertex_flag=False, save_vertex_color=True, save_vertex_coord=False, save_vertex_normal=False, save_vertex_radius=False, save_face_quality=False, save_face_flag=False, save_face_color=False, save_wedge_color=False, save_wedge_normal=False) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2. Here is the data: image

Heroism502 avatar May 14 '23 02:05 Heroism502