The Daily Click ::. Forums ::. Klik Coding Help ::. How to make a fake lightsource-effect?
 

Post Reply  Post Oekaki 
 

Posted By Message

Demondevilmon



Registered
  29/12/2014 18:58:20
Points
  148
6th February, 2017 at 06/02/2017 18:31:39 -

Hey guys
Few days ago i got the idea again to make objects with a radius within the level is appearing parts by part. like a lantern lightsource.
Knowing that this is less possible i once made an effect with layers... but i could hit myself for not knowing anymore how i did this in the past

Anyone?
Thanks

greets DD


 
I am not a hero... never was... never will be.

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  57012

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 33 Winner!Picture Me This Round 32 Winner!Santa!Box Blue
10th February, 2017 at 10/02/2017 16:28:58 -

There are a couple of ways of doing this, but the coolest way I've seen is to:

1. Make a new top layer
2. Give it the subtract shader effect
3. Add a white background object to it and resize it to the size of the frame
4. Add black objects on top to cut hole in it, ideally with faded edges using alpha channels for smooth looking light

Here is a quick example I whipped up:

http://www.dropbox.com/s/u3fc6802jm9o91d/LightExample.mfa?dl=1

Edited by UrbanMonk

 
http://www.soapcow.com <- Flash games, featuring MMF made games!
http://www.jsoftgames.com <- Old blog I don't keep up anymore

Demondevilmon



Registered
  29/12/2014 18:58:20
Points
  148
12th February, 2017 at 12/02/2017 07:28:52 -

Thx Urban Monk!
I was using just circles with color black and white not alpha... that's why overlapping 2 circles wouldn't work that well.
Great!

Greets DD

 
I am not a hero... never was... never will be.

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  57012

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 33 Winner!Picture Me This Round 32 Winner!Santa!Box Blue
13th February, 2017 at 13/02/2017 19:17:50 -

Awesome! Glad I could be of help.

 
http://www.soapcow.com <- Flash games, featuring MMF made games!
http://www.jsoftgames.com <- Old blog I don't keep up anymore
   

Post Reply



 



Advertisement

Worth A Click