Shadows "Cast shadow as one"

New releases and general discussions.

Post » Wed Jun 04, 2008 3:02 pm

In this image you can see that when you build a level out of many sprites, the shadowcasting looks all messed up. Either the light can reach an area or it can't. Shadows of diferent opacity should only be used when ther's multiple light sources.



In this image where ther's just one shadow caster it looks just like it should:



But when you ad two objects it doesn't look right.



This is what it should look like.


As you can see the shadow caster engine doesn't render the shadows the right way. It shouldn't make the shadow darker if there are two objects blocking the light. It should make all shadows have the same color, but make it brighter if there a lightsource reaching it.

Attan
B
8
S
2
G
5
Posts: 744
Reputation: 3,288

Post » Wed Jun 04, 2008 3:26 pm

A way around that is to put the light on a separate layer, set the shadow opacity to 100 and the layer opacity to 50.
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Post » Wed Jun 04, 2008 4:06 pm

That's right, the actual shadow opacity doesn't give the intended effect because each object's shadow is drawn separately so overlaps will not work quite right. Using opaque shadows on a semitransparent layer should give the intended effect - there are a couple of examples in this thread which should show how to do that.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580


Return to Construct Classic Discussion

Who is online

Users browsing this forum: Yahoo [Bot] and 3 guests