Underwater FOF shadows break colormap

Status
Not open for further replies.

DrTapeworm

Midnight Abyss did nothing wrong
Sonic Team Junior
Kart Krew™️
ZBcledd.png

The water in this map rises and lowers at a certain point. When shadowcasting FOFs are submerged, the shadows underneath them are not affected by the water colormap, which doesn't look good at all. FOFs that are above the water do not cause the problem.

Reasons why this happens/a solution would be appreciated.
 
My guess is because they didn't start out underwater and keep their above water setting by default.
 
This happens because any light entries in a sector completely reset all light properties, including colormaps. A cheap solution would be to make the FOFs non-shadowcasting and place half-light blocks under them with and without the colormap that can be toggled using http://wiki.srb2.org/wiki/Linedef_type_445 as needed.
 
Why is a mesh walkway casting a shadow, anyway? Just remove the FOF's shadow, it doesn't make much sense.

But to try and answer the question in a simple manner, every sector has a light list, which is a list of lighting effects that are applied to the sector from top to bottom. Water FOFs and shadowcasting FOFs add a new entry to the list, making the lighting change from the top surface of the FOF all the way down to the next entry (or the bottom of the sector if there aren't any).

When you have the FOFs in the order: open air, shadow FOF, water FOF, the shadow extends all the way to the water block, and then the water all the way to the bottom of the sector (this is true even if the bottom of the water FOF is floating above the floor level).

If the water rises, then it becomes: open air, water FOF, shadow FOF. Thus the water extends all the way down to the shadow FOF, and then gets cut off by the shadow FOF's light entry which doesn't have a colormap.

This isn't an easy problem to fix; if your water is static, you can just tag the colormap to the FOF's control sector as well so it'll always be blue underneath the FOF, but then it's always blue no matter what. The other simple solution is not to use shadowcasting FOFs in situations that they might get sunk underwater, but obviously this sacrifices visual detail. DSZ1 does neither, and you can see the exact same problem in the large waterfall room.
 
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top