Camera non uniform bokeh support

Discussion related to the LuxCore functionality, implementations and API.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Camera non uniform bokeh support

Post by Dade »

The v2.5 branch has now the support for camera non uniform bokeh (from issue https://github.com/LuxCoreRender/LuxCore/issues/409).

It can be enabled with the following camera properties:

Code: Select all

# Number of camera blades (must be > 3 to enable bokeh)
scene.camera.bokeh.blades = 6
# NONE, UNIFORM, EXPONENTIAL, INVERSEEXPONENTIAL, GAUSSIAN, INVERSEGAUSSIAN or TRIANGULAR
scene.camera.bokeh.distribution.type = EXPONENTIAL
# Distribution power, 0 or more, affects only EXPONENTIAL and INVERSEEEXPONENTIAL distributions
scene.camera.bokeh.power = 0
# For anamorphic bokeh, the scale vector is normalized (so the length doesn't matter)
scene.camera.bokeh.scale.x = 1
scene.camera.bokeh.scale.y = 1
They affects only perspective cameras.

It can produce many types of bokeh effects:

bokeh1.jpg
bokeh2.jpg
bokeh3.jpg
Old LuxRender wiki has a quite comprensive explanation of bokeh: https://web.archive.org/web/20161014045 ... ld_of_View
Support LuxCoreRender project with salts and bounties
jgrover110
Posts: 47
Joined: Tue Apr 17, 2018 1:07 pm

Re: Camera non uniform bokeh support

Post by jgrover110 »

Is it possible to create an oval aperture for anamorphic bokeh?
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Camera non uniform bokeh support

Post by Dade »

jgrover110 wrote: Thu Jul 23, 2020 1:55 pm Is it possible to create an oval aperture for anamorphic bokeh?
I can add an option for anisotropic bokeh :idea:
Support LuxCoreRender project with salts and bounties
User avatar
Sharlybg
Donor
Donor
Posts: 3101
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: Camera non uniform bokeh support

Post by Sharlybg »

Awesome ! 2.5 will be famous :geek:
Support LuxCoreRender project with salts and bounties

Portfolio : https://www.behance.net/DRAVIA
tokiop
Posts: 42
Joined: Fri Apr 13, 2018 8:11 pm

Re: Camera non uniform bokeh support

Post by tokiop »

Nice feature, thanks Dade! On the subject, some renderers can make use of an "aperture map", an image texture providing the bokeh shape, for example to produce "heart bokeh", or simlate imperfections. Not sure how useful it is, but being able to provide a map is user friendly.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Camera non uniform bokeh support

Post by Dade »

Dade wrote: Thu Jul 23, 2020 2:49 pm
jgrover110 wrote: Thu Jul 23, 2020 1:55 pm Is it possible to create an oval aperture for anamorphic bokeh?
I can add an option for anisotropic bokeh :idea:
Done:

Code: Select all

scene.camera.bokeh.blades = 64
scene.camera.bokeh.distribution.type = UNIFORM
scene.camera.bokeh.scale.x = 1
scene.camera.bokeh.scale.y = 3
bokeh4.jpg
Support LuxCoreRender project with salts and bounties
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Camera non uniform bokeh support

Post by Dade »

tokiop wrote: Thu Jul 23, 2020 4:11 pm Nice feature, thanks Dade! On the subject, some renderers can make use of an "aperture map", an image texture providing the bokeh shape, for example to produce "heart bokeh", or simlate imperfections. Not sure how useful it is, but being able to provide a map is user friendly.
It is possible but not trivial, we can add it if there is enough demand in the future.
Support LuxCoreRender project with salts and bounties
User avatar
Sharlybg
Donor
Donor
Posts: 3101
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: Camera non uniform bokeh support

Post by Sharlybg »

It is possible but not trivial, we can add it if there is enough demand in the future.
These day where i want to clone you :mrgreen:
Support LuxCoreRender project with salts and bounties

Portfolio : https://www.behance.net/DRAVIA
jgrover110
Posts: 47
Joined: Tue Apr 17, 2018 1:07 pm

Re: Camera non uniform bokeh support

Post by jgrover110 »

Dade wrote: Fri Jul 24, 2020 11:42 am
Dade wrote: Thu Jul 23, 2020 2:49 pm
jgrover110 wrote: Thu Jul 23, 2020 1:55 pm Is it possible to create an oval aperture for anamorphic bokeh?
I can add an option for anisotropic bokeh :idea:
Done:

Code: Select all

scene.camera.bokeh.blades = 64
scene.camera.bokeh.distribution.type = UNIFORM
scene.camera.bokeh.scale.x = 1
scene.camera.bokeh.scale.y = 3

bokeh4.jpg
Thank you! :D
Shantarli
Posts: 10
Joined: Fri Jun 19, 2020 6:05 pm

Re: Camera non uniform bokeh support

Post by Shantarli »

This is great, thanks a lot for your work <3 Can't wait B.Y.O.B. to enable this feature in BlendLuxCore in some "pre-alpha 2.5" build :)
Post Reply