nob_reframe (Compatible with IFFS 2024.1.0 and up)
This Matchbox shader reframes a shot with respect to perspective distortion.
The concept of this shader is to simulate a different focal length and camera orientation while maintaining the camera position.
Image-wise only transformations are applied to acquire alternate view frames, thus brightness is retained and bokeh is transformed with the image (note that this can lead to deformed bokeh when extremely wide source FoV and strong off-centreing come together).
The
The resulting image format can be customized to any canvas resolution, including but not limited to Flame
Since the combined transformations per pixel are well-behaved over the resulting frame (for typical use), an intermediate pass containing the UV coordinates is calculated. The final pass transforming the image itself then uses those UVs, which is where the antialiasing is also applied (for performance reasons). Note that this can cause a loss of information for the very border pixels that would ideally interpolate from antialiasing sample locations outside the frame too.
To eliminate this error, one can specify a canvas resolution exactly 2 pixels wider & higher to then crop it back to the desired format using the <Resize & Crop> node.
Take care to maintain correct pixel- & image aspect ratios between reframing & crop. Use the
Upressing is best done with other means than this shader. Significant enlargements of small image viewports to a canvas of the same resolution as the input also might result in strong pixelation.
If need be, one can output the intermediate (continuous) UV coordinates and feed them into an external filter better suited towards upressing. Note that when outputting UV coordinates, the Matte result is intentionally black to incentivize running it too through the external filter.
The shader correctly handles conversions between all source and result formats, no matter the image- and pixel aspect ratios. In cases of deviating image aspect ratios, the width of the virtual result is matched according to the relative image height (which is retained from the source).
Adaptive Degradation is supported by this shader, which conditionally bypasses antialiasing.
This shader is licensed under the terms of the MIT license.
For questions contact:
nobbl211 _at_ gmail.com
Version notes
iterative update
Older versions that shader
22th of February this year, around 21:49
Downloadimproved processing pipeline through use of texelFetch
comments powered by Disqus