mmatl / pyrender

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

Dim color when using RenderFlags.FLAT #238

Closed qq456cvb closed 2 years ago

qq456cvb commented 2 years ago

When I try to project mesh color onto the image space with no lightning calculation, the color is dim with a lower saturation/brightness, which is quite strange Reference model: newplot (15)

Projected image (unproject into 3D space) : newplot (16)

I've already tried with setting ambient lightning to white with Scene(ambient_light=np.array([1., 1., 1., 1.]))

qq456cvb commented 2 years ago

Solved! I found that I have to convert Trimesh's texture into flat color in order to render the correct color: mesh.visual = mesh.visual.to_color(). Not sure if this is a bug from Trimesh or pyrender.