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 view render doesn't fit if sensor fit isn't on auto #122

Closed
neo2068 opened this issue Apr 10, 2018 · 4 comments

Comments

@neo2068
Copy link
Member

commented Apr 10, 2018

Open blender and start viewport render in camera view with border rendering and portrait Format (height > width). Change automatic sensor fit to either horizontal or vertical.
automatic fit:
auto
horizontal fit:
horizontal
vertical fit:
vertical

@neo2068 neo2068 added the bug label Apr 10, 2018
@neo2068 neo2068 self-assigned this Apr 10, 2018
@Theverat

This comment has been minimized.

Copy link
Member

commented Apr 10, 2018

It might help to take a look at the Cycles code here: https://github.com/sobotka/blender/blob/master/intern/cycles/blender/blender_camera.cpp#L274
Currently there are some weird hacks in our code in this area, feel free to replace them:
https://github.com/LuxCoreRender/BlendLuxCore/blob/master/export/camera.py#L140

neo2068 added a commit that referenced this issue May 2, 2018
There are still cases when border rendering is wrong
@Theverat

This comment has been minimized.

Copy link
Member

commented May 5, 2018

What I found out so far:

  • The filmsize seems to be correct in all cases
  • The screenwindow is probably wrong in vertical mode
  • The border min/max is probably wrong in vertical mode
@neo2068

This comment has been minimized.

Copy link
Member Author

commented May 5, 2018

Thanks! I currently work on it, too. I will check the code in that direction.

@Theverat

This comment has been minimized.

Copy link
Member

commented May 5, 2018

You know what's really weird?
When I change this line: https://github.com/LuxCoreRender/BlendLuxCore/blob/master/utils/__init__.py#L221
to border_max_x = scene.render.border_max_x * 2 (multiply with 2 at the end), it seems to work almost correctly...
However this also affects the final render filmsize which is then incorrect.

Maybe we should rewrite all these functions in a more logical way, following the Cycles code (after v2.0 is released).
Back when I wrote them I did not look into the Cycles code enough.

If you think it's too much work to fix this problem before v2.0, or if you fear to break something in the process, this is no problem at all, since this bug can be easily worked around by using horizontal/auto sensor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.