How do I recreate this light effect in Construct 2?

Get help using Construct 2

Post » Fri Aug 14, 2015 1:51 pm

Is it possible to recreate the light-effect in this image ?

Image

The way the light comes through from behind the branches of the tree sprites which are exactly in front of the light source, but then goes over the branches of the trees that are further right or left. Moving around the parallax background creates a very beautiful diffraction.

I tried playing around with shadow-light to recreate it, but was unsuccessful. I would also be happy with something simpler. Anything in the right direction would help.
B
10
S
2
Posts: 32
Reputation: 672

Post » Fri Aug 14, 2015 1:56 pm

I think you would have to do it with code, make sprites of light rays and then change their shape with actions, but the right conditions seam to be a tricky part.
B
11
S
4
Posts: 53
Reputation: 1,148

Post » Fri Aug 14, 2015 2:51 pm

You might want to search for posts by eli0s who has created very similar effects using the lighting system.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
134
S
30
G
86
Posts: 5,424
Reputation: 59,534

Post » Fri Aug 14, 2015 3:57 pm

@zenox98, thanks for the tip! I just found an amazing test from eli0s. (I'm not allowed to post URLs yet, but it's on his webpage eli0s in the folder Tests/Dynamic_Lighting/)

Now I know this is definitely possible in construct. Sadly there isn't any corresponding capx available.
I will write to @eli0s, perhaps he would be so kind to help.
Last edited by fundation2000 on Fri Aug 14, 2015 4:31 pm, edited 1 time in total.
B
10
S
2
Posts: 32
Reputation: 672

Post » Fri Aug 14, 2015 4:23 pm

Hey @fundation2000, :)

The effect shown in the image looks to be a per-pixel light ray shader.
If you have some familiarity with shaders, you can actually make your own using the Construct 2 SDK. Construct 2 shaders are coded in GLSL.
I've been making shaders off and on for a while, so If I end up building that shader myself at some point, I'll let you know.

You can also try creating a very similar effect with C2's built in lighting system, but I suspect that it won't have the same per-pixel fidelity seen in the image above. That is because the C2 system casts shadows based on collision polygons instead of individual pixels.

That said, using C2's built in lighting, you could create a lighting system on it's own white layer, such that you're casting black shadows onto a white background. You could then use effects to invert the layer colors, so you're now casting white shadows onto a black background, and finally "Screen" blend that into the final scene, and adjust the layer opacity to make it more subtle. Screen blending will make the black area appear transparent, and the white rays will act like an illuminated haze.
B
27
S
18
G
8
Posts: 328
Reputation: 6,158


Return to How do I....?

Who is online

Users browsing this forum: 25games, Artcadev, Yahoo [Bot] and 22 guests