cnr-isti-vclab / PyMeshLab

The open source mesh processing python library
GNU General Public License v3.0
780 stars 63 forks source link

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

Open Heroism502 opened 1 year ago

Heroism502 commented 1 year ago

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

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. The resources of the VCLab team are limited, and so we are asking for your help. If this is a bug and you can still reproduce this error on the last release of PyMeshLab, please reply with all of the information you have about it in order to keep the issue open. If this is a feature request, and you feel that it is still relevant and valuable, please tell us why. This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.