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

Add a new setting to choose the aperture shape for custom bokeh #1192

Merged
merged 2 commits into from
Mar 12, 2022

Conversation

aTom3333
Copy link
Member

I added a new button in camera tab that let's someone choose a mask image that defines the shape of the aperture. The mask image must be square (checked in the code) and in grayscale (not checked in the code, only one channel is used, if the mask image has colors, nothing bad will happen).
Custom aperture shape is interesting for bokeh effect.

Default aperture (equivalent to having a circle):
bokeh-default-10000

Hexagonal aperture:
hexagon-aperture
bokeh-hexagon-10000

Star aperture:
star-aperture
bokeh-star-10000

Gaussian aperture:
gaussian-aperture
bokeh-gaussian-10000

In the mask image, white means the light can go through and black means the light can't. We can use gray, in which case the amount of light that can go through is proportional to brightness of the gray

@aTom3333
Copy link
Member Author

Another one as bonus because I have nothing better to do (and also because I wanted to check that an aperture with the center obstructed would work.

Ring aperture:
ring-aperture
bokeh-ring-10000

@ProNoob135
Copy link

Ayyy i knew this would work! Awesome!

@leMaik
Copy link
Member

leMaik commented Mar 11, 2022

Nice! Should we add a few built-in shapes? We could simply load them from resources bundled in the jar... This would require a way to load shapes without files being involved, though.

@jackjt8
Copy link
Member

jackjt8 commented Mar 11, 2022

A few built-in shapes would be nice if it can be figured out.

@aTom3333
Copy link
Member Author

Any idea of how to do that ui-wise? Even now I'm not satisfied with the UI, there is no indication that a mask has been added

@leMaik
Copy link
Member

leMaik commented Mar 11, 2022

@aTom3333 Dropdown with star, circle, …, custom?

@leMaik leMaik merged commit 8bd2879 into chunky-dev:master Mar 12, 2022
@leMaik
Copy link
Member

leMaik commented Mar 12, 2022

It's amazing how you keep delivering some of the best features of 2.5 🎉 👏

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

Successfully merging this pull request may close these issues.

4 participants