Discussion related to the LuxCore functionality, implementations and API.
-
Dade
- Posts: 5012
- Joined: Mon Dec 04, 2017 8:36 pm
- Location: Italy
Post
by Dade » Thu Jul 23, 2020 1:03 pm
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:
Old LuxRender wiki has a quite comprensive explanation of bokeh:
https://web.archive.org/web/20161014045 ... ld_of_View
-
jgrover110
- Posts: 47
- Joined: Tue Apr 17, 2018 1:07 pm
Post
by jgrover110 » Thu Jul 23, 2020 1:55 pm
Is it possible to create an oval aperture for anamorphic bokeh?
-
Dade
- Posts: 5012
- Joined: Mon Dec 04, 2017 8:36 pm
- Location: Italy
Post
by Dade » 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

-
Sharlybg
- Posts: 2580
- Joined: Mon Dec 04, 2017 10:11 pm
- Location: Ivory Coast
Post
by Sharlybg » Thu Jul 23, 2020 3:11 pm
Awesome ! 2.5 will be famous

-
tokiop
- Posts: 33
- Joined: Fri Apr 13, 2018 8:11 pm
Post
by tokiop » 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.
-
Dade
- Posts: 5012
- Joined: Mon Dec 04, 2017 8:36 pm
- Location: Italy
Post
by Dade » 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
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
-
Dade
- Posts: 5012
- Joined: Mon Dec 04, 2017 8:36 pm
- Location: Italy
Post
by Dade » Fri Jul 24, 2020 11:43 am
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.
-
Sharlybg
- Posts: 2580
- Joined: Mon Dec 04, 2017 10:11 pm
- Location: Ivory Coast
Post
by Sharlybg » Fri Jul 24, 2020 12:43 pm
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

-
jgrover110
- Posts: 47
- Joined: Tue Apr 17, 2018 1:07 pm
Post
by jgrover110 » Fri Jul 24, 2020 7:19 pm
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
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!

-
Shantarli
- Posts: 9
- Joined: Fri Jun 19, 2020 6:05 pm
Post
by Shantarli » Mon Jul 27, 2020 12:03 am
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
