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

Feature Request: Sinc and Catmull-Rom Pixel Filters #415

Closed
rrubberr opened this issue Jul 26, 2020 · 3 comments
Closed

Feature Request: Sinc and Catmull-Rom Pixel Filters #415

rrubberr opened this issue Jul 26, 2020 · 3 comments
Assignees

Comments

@rrubberr
Copy link

rrubberr commented Jul 26, 2020

Request

In Luxrender, there were certain filters present which are notably absent in LuxCoreRender, including the Sinc and Catmull-Rom pixel filters. Although the Catmull-Rom filter can be considered "visually similar" to those already implemented in LuxCore, these filters give unique results which are not possible through simple post-process sharpening.

I have created a number of examples to demonstrate these differences:

Group1
Group2
Group3
Group4
Group5
Group6

Each image was rendered for two hours with a resolution of 4704x3136, with a filter width of 2.0, then was exported as 32 bit EXR data and tonemapped with consistent settings in Photoshop. The Gaussian image was allowed to fully converge, and is provided as a reference.

As you can see, the Sinc filter presents the sharpest result, and resolves detail which the others do not, including fine detail on the playing cards and the nyquist frequency chart, while it also presents the sharpest result on the colored Siemens star charts. The minute text on the paint tubes is also legible, and text appears clearest overall with this filter.

Implementation

These filters were implemented in LuxRender based on the following:

LuxRender implementation of Catmull-Rom:
https://web.archive.org/web/20131231050109/http://www.luxrender.net/forum/viewtopic.php?f=8&t=10381

Windowed Sinc Filter (presumably what the LuxRender implementation was based on):
http://www.pbr-book.org/3ed-2018/Sampling_and_Reconstruction/Image_Reconstruction.html#x1-WindowedSincFilter

Summary

While these may seem extraneous in the context of LuxCore, at the very least, the Sinc filter produces a result which is distinct from the currently available filters, and would be an appreciated addition. Further, most users stick with the default Blackman-Harris filter and do not change the pixel filter setting, so they will not be bothered or confused by the addition of another filter.

Full-Size JPEGs of the scene I created to test Sinc and Catmull-Rom filter sharpness are included for reference:

Sinc

Sinc

Catmull-Rom

Catmull-Rom

@Dade916
Copy link
Member

Dade916 commented Jul 28, 2020

It is so simple to add a pixel filter that it would take more time to argue of their practical use than just add them. I have added the support for SINC and CATMULLROM pixel filters in v2.5 sources.

@Theverat, the properties are:

film.filter.type = SINC
# Width/height like all other pixel filters
# The default value in old Lux was 3 but it is to prone to aliasing problems so I picked 1
film.filter.sinc.tau = 1

# Or

film.filter.type = CATMULLROM
# Width/height like all other pixel filters
# No additional parameters

@Theverat
Copy link
Member

It is so simple to add a pixel filter that it would take more time to argue of their practical use than just add them.

Well, don't forget that they need to be added in the addon, in the documentation and in the SDL manual (if we want to be precise).

film.filter.sinc.tau = 1

What are useful min and max values for this property? I always need these.

@Dade916
Copy link
Member

Dade916 commented Jul 29, 2020

film.filter.sinc.tau = 1

What are useful min and max values for this property? I always need these.

Something like ]0.0, 8.0].

@Dade916 Dade916 closed this as completed Aug 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants