chunky-dev / chunky

A path tracer to create realistic images of your Minecraft worlds.
https://chunky-dev.github.io/docs
GNU General Public License v3.0
644 stars 76 forks source link

Lens shifting View FoV vs Camera FoV difference #803

Open IceSelkie opened 3 years ago

IceSelkie commented 3 years ago

When lens shifting to stitch a grid of subrenders together into a full render, the images stitch together fine, however when compared with the full render of the same size, the edges of the view are viewed from a slightly different perspective. This comes from the fact that the camera FoV (FoV attribute of the lens) is using the same value as the view FoV (the view angle of the canvas).

If these could be decoupled to lock the camera FoV, then change the view FoV and lens shift separately, then this would allow for seamless renders to be stitched of different canvas sizes, and not have distortion if rendered with multiple smaller renders compared to a single larger render.

IceSelkie commented 3 years ago

I plan to look into this when I look into sub-tiling renders in a few days, but if the lens shifting feature is kept, then there should probably be an option to set them separately.

leMaik commented 3 years ago

@StanleyMines I'll add sub-tiling (called it "region rendering" or "canvas cropping" before on Discord) this weekend, urgently need it for ChunkyCloud. :wink: Just waiting for #798 to be merged as I'll introduce a new dump format that will allow saving per-pixel sample count.

Splitting the FoV values sounds great, would you like to implement this? Another great related feature would be the ability to rotate the focal plane (so that it isn't always parallel to the camera lense).