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

Can't render my obj file #154

Open swallow00001 opened 3 years ago

swallow00001 commented 3 years ago

When I rendering the example obj fiel, everything is fine. But if I trying to render my obj file, it just showing nothing. No warring, no error message. Here is my obj, mtl,and png file.

mix01.zip

Could anyone tell me what happend?

visonpon commented 3 years ago

I also encountered this problem and I have seen some answers like using the default camera pose. I can render my obj file well at default camera pose, but I'm curious about how to get some suitable camera pose parameters for rendering a new view color and depth map? hope you can help @mmatl, thanks~

swallow00001 commented 3 years ago

I make a stupid misstake,my obj is to huge and camera is too close,so I move my camera backward,it solve my problem. I'm not sure what you mean. Maybe you can try to setting "zfar" and "znear". This is my camera setting OrthographicCamera(xmag=200.0, ymag=200.0, zfar=1000.0,znear=0.1)

visonpon commented 3 years ago

@swallow00001 scene.add() can not only add camera's intrinsic but also camera pose, what I want to know is how to add a proper camera pose so that I can use the mesh combined with the camera intrinsic and extrinsic parameters to offscreenRender the color and depth map.