[Request] Drop Shadow Plus

Share your Construct 2 effect files

Post » Sat May 06, 2017 5:30 pm

EDIT: The shader works correctly now, also this needs to be applied to the layer you want to cast shadow and will works with spritesheeting, rotations and will appear in the bottom of the sprites without overlaps due Z-Order.

-----

This is what i'm looking for:
Image

Parameters i need:
X Offset
Y Offset
Opacity
Blur
Red
Green
Blue


For example the example i posted have:
X Offset = 1
Y Offset = 1
Opacity = 50
Blur = 0
Red = 0
Green = 0
Blue = 0


Optionally add "Angle Fade-Out", to select in which angle do the fade, example image:
Image

Also a parameter for this to select the size of the fade.
Last edited by matriax on Fri May 19, 2017 7:34 am, edited 2 times in total.
B
24
S
10
G
3
Posts: 558
Reputation: 4,493

Post » Sun May 07, 2017 6:56 am

@matriax
Something like this one is ok ?

example: 1 pass shadow without iteration so fast as possible ...
We use quad in glsl quad is the sprite area ; this area must a bit greater than
sprite size (around) . The back color must be transparent... etc.
For blur you can use standard C2 vertical or horizontal blur those fx use
more samples so you can simulate fade...

http://gigatron3k.free.fr/html5/C2/FX/dsp
B
62
S
22
G
29
Posts: 822
Reputation: 22,342

Post » Sun May 07, 2017 7:35 am

@Gigatron

WOW! Yes that works for me :D . The unique thing is the color, seems is added to the background? Maybe in my example was bad explained but the RGB color is for the shadow not the background sorry. Also Ok for the other things, already have the sprite with some transparent around it for some king of animations so seems will fit perfectly.

Link to download ?
B
24
S
10
G
3
Posts: 558
Reputation: 4,493

Post » Sun May 07, 2017 7:40 am

matriax wrote:@Gigatron

WOW! Yes that works for me :D . The unique thing is the color, seems is added to the background? Maybe in my example was bad explained but the RGB color is for the shadow not the background sorry. Also Ok for the other things, already have the sprite with some transparent around it for some king of animations so seems will fit perfectly.

Link to download ?


I must just edit .xml file and look for the shadow colors...
Let me 1 day please ... :)
regards
B
62
S
22
G
29
Posts: 822
Reputation: 22,342

Post » Sun May 07, 2017 7:51 am

@Gigatron

No problem! :D
B
24
S
10
G
3
Posts: 558
Reputation: 4,493

Post » Mon May 08, 2017 5:58 am

@matriax
OK , let's go ;
live demo with adjustable shadow colors and the rest x,y offset and fade color ;

http://gigatron3k.free.fr/html5/C2/FX/dsp

fx file :
http://gigatron3k.free.fr/html5/C2/FX/dsp.rar
B
62
S
22
G
29
Posts: 822
Reputation: 22,342

Post » Mon May 08, 2017 7:27 am

@Gigatron

The shadow not have opacity, please change "shadow fade" by "Opacity" and make with opacity you can see the background. Or maybe i not understand the shader but i tried various configurations and only can get one color for the shadow but i can't add opacity so i can't put to 50% to blend with the floor to get a real shadow.

Also i found this weird thing around the player:
Image

My Shadow Config:
Image

My sprite is 36x36, the player is 28x28 with 4 or more pixels transparent around him.
B
24
S
10
G
3
Posts: 558
Reputation: 4,493

Post » Tue May 09, 2017 5:31 am

Sorry @matriax i missed the background //
Is this ok now ?
http://gigatron3k.free.fr/html5/C2/FX/dsp

fx file;
http://gigatron3k.free.fr/html5/C2/FX/dsp.rar
B
62
S
22
G
29
Posts: 822
Reputation: 22,342

Post » Tue May 09, 2017 6:17 am

@gigatron

Yes now the opacity works fine thanks! but still the problem with the weird thing, check:

Image
B
24
S
10
G
3
Posts: 558
Reputation: 4,493

Post » Tue May 09, 2017 6:52 am

@matriax
Can you post this sprite for me please ?
don't forget this type of shader is not working for animated sprite.. why ?
After exporting project C2 convert all picture in .png file and then you have a big picture
with different elements like sprite and other objects in the same image...
Solution is make each frame for different object...
if your sprite use 6 frame you must create
6 different object, spr0,spr1,spr2,spr3,spr4,spr5... and apply the fx for each sprite... this is the only way ...
B
62
S
22
G
29
Posts: 822
Reputation: 22,342

Next

Return to Effects

Who is online

Users browsing this forum: No registered users and 0 guests