[Tutorial] A real dynamic light system

Discussion and feedback on Construct 2

Post » Sat Feb 27, 2016 12:36 am

LeuNoeleeste wrote:It's ready, and takes almost 25 pages. I'll add some gifs and probably a video, and I'll have it corrected by a real english dude (I'm french, I did my best to write everything correctly but I suppose there's still some incomprehensible bullshit somewhere) then I'll submit it. Any feedback will be welcome, so when I'll post it there, feel free to say anything. It should be available in two weeks, maybe earlier.


Cool! looking forward to it! :)
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
81
S
23
G
20
Posts: 1,952
Reputation: 18,131

Post » Sat Feb 27, 2016 11:42 am

LeuNoeleeste wrote:It's ready, and takes almost 25 pages. I'll add some gifs and probably a video, and I'll have it corrected by a real english dude (I'm french, I did my best to write everything correctly but I suppose there's still some incomprehensible bullshit somewhere) then I'll submit it. Any feedback will be welcome, so when I'll post it there, feel free to say anything. It should be available in two weeks, maybe earlier.

Sounds great :)
B
127
S
33
G
17
Posts: 1,530
Reputation: 20,414

Post » Sat Feb 27, 2016 11:53 am

Looking forward to the tutorial
B
48
S
20
G
13
Posts: 174
Reputation: 10,087

Post » Wed Mar 02, 2016 12:36 pm

i saw these videos and i am wondering @ashley if its possible to make it happen in c2. Or in c3.

https://www.youtube.com/watch?v=y-XIYcXBUpk&list=PLS1isXrOTxypSXDFgLwPmE3pQVqflhR_s i know this made with unity and its hard to compete but the result is fantastic the normals the lights very polished and clear..hope one day we have the ability to achieve something like that.

also i saw this https://www.youtube.com/watch?v=LDYXCOX0rg0&list=PLS1isXrOTxypSXDFgLwPmE3pQVqflhR_s&index=3 where the lighting effects is great too..

don't get me wrong but the normals and the lights/shadows in c2 i think is at a very beginning status so far and im still confusing to use them properly. Also as my first priority in a game is the artistic part (cause art is my hobby) i think that games with great implementation of lighting system boost a game really up.lighting in game is the alpha and omega so why not to have at least better choises?

@ashley is it difficult to have lights (point lights, directional lights(with rotation capability like particles ) etc with fade out, different colours and shadows more realistic? I mean no cube-based shadows but with more details and lets say to have the option in the game to choose between levels of shadows quality low (cube shaped shadows, medium and higher (more complex, based in the sprites collision points). and another idea is some sprites to emit light based on the colision points too.like a hexagon to emit light from six diffrent directions..
B
18
S
3
G
1
Posts: 248
Reputation: 2,348

Post » Thu Mar 03, 2016 10:16 am

@spy84 , is this even possible with webGl technology..? And even if there are features that are not been utilized by the engine yet, this is probably due to compatibility issues. Ashley wants Construct to produce stuff that run on every platform on all modern devices. This is a huge area to cover and this promise, unfortunately, comes with many compromises.
composer - multimedia artist
www.eli0s.com/en/
B
68
S
26
G
4
Posts: 1,145
Reputation: 9,647

Post » Thu Mar 03, 2016 11:29 am

I'm not really clear what people are asking for - things like point lights are already supported (just use a radius of 0), and linking to a half-hour long video with loads of effects does not really make it clear what you're emphasising... and other effects like fade-out can be done with layer effects. You suggest making lights cast shadows from collision poylgon points too, and, erm, that's exactly what it does already. So I don't really know what you want that can't be done already?
Scirra Founder
B
386
S
229
G
87
Posts: 24,207
Reputation: 191,572

Post » Thu Mar 03, 2016 12:05 pm

@ashley is it possible to upload a tutorial how to make something to have the same results like the games in the videos i uploaded above?i think that lighting system is very basic so far. and a video of loads of effects propably is the way to ask if we could have such effects and if we already have it how to use it, so a tutorial maybe is vital. cause the topic has the title " a REAL dynamic light system" thats the reason i post something i want to achieve as a result and asked you before IF it is possible.

it will be nice if we can have effects like these on SoundSphere with c2 and as you say its possible please give your advise
B
18
S
3
G
1
Posts: 248
Reputation: 2,348

Post » Thu Mar 03, 2016 12:22 pm

@Ashley , what is been asked is for a unified "lighting" system that takes into account any light(s) position, color, intensity withing the layout, and reacts accordingly to both:
a) Illuminating the scene (casting shadows, preferably with a falloff option)
b) Responding to any normal maps.

The lighting-shadowing system that exists in c2 now is problematic, having more than one light sources produces artifacts, it needs a lot of preperation just to achieve a simple falloff effect and it doesn't react at all with normal textures.

The normal-bump effect within c2 is not useful for most situations.

I hope the above make sense, I can't express my self more clearly that this, I'm sorry, we are hitting the language barrier here :P
composer - multimedia artist
www.eli0s.com/en/
B
68
S
26
G
4
Posts: 1,145
Reputation: 9,647

Post » Thu Mar 03, 2016 2:38 pm

Well, you can do quite well already with a few layer effects and techniques - here's an example with 2 moving lights casting shadows, each with fade-out: https://dl.dropboxusercontent.com/u/15217362/2waylight.capx

It does become difficult though when the lights move further apart. Because they draw shadows instead of light, it's quite tricky if one light is casting a shadow over another. It's hard to make it brighten the shadow back to lightness.

The best approach is to start with darkness, and then add lights on top, additively blending so they contribute light. This means later lights can light up areas that are in the shadow of other lights. It also makes colored lights easy. Then you can multiply-blend the resulting "lighting map" with the background, and it applies lighting to the game.

I thought we'd need nested layers to do this, but no! It's also already possible: https://dl.dropboxusercontent.com/u/15217362/3waycoloredlights.capx

The real trick is multiply is associative. It's hard to have your background and then have multiple lights on top of that, because it's difficult to render the lights together and then multiply blend the end result without nested layers. So - you can render all the lights first, and multiply the background on top of that! It works out the same because a x b is the same as b x a, so the ordering doesn't matter. So here the crux of the trick is you'll notice the background layer on top of all the lights.

You're right, this would make a good tutorial ;)
Scirra Founder
B
386
S
229
G
87
Posts: 24,207
Reputation: 191,572

Post » Thu Mar 03, 2016 4:09 pm

Ashley wrote:Well, you can do quite well already with a few layer effects and techniques - here's an example with 2 moving lights casting shadows, each with fade-out: https://dl.dropboxusercontent.com/u/15217362/2waylight.capx

It does become difficult though when the lights move further apart. Because they draw shadows instead of light, it's quite tricky if one light is casting a shadow over another. It's hard to make it brighten the shadow back to lightness.

The best approach is to start with darkness, and then add lights on top, additively blending so they contribute light. This means later lights can light up areas that are in the shadow of other lights. It also makes colored lights easy. Then you can multiply-blend the resulting "lighting map" with the background, and it applies lighting to the game.

I thought we'd need nested layers to do this, but no! It's also already possible: https://dl.dropboxusercontent.com/u/15217362/3waycoloredlights.capx

The real trick is multiply is associative. It's hard to have your background and then have multiple lights on top of that, because it's difficult to render the lights together and then multiply blend the end result without nested layers. So - you can render all the lights first, and multiply the background on top of that! It works out the same because a x b is the same as b x a, so the ordering doesn't matter. So here the crux of the trick is you'll notice the background layer on top of all the lights.

You're right, this would make a good tutorial ;)


Links are not working ^^''
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
81
S
23
G
20
Posts: 1,952
Reputation: 18,131

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: Tokinsom and 2 guests