Lighting problem with backgrounds

0 favourites
  • 4 posts
From the Asset Store
This is a pack with 7 space backgrounds wich have variations.
  • Hi, this has been troubling me for a while now..

    Say you've set up your layers for lighting, similar to the example file 'lighting', or by using the lighten/multiply shaders as shown in this .capx (link)

    Lighting layer   (All black, but with light objects that act like 'erasing' the darkness)

    Main layer   (visible game stuff, like the player etc)

    Backdrop layer   

    This works great for the main layer, but anything displayed on the backdrop (which could be something really far away, for example mountains or space) will be affected by the lighting in the same way.

    This makes no sense from a design standpoint..

    for example, a torch held by the player should not light up the stars in the night sky behind him (they should already be lit)

    and if the player is inside a dark house but on a sunny day, the view out of a window should still be bright.

    so any ideas on a work around?

    tldr: how do i make the background image in the following cap be unaffected by the top layer:

    (link to .capx again)

  • shameful bump

    also i've just noticed I accidentally put the gray sprite on the background layer, (it's meant to be on main), I updated the file.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • One last bump then I'll let this die.

    I feel like the only way to do this is if there was a way to group layers and set the 'force own texture' setting for the group.

    That way I could have main and lighting layers rendered seperately from the background layer. With lighting set to 'source atop'.. thus keeping the transparency where there is no objects.

    I get the impression this is how other games would get the effect, but i'm no programmer so i'm not sure.

  • I'm actually interested in this as well. Can't look at the capx's at the moment but the issue you mention makes sense.

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