Shadow Lights interact improperly with tilemaps

Bugs will be moved here once resolved.

Post » Sat Sep 10, 2016 6:56 am

Problem Description
Shadow light-generated shadows glitch and move, cast shadow towards light instead of away, when interacting with Tilemaps.

Attach a Capx
https://dl.dropboxusercontent.com/u/142 ... wleak.capx

Description of Capx
Illustrates issues with Shadow Light cast shadows - position shifting and incorrect shadow casting.

Steps to Reproduce Bug
Use the arrow keys to move the platform object to the right towards the Shadow Light object.

Observed Result
The cast shadows will move & shift. In some areas it also seems to be casting a shadow towards the Shadow Light. The Shadow Light is not close to any objects and has a Radius of 0. The tilemap has a higher height (100) than the light (10). The issue also occurs with lights that have a radius higher than 0, or with the light set at a height above the tilemap height.

Expected Result
Shadows not to move, no "leaks" in cast shadows, shadows not cast towards light source.

Affected Browsers
  • Chrome: (YES)
  • FireFox: (YES)
  • Internet Explorer: (YES)
  • Edge: (YES)

Operating System and Service Pack
Win 10 x64 Anniversary

Construct 2 Version ID
r233, r234, r235, r236
B
76
S
43
G
24
Posts: 524
Reputation: 20,551

Post » Wed Nov 02, 2016 3:55 pm

Bumping this so it doesn't disappear because it's a big, obvious issue.

@Ashley, any thoughts on this?
B
76
S
43
G
24
Posts: 524
Reputation: 20,551

Post » Tue Nov 15, 2016 4:12 pm

The flickering happens because shadows aren't drawn for tile areas just outside the viewport, which is fixed for the next build.

The shadows look wrong though because you use multiple shadow light objects, and they only draw shadows, so by default all the shadows get pasted on top of each other. You need to use layering and blend modes to correctly render multiple light sources. See the demo that ships with C2 for an example.
Scirra Founder
B
395
S
231
G
88
Posts: 24,367
Reputation: 193,684

Post » Wed Nov 16, 2016 1:54 am

Ashley wrote:The flickering happens because shadows aren't drawn for tile areas just outside the viewport, which is fixed for the next build.

The shadows look wrong though because you use multiple shadow light objects, and they only draw shadows, so by default all the shadows get pasted on top of each other. You need to use layering and blend modes to correctly render multiple light sources. See the demo that ships with C2 for an example.


Damn, I thought I'd removed all but one light. My mistake. Thanks for taking care of the issue with the tiles outside the viewport though, it was preventing a baked lightmap solution to avoid avoid having to use multiple layers for each light from working as planned. Maybe there's a way to toggle whether or not it's drawing for all tiles, in the viewport or not?
B
76
S
43
G
24
Posts: 524
Reputation: 20,551


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 6 guests