What blend mode can give me that effect?

Get help using Construct 2

Post » Wed Apr 20, 2016 2:46 am

R0J0hound wrote:From what I found here:
http://www.zetaprints.com/help/coreldra ... perations/

The "lightness" blend keeps the hue and saturation of the back and keeps the lightness of the front.
The "luminosity" effect in c2 matches that description, but doesn't seem to give the same results. Perhaps it's a bug in it somehow since a fair of math is involved.

The basic logic is to convert the back and front from rgb to hsl, then take the hue and saturation from the back and the lightness from the front to make a new hsl, finally that is converted back into rgb.

That's the logic needed to make an effect, or the info needed to debug the luminosity effect if someone is curious and has the time.

Well... so there is no way to achieve what I want in C2? :\
B
20
S
4
Posts: 385
Reputation: 2,270

Post » Wed Apr 20, 2016 6:11 pm

@Zathan
An effect can do it. I'm just saying there is an existing effect that is supposed to do it, but it appears to be bugged.
B
92
S
32
G
109
Posts: 5,290
Reputation: 70,991

Post » Wed Apr 20, 2016 8:15 pm

R0J0hound wrote:@Zathan
An effect can do it. I'm just saying there is an existing effect that is supposed to do it, but it appears to be bugged.

Ah, ok! sorry hehe

@Ashley,
sorry for bother you, but can you help me here? Seems like some effects aren't working properly.. but I don't know exactly if it's a bug or not, so I'm not posting anything in the bugs section yet.

And I have done another test now too, and I think there is another possible bug with effects... I don't know if it's made to be like that, but if an object in, for example, layer 1, is set with the overlay effect and I put whatever effect on his layer, like blur, the object disappear.

What do you think? is better make a post on bugs section for all of this?
B
20
S
4
Posts: 385
Reputation: 2,270

Post » Wed Apr 20, 2016 8:51 pm

You might give a shout out to @Gigatron
I'm still fairly sure you can replicate it with blend modes.
Although it would probably require multiple objects.
Image ImageImage
B
169
S
50
G
173
Posts: 8,313
Reputation: 110,270

Post » Thu Apr 21, 2016 11:45 am

The HSL effects should work fine if everything is opaque. Dealing with alpha in HSL mode can be very tricky but if you're not using that then the results should be correct. If you think anything is wrong please file a bug report. There is nothing in this thread I can investigate, and last I checked it worked OK.
Scirra Founder
B
397
S
236
G
88
Posts: 24,389
Reputation: 194,448

Post » Thu Apr 21, 2016 2:26 pm

Zathan wrote:I really need that effetct in my game:
https://onedrive.live.com/redir?resid=3 ... hoto%2cjpg
But I couldn't achieve this.. with the "overlay" effect it got close, but is invisible in black backgrounds...

Can someone help me? :?

@Zathan

My english is poor , but i have done quickly something like your picture;
http://gigatron3k.free.fr/html5/C2/FX/cblend
If it's right i must include some variables like blend factor etc...
However, I still don't see what you want to do ..

Regards
http://gigatron3k.free.fr/Intro/

https://www.shadertoy.com/user/gigatron

https://twitter.com/realistquantum

Ezekiel 1-4 ; ufo landing explanation ..

CONSTRUCT 2 THE ONLY FAST WAY TO HTML5

Image
B
61
S
21
G
29
Posts: 821
Reputation: 22,205

Post » Thu Apr 21, 2016 4:24 pm

I tried to compare the result of the luminosity effect with the lightness effect in an image editor, but the results seem to be expected. Disregard the bug idea.
B
92
S
32
G
109
Posts: 5,290
Reputation: 70,991

Post » Thu Apr 21, 2016 9:14 pm

Ashley wrote:The HSL effects should work fine if everything is opaque. Dealing with alpha in HSL mode can be very tricky but if you're not using that then the results should be correct. If you think anything is wrong please file a bug report. There is nothing in this thread I can investigate, and last I checked it worked OK.

Hmm... ok Ashley, thank you very much for the answer!

@Gigatron
Here is a capx to better demonstrate the effect I want.
https://onedrive.live.com/redir?resid=3 ... ile%2ccapx
As you can see, when the sprite with the blend is on front of a black one, it disappear, instead of 'turn' white, like the image I attached on the post. As I said, coreldraw have a blend mode called 'lightness', that does exactly what I want.. but seems like C2 don't.

I was trying to find a way to achieve this with blend modes, with no need for sprite duplications.. but seems like that will be the way hehe

By the way, thank you for the example you made! how exactly did you get this result?
B
20
S
4
Posts: 385
Reputation: 2,270

Post » Thu Apr 21, 2016 11:02 pm

@Zathan
If it's become invisible with Overlay blend then we can continue the test like this ;

if (back.r<0.1 && back.g<0.1 && back.b<0.1 ) {front.r=1.0;front.g=1.0;front.b=1.0;} // set to white

http://gigatron3k.free.fr/html5/C2/FX/cblend2
http://gigatron3k.free.fr/Intro/

https://www.shadertoy.com/user/gigatron

https://twitter.com/realistquantum

Ezekiel 1-4 ; ufo landing explanation ..

CONSTRUCT 2 THE ONLY FAST WAY TO HTML5

Image
B
61
S
21
G
29
Posts: 821
Reputation: 22,205

Post » Fri Apr 22, 2016 1:08 am

Gigatron wrote:@Zathan
If it's become invisible with Overlay blend then we can continue the test like this ;

if (back.r<0.1 && back.g<0.1 && back.b<0.1 ) {front.r=1.0;front.g=1.0;front.b=1.0;} // set to white

http://gigatron3k.free.fr/html5/C2/FX/cblend2

Hehe awesome!
how did you do it? Can't be done by events, right?
B
20
S
4
Posts: 385
Reputation: 2,270

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 26 guests