mmatl / pyrender

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

Can not see the color when visualize scene in pyrender #76

Open TruongKhang opened 5 years ago

TruongKhang commented 5 years ago

Hello, I visualize my scene (file .ply), but I only see the black and white color in the scene. Here is my .ply file. Here is my code:


import trimesh

fuze_trimesh = trimesh.load('meshed_poisson.ply')
mesh = pyrender.Mesh.from_trimesh(fuze_trimesh, smooth=False)
scene = pyrender.Scene()
scene.add(mesh)
pyrender.Viewer(scene)
ParikaGoel commented 4 years ago

Color rendering works on 0.1.32 version. Refer to issue #85

iamnotstone commented 4 years ago

adding a ambient_light to Scene, or increaseing the intensity of light solves my problems.

scene = pyrender.Scene(ambient_lgith = [0.3,0.3,0.3, 1.0])

or do something like this:

light = pyrender.PointLight(intensity = 500)
PavelPanjaya commented 1 month ago

Make sure fuze.obj, fuze.obj.mtl, fuze_uv.jpg all exist and placed in the same directory.