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

Offscreen Rendering Doubt #230

Open cuccomat opened 2 years ago

cuccomat commented 2 years ago

Hi, I am having an issue since I would like to render an image given a 3d model and the pose parameters wrt the camera (knowing FOV and aspect ratio). Pyrender uses a different reference frame to the one I have the pose expressed. image Moreover, I should pass from the camera frame to the Pyrender one centred in the model. I thought to apply the first transformation from the frame I have the coordinate expressed to the Pyrender one, and then to the object frame applying the inverse to have the camera pose. image I would appreciate any check that I am correctly following the method. Then considering that the pose is expressed in cm and the OffscreenRenderer in pixels I am doubting whether I should convert in pixels at some point.