Coloured lighting?

Get help using Construct 2

Post » Fri Jan 06, 2012 5:04 pm

Hi! New to the forum, but been using construct and the irc for a while now.. I was just wondering if anyone had any idea on how to accomplish coloured lighting?

Just like how the lighting.capx example does it 'cept in colour.

I felt a bit silly when trying to achieve this by simply turning the light sprite into a coloured one.. it's clearly not how it works!
I'm guessing it isn't possible just yet.. but i'm not 100% sure which is why i'm asking

after checking the effects example cap, I understand how the individual effects work, but to be honest the full practical uses of them or combinations of them escapes me, could anyone give examples of how they could be used?

Thanks in advance!
B
28
S
8
G
1
Posts: 469
Reputation: 4,683

Post » Fri Jan 06, 2012 5:06 pm

*by effects i'm referring to the (additive, copy, xor, destination over.. etc etc)
B
28
S
8
G
1
Posts: 469
Reputation: 4,683

Post » Fri Jan 06, 2012 5:32 pm

Here ya go - http://dl.dropbox.com/u/8177003/Construct%202/ColoredLighting.capx
Mess with the opacity and size to get the intensity you want. As for the other effects, check out the manual. I think it has a page on them.
B
16
S
3
G
5
Posts: 43
Reputation: 3,880

Post » Fri Jan 06, 2012 6:21 pm

Hi, thanks for the quick reply!..
unfortunately, i've already tried doing this.. whilst it looks okay for light, somewhat muted colours, it's not exactly how light works (it's kind of like how it would work with thin layer of fog being lit up and washing over the existing colours... see how it brightens the dark "html" text?..when really black should absorb all light and remain black)

Here's kind of what i'm aiming for here:
before http://dl.dropbox.com/u/53374990/before.png
after http://dl.dropbox.com/u/53374990/after.png
even though this is a kind of garish and extreme example, (plus, again i don't think it's entirely accurate), it would still allow for much more vivid lighting (like deep red emergency lights)

The red blue n green are additive to each other, surrounded by black, on an overlay layer atop the 'before' image.

The more i'm thinking about it the less it seems possible... without the equivalent of an overlay blending mode D: ..unless, of course there's some cunning trickery
B
28
S
8
G
1
Posts: 469
Reputation: 4,683

Post » Fri Jan 06, 2012 9:41 pm

not useable in a game but it was fun to do
http://dl.dropbox.com/u/23551572/C2-Gam ... index.html

fear the capx :D
lighting.capx
Last edited by Yann on Sun Sep 14, 2014 10:16 pm, edited 1 time in total.
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Fri Jan 06, 2012 10:31 pm

@Yann, Loving it!! Looks really nice. How easy do you think it would be to make one of them spotlite things? you know where the lights are moving in a circular motion? That might look quite nice in my game :)
B
29
S
12
G
7
Posts: 740
Reputation: 7,849

Post » Fri Jan 06, 2012 10:34 pm

You have to wait for real pixelshader hardware accelerated fx, my thing can't work in real time the process is too heavy
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Fri Jan 06, 2012 10:44 pm

Ahh that would have been coooooooool!!
B
29
S
12
G
7
Posts: 740
Reputation: 7,849

Post » Sat Jan 07, 2012 12:12 am

Canvas doesn't have much in the way of effects right now - we aim to add more effects for WebGL mode in future, but Canvas 2D doesn't support that so for now we're sticking mostly to what both Canvas 2D and WebGL can both manage.
Scirra Founder
B
359
S
214
G
72
Posts: 22,951
Reputation: 178,578

Post » Sat Jan 07, 2012 2:24 am

Guys
It will be easier if you
Make individual light sprites
Can be made with photoshop
B
35
S
16
G
16
Posts: 2,222
Reputation: 16,589

Next

Return to How do I....?

Who is online

Users browsing this forum: Calfuso, ETgirl79, totoe and 23 guests