mmatl / pyrender

Easy-to-use glTF 2.0-compliant OpenGL renderer for visualization of 3D scenes.
http://pyrender.readthedocs.io/
MIT License
1.29k stars 224 forks source link

Missing color coordinates when visualized using pyrender.Viewer() #118

Open SushmaDG opened 4 years ago

SushmaDG commented 4 years ago

Hi,

I am trying to visualize a mesh (exported using trimesh.exchange.obj.export_obj()) adding it to pyrender.scene and it is missing color coordinates.

This is the code: mesh = trimesh.load('/path/to/exported/file.obj') pyrender_mesh = pyrender.Mesh.from_trimesh(mesh, smooth=False) scene = pyrender.Scene() scene.add(pyrender_mesh) pyrender.Viewer(scene_, use_raymond_lighting=True)

The original object model looks like this: original_obj

After I add it to the pyrender.scene() I get this in the pyrender.Viewer() new_obj

This is not as expected. Could you please help me understand why this is the case? Am I missing something?

pyrender version: 0.1.36 trimesh version: 3.6.38

Thank you.

jiunyen-ching commented 4 years ago

image Works in pyrender version: 0.1.32 and trimesh version: 3.5.14 Maybe can consider to downgrade if version number is not too important for your work.

zwxdxcm commented 2 weeks ago

Have you solved the issue?