How do I recreate this light effect in Construct 2?

0 favourites
  • 5 posts
From the Asset Store
Casino? money? who knows? but the target is the same!
  • Is it possible to recreate the light-effect in this 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • You might want to search for posts by eli0s who has created very similar effects using the lighting system.

  • 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.

  • 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.

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