Dynamic Lighting

TDonnally

  • Posts: 235
I don't think I understand fully. If blending modes does not work for the shadows themselves what would putting the background over it do?

Also here is a picture of the scene I have been using to test shadows with:


Notice the dark areas that do not make sense.

I could solve the problem by checking where the shadows would overlap and drawing the polygon differently based on where tiles are in relation to it, but that is not ideal.

rob1221

  • *
  • Posts: 9472
Just try it and you'll see what I mean.  First change your background to white.  On the bottom layer, draw your shadows in a grey color with 100% opacity.  In the layer above that, have your background actor (just a blue rectangle?), but hide the sprite and draw its image using the multiply blend mode.

DELETED_117713

  • Posts: 771
This is amazing! Could you post an example game using this?

TDonnally

  • Posts: 235
This is amazing! Could you post an example game using this?

I wouldn't call it amazing yet but thank you. There is still a lot I want to do with it before I would use it in a game.

« Last Edit: July 24, 2013, 08:12:59 pm by TDonnally »


merrak

  • *
  • Posts: 2736
any progress?

The post is over 5 years old and TDonnally hasn't logged in since 2015 :P

But you never know! Maybe they have email notifications.

squeeb

  • Posts: 1617
Sorry man.. haha.  I didnt notice that.  I didnt see i was diving that deep

merrak

  • *
  • Posts: 2736
I remember seeing another demo of this that was interactive. I don't remember if they showed their code, though.


merrak

  • *
  • Posts: 2736
This one?
https://ncase.me/sight-and-light/

That looks familiar, but I was thinking of a Stencyl game demo someone posted to the forum.