Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change camera pose to identity matrix (np.eye(4)) and move object to get same result #282

Open
dqj5182 opened this issue Apr 28, 2024 · 1 comment

Comments

@dqj5182
Copy link

dqj5182 commented Apr 28, 2024

Hi!

First of all, thanks for your amazing rendering framework!
Pyrender helped my colleagues and me a lot on rendering various 3D models in python.

My situation is that I have focal length, principal point, camera pose, and a certain mesh.
Based on these information, I render with "pyrender.OffscreenRenderer" with "focal length and principal point" as inputs for "pyrender.IntrinsicsCamera" to initialize camera and add camera pose by "scene.add(camera, pose=cam_pose)" where "cam_pose" denote my camera pose information. And of course I add my mesh information to "scene.add(mesh, 'mesh')".

But I wish to change the camera pose information (which is usually added in "scene.add(camera, pose=cam_pose)") to identity matrix (np.eye(4)) and move by object mesh vertices so that it can render properly.

May I ask how I should move my object mesh vertices in order to make the rendering work?

@dqj5182
Copy link
Author

dqj5182 commented Apr 28, 2024

I have tried to make the cam_pose as homogeneous matrix and make inverse of the matrix with "np.linalg.inv" to multiply the inverse matrix to object mesh vertices but it does not work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant