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: Non-Uniform Bokeh Support #409

Closed
rrubberr opened this issue Jul 20, 2020 · 9 comments
Closed

Feature Request: Non-Uniform Bokeh Support #409

rrubberr opened this issue Jul 20, 2020 · 9 comments
Assignees

Comments

@rrubberr
Copy link

rrubberr commented Jul 20, 2020

In LuxRender, the camera offered support for "Non-Uniform Bokeh Distribution," which allowed the user to set the distribution, number of aperture blades, and power of the distribution. According to the luxrender.net wiki:

"LuxRender also allows for some modifications to the distribution of light across the focus disk or circle of confusion. The distribution and quality of this light is generally called bokeh. This is achieved through the blade number and distribution parameters. Blade number is the number of blades that make up the iris of a lens. A blade number of zero simulates an infinite blade number of a perfect circle, and will result in bokeh disks that are circular... As no lens distributes light uniformly across the focus disk, some non-uniformity is desirable for photorealistic imaging."

(https://web.archive.org/web/20161014045454/http://www.luxrender.net/wiki/LuxRender_Cameras)

Here is an example of the feature present while using LuxRender 1.2.1 in the Blender 2.65a interface:

Capture

This feature was useful in practice, as it allowed users to create much more realistic and high quality bokeh, without resorting to complex setups requiring the use of translucent bokeh images or the compositor. Below I have created some examples using the different distributions, showing their usefulness to generate certain effects.

6 bladed exponential distribution with power 1:
6Blades

22 bladed inverse exponential distribution with power 10:
22inverse

0 bladed (perfectly round) aperture with uniform distribution and power 0 (perhaps the sort of DoF LuxCore is capable of?):
uniform

22 bladed aperture with exponential distribution and power 1:
FinalTS_pregamma_1_mantiuk08_auto_luminance_color_saturation_1_contrast_enhancement_1_postsaturation_1_postgamma_1

Implementing this feature into LuxCore would be useful. Thanks!

@Dade916
Copy link
Member

Dade916 commented Jul 21, 2020

I have a vague memory it was an image post processing feature and not a real camera option. Do you have an LXS file using this feature ? I should be able to track back what it was.

@Theverat
Copy link
Member

@Dade916
Copy link
Member

Dade916 commented Jul 21, 2020

Right, the one I remember was lens flares. This one should be quite easy to add.

@michelchafouin
Copy link

michelchafouin commented Jul 21, 2020

Awesome, I have been waiting for this!

While looking at the bokeh shape, please consider supporting lateral and longitudinal chromatic aberration, the possibility to use a custom bokeh image, and optical vignetting.

@Theverat
Copy link
Member

Do you have some links to information that would help implement all of this, by chance?

@michelchafouin
Copy link

I don't have any white-paper, but someone recreated it physically in Cycles (spoiler: it's extremely slow to render):
https://blenderartists.org/t/advanced-optical-experiments/695835
This page explains well the different lens effects:
http://richardrosenman.com/shop/dof-pro/

@Dade916
Copy link
Member

Dade916 commented Jul 22, 2020

I'm working on it:

bokeh

@Dade916
Copy link
Member

Dade916 commented Jul 23, 2020

@Dade916
Copy link
Member

Dade916 commented Jul 27, 2020

While looking at the bokeh shape, please consider supporting lateral and longitudinal chromatic aberration, the possibility to use a custom bokeh image, and optical vignetting.

@michelchafouin, I added the support for lateral and longitudinal chromatic aberration, it only requires to use two parameters instead of one:

film.imagepipelines.5.0.type = COLOR_ABERRATION
film.imagepipelines.5.0.amount = 0.025 0.005

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

4 participants