[Tutorial] A real dynamic light system

Discussion and feedback on Construct 2

Post » Wed Mar 09, 2016 7:50 am

spy84 wrote:and why in c3? c2 is a good start too.

Because the C2 editor has some limitations. This is why Scirra has to build it up again for C3. Also they are pretty busy developing the new editor. So I think we shouldn't expect features like this for C2. I'd be happy if they manage to include such features into C3.
B
121
S
31
G
17
Posts: 1,468
Reputation: 19,930

Post » Wed Mar 09, 2016 12:08 pm

@eli0s - that is an excellent demo video, great job. The trouble is there really is a huge amount of features proposed in it! It amounts to considerably redesigning large parts of the engine to get that kind of workflow. So I don't think there is much we can do until some time after C3's release. I do like the ideas a lot though.

I do think its one disadvantage is there is too much built-in stuff happening. For example as it stands now, you can apply effects to the shadows, modify the appearance of the sprite for the light radius, and even use custom light blending by changing the layer effects being used. In your demo the light is basically acting like an entire layer, but with fewer features. We've always tried to avoid this kind of "cookie cutter" approach where you can only have it one way or not at all. So I think the best approach is to have something like what is in your video, but still using the "lighting layer" system. This probably also involves nested layers, but I think they have several other uses outside of lighting, so that would be good to add anyway. A lighting layer also allows a general-purpose approach to lighting - there could even be other plugins that can draw lights in different ways.
Scirra Founder
B
378
S
220
G
84
Posts: 23,863
Reputation: 188,019

Post » Thu Mar 10, 2016 9:13 am

@PieceMaker , @Colludium , @shinkan , @glerikud , @spy84 ,

Thank you guys! :)

@Ashley , thank you for answer!

Yes, I mention many things and features! I could have mentioned many-many more! :D

I also understand that it is incredibly difficult to develop this software! However, since you are more than capable do develop it (I wish I was half as smart as you are :oops: ), why not do it in a way that it could result in a more functional, out of the box, software?
That is, if you agree that the things I mention are indeed helpful and could improve the workflow!

Now, you are mentioning the “cookie cutter” approach, and I agree that as users should be able to make our own systems, however, what I ask is for some basic, standard functions, as a starting point, a system that works well the basics and reacts closely to what we consider as “normal” Light behavior.
Just as I don’t “have” to build from scratch the Platform behavior and how it interacts with the solids (I wish however that it was unified with the Physics plugin, but that’s for another topic), I wish for a Lighting system that provides me with the basic stuff out of the box: Insert a light, set it’s radius, color and falloff, place it in your scene to illuminate some part of it, repeat as you please! Shadows and normal bumping will react automatically and you won’t have to worry about it!
This doesn’t mean that you won’t have the option to add more stuff on top of that! You could still change the blending modes for each light, add colored Sprites of any shape above and blend them with the light, mask out any parts of the light with other Sprites and Destination out blending, add webGL effects to the light etc.… We should be able to do all of those things, and more…
To be honest, I don’t really get how those nested layers could work with lighting, I’m not familiar with the term (I guess they are something like layers within a group like in Photoshop?), and I haven’t seen any other software that use them to understand their benefits. I vote for them however, the more options the better!!!

Anyway, please just keep in mind that there are many good, even great suggestions around the forum that have the potential to vastly improve Construct’s workflow, productivity and end result. Since you are developing C3, taking some of these suggestions into account early on, could help deliver a more robust and complete solution software from the start, rather than adding and changing things along the way, which is something that could cause backwards incompatibility issues, like when we were discussing about the Tilled BG object and if it should be removed-replaced by a more advanced Sprite Object…

Anyhow, who am I to tell you how to run your business, right?! :shock: Please know that I’m just saying all those things out of genuine interest about Construct, the only software development platform that allowed me to express my creativity interactively!!!
I want a better Construct, it will help me be better also! :P

Be well
composer - multimedia artist
www.eli0s.com/en/
B
63
S
26
G
4
Posts: 1,145
Reputation: 9,517

Post » Thu Mar 10, 2016 10:57 am

@eli0s, I think your suggestions are spot-on.

What's fantastic about c2 is the community feel to its development, even though it's a commercial product. The Overlap 2d editor is open source - made for its community by members of the community - and that's why it offers such a shiny and capable product for free. Exactly what you want in a way you would like to have it. The same goes for the Godot Engine - another open source editor (this time it's a complete 2d / 3d game engine). I suggest it's worthy of a download (also download the demo package) only to see how painfully easy it is to create 2d lights. Later this year it's going to introduce visual scripting and, if they don't screw it up, it'll be a real challenger for c2 and, perhaps, c3.
B
68
S
17
G
65
Posts: 2,182
Reputation: 41,304

Post » Thu Mar 10, 2016 1:26 pm

if godot engine adds a visual scripting then i take a look.. But im affraid that all of the engines except c2, stencyl, fusion which are using the moto "visual scripting no coding" is some kind of misleading. yes the have visual scripting but is for people that already know at least some basics of programming. you see in c2 all the events and action points are camouflaged under names that even a no coder understands at the very first time. In unity and ue4 for example the visual scripting is blocks with names that a coder understands but an novice like me don't get it so easy or at all..if you are a coder is a great tool cause you save a lot of time but for a novice i dont think its so handy either..
B
18
S
3
G
1
Posts: 248
Reputation: 2,348

Post » Thu Mar 10, 2016 2:58 pm

@spy84 - I agree - I find c2's event system more intuitive to use. I just want c2 to be the best tool to use, both logically in its event system and also visually in how it appears to the dev.
B
68
S
17
G
65
Posts: 2,182
Reputation: 41,304

Post » Fri Mar 11, 2016 9:13 am

eli0s wrote:To be honest, I don’t really get how those nested layers could work with lighting, I’m not familiar with the term (I guess they are something like layers within a group like in Photoshop?)


You are correct, nested means "layer within layer" basically.
But for lighting it's a cumbersome solution compared to just screening all the lights in just one black opaque layer which is multiplied on the background.

When I do graphics-related compositing I use nested systems all the time, but I can't really think of many uses for nested layers really. The only situation I can think of is when you have several separated objects you need to blend as one, such as screening together two objects and them blend the result with something else. I still feel it's a completely redundant solution to the lighting system. It's not very intuitive.

I hope I don't sound too negative here, I enjoy C2 a lot. But you want your tool to work intuitively, and for the lighting blending I see no more intuitive way than how you visualize it in your mockup.

The only thing I feel is missing from your video is a clarification how the Shadow Light object is blended with underlying objects.

Currently it looks like it's using alpha channel to achieve the shadowing effect. I think Ashley mentioned this can limit the user freedom how the Shadow Light object effects your scene, and I agree. Like if you change the blending mode on the Shadow Light, the alpha of the object will screw up the blending effect.

If the Shadow Light object is opaque as default, the user have the freedom to choose which blending is the most suitable.

• Have only one light source? Multiply the Shadow Light. Can be done on the same layer as your other objects as long as the Z order is correct.
• Have multiple light sources? Screen them together in a layer that is multiplied on your other layers.

Or just go crazy with any of the other blending modes.

That's the most intuitive and flexible lighting solution I can think of concerning the blending.
B
3
Posts: 5
Reputation: 185

Post » Fri Mar 11, 2016 11:46 am

@PieceMaker ,

Thank you for explaining me nested layers! I can think of some uses, especially for masking purposes, or for applying effects targeting multiple layers. Still, the problem with "Layers" in general is that they stack on top of each other, no matter what, so they are bound to have "ordering" limitations.

Let's say, for example, you have 3 layers stacked/nested together. You can manipulate them just fine, however, what will happen if you have one separate layer on top, outside the nested group (a 4rth layer), and another layer on top of that (a 5fth layer) that also needs to behave as nested with the first 3 layers for some reason..?

I stumble with this problem all the time with After effects, where I want to precompose some layers that are spread within the hierarchy (have other layers in between) and it simply doesn't work. I have to resolve to several copies and procompositions. The same happen when masking with "track mattes", I have to duplicate the matte layer for each other layer I want to mask in/out.

This is where I think that the vertical workflow of the layer basted system is very restricting, while a non-linear, node based one has very advantages, especially when reusing the same nodes.

But enough with the After Effects analogy-rant! Unless it's time to re-introduce the request for a timeline within Construct, in that case, I will continue referencing AE, perhaps even Flash :shock:

As for the lighting method I propose, well, I left this vague on purpose, because I don't really know how it should work :o ! It will depend on the technology that will be used for the Lighting system, I am sure it has to be something more complicated than drawing and overlaying some shaded polygons, since it will have to respect multiple light sources that in return should interact with other light's shadows. And it should be fast! I'm thinking that you should be able to lit an entire level just with lights!

I have no idea what libraries can do that, so I don't know how they will work, blend together or whatever they might have to do. What I wanted to depict is the workflow and how lights should affect other light's shadows and bump-mapping, with just a few clicks.
composer - multimedia artist
www.eli0s.com/en/
B
63
S
26
G
4
Posts: 1,145
Reputation: 9,517

Post » Sat Mar 12, 2016 3:22 pm

Message: PieceMaker can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
eli0s wrote:As for the lighting method I propose, well, I left this vague on purpose, because I don't really know how it should work :o ! It will depend on the technology that will be used for the Lighting system, I am sure it has to be something more complicated than drawing and overlaying some shaded polygons, since it will have to respect multiple light sources that in return should interact with other light's shadows. And it should be fast! I'm thinking that you should be able to lit an entire level just with lights!

I have no idea what libraries can do that, so I don't know how they will work, blend together or whatever they might have to do. What I wanted to depict is the workflow and how lights should affect other light's shadows and bump-mapping, with just a few clicks.


Well, in my mind blending modes gives the user freedom whether the individual Shadow Lights should be screened or added (dodged), hence why the user should be able to turn the Shadow Light effect opaque.

With the tests I have made I reached the conclusion that screening individual lights looks best, since (I think) we're dealing with 8-bit rendering here. In the real world, light is additive, but that would require a floating point rendering rather than 8 or 16-bit colour depth. Floating colour for this kind of engine is way overkill, so I don't feel it is necessary. And Add-blending tends to create ugly blobs when two light sources are mixed together. Yet the user should have the freedom to choose what to make of the effect.

This is a gif of the simple test I did with the lighting.
Image
https://imgur.com/Mojlpsn

It is created with the same methods described by Ashley in the lighting tutorial. Although I am stuck with a limited number of lights, this is four dynamic lights with the demo running smoothly. I think this principle can hold at least ten lights at once on my regular laptop, I haven't tested it though, but using blending modes feels quite fast. And since I have a background in compositing, using blending modes for lighting feels very logical.

I am no programmer though, so I really don't know if it's more efficient to blend these lights using alpha channel.

But I do agree that AE's layer system provides both goods and bads. It's fast, but the flow of things are restricted by the layer order.
B
3
Posts: 5
Reputation: 185

Post » Fri Jun 17, 2016 7:13 pm

PieceMaker wrote:
eli0s wrote:As for the lighting method I propose, well, I left this vague on purpose, because I don't really know how it should work :o ! It will depend on the technology that will be used for the Lighting system, I am sure it has to be something more complicated than drawing and overlaying some shaded polygons, since it will have to respect multiple light sources that in return should interact with other light's shadows. And it should be fast! I'm thinking that you should be able to lit an entire level just with lights!

I have no idea what libraries can do that, so I don't know how they will work, blend together or whatever they might have to do. What I wanted to depict is the workflow and how lights should affect other light's shadows and bump-mapping, with just a few clicks.


Well, in my mind blending modes gives the user freedom whether the individual Shadow Lights should be screened or added (dodged), hence why the user should be able to turn the Shadow Light effect opaque.

With the tests I have made I reached the conclusion that screening individual lights looks best, since (I think) we're dealing with 8-bit rendering here. In the real world, light is additive, but that would require a floating point rendering rather than 8 or 16-bit colour depth. Floating colour for this kind of engine is way overkill, so I don't feel it is necessary. And Add-blending tends to create ugly blobs when two light sources are mixed together. Yet the user should have the freedom to choose what to make of the effect.

This is a gif of the simple test I did with the lighting.
Image
https://imgur.com/Mojlpsn

It is created with the same methods described by Ashley in the lighting tutorial. Although I am stuck with a limited number of lights, this is four dynamic lights with the demo running smoothly. I think this principle can hold at least ten lights at once on my regular laptop, I haven't tested it though, but using blending modes feels quite fast. And since I have a background in compositing, using blending modes for lighting feels very logical.

I am no programmer though, so I really don't know if it's more efficient to blend these lights using alpha channel.

But I do agree that AE's layer system provides both goods and bads. It's fast, but the flow of things are restricted by the layer order.


Any chance of getting a demo of this?
B
11
S
8
G
9
Posts: 10
Reputation: 5,573

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: SnipG, yme and 5 guests