separating bokeh effect onto its own layer?

Talk about Pixelmator Pro, share tips & tricks, tutorials, and other resources.
User avatar

2018-12-13 17:29:14

Hi there, I'm still new to Pixelmator Pro (and photo manipulation in general) and was wondering if there was an easy way of having a layer that's just the bokeh effect I've applied on an image.

Specifically, I'm trying to export the various layers of my image (base image, bokeh effect) separately so that I can then have the bokeh layer moving independently from the base image in my software (it's for a video game).

Is this easy to do?
User avatar

2018-12-14 09:56:15

Exporting the bokeh texture itself is pretty easy, but the tricky part is blending it with everything below — we use the Screen blending mode to blend it with the image. With that in mind, here's how I'd approach this:

1. Add an empty new layer (Insert > New Layer) to your image.
2. Apply the Bokeh effect to it.

Note that, when applied to an empty layer, the effect is much more intense because when you apply it directly to a photo, the bokeh is blended using the Screen blending mode. Now, it's blending with the empty layer (i.e. nothing) using Screen and with the rest of the image using the Normal blending mode. You can choose the Style tool and change the blending mode of the empty layer to Screen if you want to make sure that I'm telling the truth.

3. Control-click that layer in the Layers sidebar and choose Effects > Flatten Effects. (it will switch back to the intense version because the blending mode will change to Normal again, but this is actually a bug, flattening the effects shouldn't affect the layer's blending mode — we'll fix this).
4. Control-click the layer in the Layers sidebar again and choose Add for Export. You can also add any other layers you'd like to export as individual images.

You'll have your bokeh as a separate image and, in your game, you'll need to find a way to blend it using Screen, which seems like it should be possible...
User avatar

2019-01-17 01:11:40

Sorry for the late delay (was a very hectic holiday season here...) but thank you very much for the detailed overview!