Parallax with blend mode

Hi everyone!

I’m trying to achieve grunge/fog effect with parallax.

Let us say I have 2 layers, each one is a display group.

Layer 1 is a fog. Under the layer 1 there is layer 2 with some background images.

Background is moving with some speed and the fog must move twice slower. At the same time I want to use hard light blending mode. How can I achieve this?

And the second a bit more complex question. If I have several layers (background images, front images, physics objects) and I want to fog them all and to use blending mode as well. Is it possible?

Any help is appreciated!

Best regards,

Anton

For parallax, check out the Perspective library: http://code.coronalabs.com/code/perspective-virtual-camera-system

You can see a list of available blending modes here: http://docs.coronalabs.com/api/type/Paint/blendMode.html

Hi, @_memo

Thank you for your answer!

I was looking at composite effects http://docs.coronalabs.com/guide/graphics/effects.html. Using them I can get many blending effects including hard light I’m looking for. The problem is in fact I should pre-define images to blend. But I want to move images separately with live blending.

Blending modes http://docs.coronalabs.com/api/type/Paint/blendMode.html almost solve my problems except they dont offer such blend modes as hard light, overlay etc. As mentioned there I can define custom blend modes but I haven’t found any kind of mapping between custom options and photoshop-style blending modes so far.

We offer many of the Photostop-style blend modes as part of using Composites in Graphics 2.0… Please see:

http://docs.coronalabs.com/guide/graphics/effects.html

Rob

Hello, Rob!

Thanks for your attention!

As I wrote I have seen this guide but it works only if I first create a compositePaint which consists of two images.

But what if I want to move those images one above another? I’m trying to create something like a moving fog…

maybe use a snapshot?

Is it possible to pass a snapshot into a Composite?
 
I mean I can make a snapshot with backgound and second snapshot with fog.
Then I have to create a compositePaint
 
[lua]local compositePaint = {
type=“composite”,
paint1={ type=“image”, filename=“image01.png” }, – snapshot 1 here?
paint2={ type=“image”, filename=“texture.png” } – snapshot 2 here?
}[/lua]

I’m afraid it’s not the solution.

It could be so easy if there were more standard blend modes (http://docs.coronalabs.com/api/type/Paint/blendMode.html). It seems to me even custom blend modes cant help to achieve all photoshop-style modes.

For parallax, check out the Perspective library: http://code.coronalabs.com/code/perspective-virtual-camera-system

You can see a list of available blending modes here: http://docs.coronalabs.com/api/type/Paint/blendMode.html

Hi, @_memo

Thank you for your answer!

I was looking at composite effects http://docs.coronalabs.com/guide/graphics/effects.html. Using them I can get many blending effects including hard light I’m looking for. The problem is in fact I should pre-define images to blend. But I want to move images separately with live blending.

Blending modes http://docs.coronalabs.com/api/type/Paint/blendMode.html almost solve my problems except they dont offer such blend modes as hard light, overlay etc. As mentioned there I can define custom blend modes but I haven’t found any kind of mapping between custom options and photoshop-style blending modes so far.

We offer many of the Photostop-style blend modes as part of using Composites in Graphics 2.0… Please see:

http://docs.coronalabs.com/guide/graphics/effects.html

Rob

Hello, Rob!

Thanks for your attention!

As I wrote I have seen this guide but it works only if I first create a compositePaint which consists of two images.

But what if I want to move those images one above another? I’m trying to create something like a moving fog…

maybe use a snapshot?

Is it possible to pass a snapshot into a Composite?
 
I mean I can make a snapshot with backgound and second snapshot with fog.
Then I have to create a compositePaint
 
[lua]local compositePaint = {
type=“composite”,
paint1={ type=“image”, filename=“image01.png” }, – snapshot 1 here?
paint2={ type=“image”, filename=“texture.png” } – snapshot 2 here?
}[/lua]

I’m afraid it’s not the solution.

It could be so easy if there were more standard blend modes (http://docs.coronalabs.com/api/type/Paint/blendMode.html). It seems to me even custom blend modes cant help to achieve all photoshop-style modes.