[Effect] : 2D Dynamic Lighting

1 favourites
From the Asset Store
Immerse your quiz games with our 6 unique music loops, ranging from acoustic chill guitar to cute and upbeat style.
  • I've been working with another shader script I came across. As a noob, I know pretty much nothing about shaders but I wanted to make it work in Construct so I made this.

    In the rar is the capx and the effect files, I can't upload to dropbox cause I'm at work and someone was really stupid blocking dropbox... Click on the blue square and drag it around so the blue light can move. I was about to put one more light in there but first I wanted to ask you guys about some ideas I've got.

    Hope someone can help me with some ideas I've got. I can hardcode more lights, or even pass the number of lights I want to, that's easy.

    After working with this I have many doubts

    1.- How can I apply the same light to a different texture, let's say I've got a character Sprite in the center of the rock image in the CAPX. Do I have to put the same effect on it? Is there a way that different textures with their own normal maps share the same light?

    2.- Is it possible to create some kind of light objetc plugin from this?

    Excuse me if I'm being stupid here, as I said, I don't know much about how all this work. Create a "light casting" object, look for how many normal maps are in the same layer or a map with a "is_normal" value and then process them with the same light?

    After all, I believe this is the same thing I asked first, is it possible to use the same light or light effect for two different textures/normal maps?

    Fixed the link to my project. You can see the demo here. Used R0J0hound images now just to see the difference between his and mine.

    Here's the demo: Demo

    Grab the blue square and drag it around to see the effect.

    Here's the capx and my effect files, hope someone can give them a look.

    CAPX and Effect files

    Ambient and light colors are hardcoded for now in the fx file.

  • Sprite Lamp

    Maybe someone has seen that before? If not, enjoy and drool.

    EDIT:

    Just read the dev's update from yesterday since he passed the funding in like a day:

    ngine Integration: I've received lots of requests about this. Given that 'engine integration' in this context really just means 'getting a particular shader working' in most cases, this is very achievable - however, not all engines work the same way, and in some cases it might not be possible. So far, requests have been mostly along the lines of Starling, Construct 2, and Game Maker, and as far as I can tell, all these are possible.edited><editid>Pancholo</editid><editdate>2013-11-14 19:55:21</editdate></edited>

  • Sprite Lamp

    Maybe someone has seen that before? If not, enjoy and drool.

    EDIT:

    Just read the dev's update from yesterday since he passed the funding in like a day:

    ngine Integration: I've received lots of requests about this. Given that 'engine integration' in this context really just means 'getting a particular shader working' in most cases, this is very achievable - however, not all engines work the same way, and in some cases it might not be possible. So far, requests have been mostly along the lines of Starling, Construct 2, and Game Maker, and as far as I can tell, all these are possible./QUOTE]

    Sprite Lamp does look awesome.

    Fixed the link to my project. You can see the demo here. Used R0J0hound images now just to see the difference between his and mine.

    Here's the demo: Demo

    Grab the blue square and drag it around to see the effect.

    Here's the capx and my effect files, hope someone can give them a look.

    CAPX and Effect files

    Ambient and light colors are hardcoded for now in the fx file.

  • Good god, so much drool ;o

  • donelwero could you share .xml files of this effect?

  • Joannesalfa Yeah sorry, seems like I missed one file.

    Here you go

    CAPX. and Effect files

  • donelwero Thanks! I'm going to check these effects.

  • donelwero

    there's no capx in your archive.

    Could you please upload it back ?

  • septeven

    Sorry, I changed the demo yesterday and forgot to reupload the files. There's no major change, just put two images side by side like R0J0hound did in his demo.

    CAPX. and Effect files

    Changed the demo a little bit to show multiple lights.

    Demo

  • can we use this maps in chars like this.

    <img src="https://dl.dropboxusercontent.com/u/13512632/coop_plataform_survival/police_test.jpg" border="0" />

    who have animations?.

  • It looks a bit weird, don't you think?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • megatronx yeah, it does look weird. I dont have much experience with shaders, so this is my first attempt at dynamic lighting. I'm kinda happy with the results but I know it needs some big improvements. I don't really know what else to do but to play with what's already in the files.

  • I'm just starting to play around with the original effect posted. Can anyone tell me if there's a way to change the color of the shadow? Maybe give it a bit of a dark blue hue instead of only black.

  • <img src="http://4.bp.blogspot.com/-iVW_pf3bk1U/Uo2FqxfjLsI/AAAAAAAAC0c/JZ_Qc6VafPI/s1600/Dynamic+Lighting+Test.jpg" border="0" />

    So I've been playing with the plugin and really liking the results. I think I can use it for changing the lighting scheme on my 2D characters.

    My question is how to use it without setting the parameters to the "light" sprite like in Pode 's example. Its great when I plug my art into his capx, but I'm just wondering if someone can walk me through setting it up without the Light Sprite. I basically just want to control if the light source is left of the screen or right.

    Worse case scenario I can just use the light sprite and set its location based on the player. Any help is greatly appreciated.

  • Colors doesn't seem to work for me

    I can't find a fault in the fx or xml file.

    Anyone has any idea why the colors don't work?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)