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

Camera "up" vector is not properly used. #197

Open
derifatives opened this issue Mar 27, 2022 · 3 comments · Fixed by #198
Open

Camera "up" vector is not properly used. #197

derifatives opened this issue Mar 27, 2022 · 3 comments · Fixed by #198
Assignees

Comments

@derifatives
Copy link

When rendering a scene, everything looks fine with a camera position of (0., 1.5, -1.5). Changing the x-coordinate causes the csene to tilt, and using positive z's renders the scene upside-down.

@taiya taiya self-assigned this Mar 27, 2022
@taiya taiya linked a pull request Mar 27, 2022 that will close this issue
@Qwlouse
Copy link
Collaborator

Qwlouse commented May 6, 2022

Reopening because #198 broke other usecases and a test, so I reverted it.

@Qwlouse Qwlouse reopened this May 6, 2022
@Quasimondo
Copy link

Yes, I can confirm that this fix does not work as intended:

Here is an example where the camera is rotated 90° when using the fix, but correctly pointing up with the old version:

scene.camera.position = (6, 0, 3.0)
scene.camera.look_at((-0.5, 0, 2.0))

MrXandbadas added a commit to MrXandbadas/kubric that referenced this issue May 26, 2022
An attempt to help with google-research#197 google-research#198

Created a new function in Kubric core. set_position()

I hope this is helpful xD
MrXandbadas added a commit to MrXandbadas/kubric that referenced this issue May 26, 2022
An attempt to help with google-research#197 google-research#198

Created a new function in Kubric core. set_position()

I hope this is helpful xD
@MrXandbadas
Copy link
Contributor

MrXandbadas commented May 27, 2022

made a new function.
This is how I've tested it so far.
scene.camera.set_position((6, 0, 3.0))

It basically just updates the position and then grabs the "look_at" parameter and applies it again.
Haven't explored is in its entirety to ensure it doesn't break other things

@Qwlouse If you could let me know what other use cases it broke I'll happily attempt to test them xD

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

Successfully merging a pull request may close this issue.

5 participants