(Solved) Loading mesh with vertex colors
Posted: Tue Mar 15, 2022 11:59 pm
I'm trying to load a mesh created in open3d saved in the usual `.obj` format with vertex information into pybullet. The mesh vertices load fine, but don't have any color (resulting mesh in pybullet looks the same regardless if when saving write_vertex_colors=False or not).
I am loading the mesh in pybullet via
First few lines of the saved mesh:
Does pybullet not support colored vertex obj convention (http://paulbourke.net/dataformats/obj/colour.html)?
Is there a way to get colored meshes working (converting to texture somehow and applying texture)?
I am loading the mesh in pybullet via
Code: Select all
visId = p.createVisualShape(p.GEOM_MESH, fileName=fn)
meshId = p.createMultiBody(0, baseVisualShapeIndex=visId, basePosition=[0, 0, 0])
Code: Select all
# Created by Open3D
# object name: test_mesh_2022_03_15_19_28_06_50
# number of vertices: 4700
# number of triangles: 9424
v -0.055 0.0346259 0.36 0.120638 0.625828 0.533488
v -0.055 0.035 0.358984 0.119699 0.61849 0.536347
v -0.0552418 0.035 0.36 0.120081 0.622161 0.534946
v -0.0564281 0.035 0.37 0.132268 0.655014 0.519661
v 0.095 0.065 0.311799 0.276022 0.044167 0.370164
v 0.095 0.0663959 0.22 0.252194 0.269783 0.531579
Is there a way to get colored meshes working (converting to texture somehow and applying texture)?