[solved] Custom shape shadow caster problem

For questions about using Classic.

Post » Wed Jul 20, 2011 6:32 pm

It seems that the custom shadow caster shapes don't display correctly in Construct Classic r1.2. The caster seems to treat the bounds of the custom shape incorrectly and leaves the entire outer bounds 'unused' leaving a 'hole' with shape of the object in the shadow. I haven't tried this in any of the previous Construct Classic versions but seeing how the shadow caster behavior has seen little change in any of the recent releases I'd expect that the problem occurs in many of those versions too.

Here's a cap displaying the unwanted results: Construct Classic r1.2 cap

Here's two examples in a more complex implementation. On the left you'll see the actual render and on the right a sketch of how the shadow was expected to be rendered.





Using the bounding box as the caster shape does not come into question with the said implementation as we'd have to create tricky workarounds involving invisible collision boxes to prevent ugly artifacts due to the nature of the sprites. That way we'd also lose, duh, the custom shape of the shadow we wanted to begin with.

Sorry I didn't make a report to the tracker, Sourceforge is giving me a http error 500. :(

I'd also like to point out that this problem that prevents setting Light-object's height and width in the runtime has yet to be solved and it's hindering our development of the lighting code.

Edit: fixed the image urls and linkified the cap url
Edit 2: A solution presented belowZotged2011-07-21 02:03:57
B
11
S
2
G
3
Posts: 100
Reputation: 2,150

Post » Thu Jul 21, 2011 12:46 am

I find that cap really odd, as I was able to do this without any problems.Jayjay2011-07-21 00:46:27
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Thu Jul 21, 2011 2:02 am

A little pinpointing and I came up with a solution presented in this CC r1.2 cap

In this example I switched the places of the opposing corners resulting in a seemingly identical shadow caster shape.

The end result of the render is identical to one using bounding box thus solving the problem. Could this simply be a result of using a counterclockwise "drawing order" of the shadow caster shape which creates an inside out caster mask?

All in all it was a very logical problem with a, duh, very logical solution. Hardly a bug but seeing how easily it's run into it might be worth looking at at some point.
B
11
S
2
G
3
Posts: 100
Reputation: 2,150


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests