mitsuba-renderer / mitsuba3

Mitsuba 3: A Retargetable Forward and Inverse Renderer
https://www.mitsuba-renderer.org/
Other
1.96k stars 230 forks source link

Metric for view matrix in mitsuba 3 #936

Closed SamTov closed 9 months ago

SamTov commented 9 months ago

I am using Open3D to create mitsuba meshes which I then render for some scientific visualization. In doing so, I want to transfer the camera properties from Open3D to the mitsuba camera. I have tried using the view matrix from Open3D to perform a to_world transform in many different variation but none of them work completely.

In some cases, by setting certain components negative I can center the object. However, after rotation my view i normally destroyed. This also seems to change for different meshes depending on where they are centered, as if the camera is not being put where I asked it to be.

I have an issue on the Open3D github as well, but I thought I would also ask here in case someone had an idea of a good way to go between these two camera descriptions. Or just what kind of view matrix can I apply in the to_world method.

ShuaiGer1234 commented 9 months ago

When you set up the scene I mean if you import the mesh created by open3D you can try open3D to-world matrix set it into Mitsuba sensor to-world if not work may be the coordinates system was not between at this time ,you can simply matmul a E matrix which is a unit matrix M to sensor toworld and then you make M[2][2] and M[3][3] to be -1 Hope this would be helpful.

njroussel commented 9 months ago

I'm unfamiliar with open3D.

Let me move this over to the discussions, it seems more appropriate for this topic.