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

How to get normal map with respect to world coordinate #949

Open
eric-zqwang opened this issue Jul 29, 2023 · 3 comments
Open

How to get normal map with respect to world coordinate #949

eric-zqwang opened this issue Jul 29, 2023 · 3 comments
Labels
first answer provided question Question, not yet a bug ;)

Comments

@eric-zqwang
Copy link

Describe the issue

I'm wondering how to get the normal map respect to world coordinates. Seems like the enable_normals_output() always get the normal map with respect to camera coordinates.

Minimal code example

No response

Files required to run the code

No response

Expected behavior

Want the normal map be consistent in different viewpoints.

BlenderProc version

2.5.0

@eric-zqwang eric-zqwang added the question Question, not yet a bug ;) label Jul 29, 2023
@cornerfarmer
Copy link
Member

You can use the bproc.camera.get_camera_pose() cam2world transformation matrices to transform the normals from the camera to the world frame.

@eric-zqwang
Copy link
Author

Thanks for your help.

One more question is that in order to get normal map corresponding to camera coordinate, I put bproc.renderer.enable_normals_output() when I add camera pose.
But I found that this slow down rendering speed when call bproc.renderer.enable_normals_output() multiple times.

Is there any way to solve it? Thanks!

@cornerfarmer
Copy link
Member

Why do you call bproc.renderer.enable_normals_output() multiple times? You should only call it once before the rendering

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
first answer provided question Question, not yet a bug ;)
2 participants