简体   繁体   English

在 pymeshlab 中将颜色从网格传输到点云

[英]Transfer color from mesh to point cloud in pymeshlab

I'm trying to convert a 3D model to a colored point cloud.我正在尝试将 3D model 转换为彩色点云。 I'm using Motecarlo sampling and then Texture to vertex color.我正在使用 Motecarlo 采样,然后使用纹理到顶点颜色。 The problem is that I also need color information from the material.问题是我还需要材料中的颜色信息。 I'm using.obj models from the ShapeNet dataset.我正在使用来自 ShapeNet 数据集的 .obj 模型。

mesh = pml.MeshSet()
mesh.load_new_mesh(f'{model_path}/models/model_normalized.obj')
mesh.generate_sampling_montecarlo(samplenum=16384)
mesh.transfer_texture_to_color_per_vertex(sourcemesh=0, targetmesh=1)

Does anyone know if there's a filter that can do what I need?有谁知道是否有过滤器可以满足我的需求?

I encountered this bug also--if you update to current pymeshlab, the texture to vertex color filter works correctly.我也遇到了这个错误——如果你更新到当前的 pymeshlab,纹理到顶点颜色过滤器可以正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM