TemplePlus icon indicating copy to clipboard operation
TemplePlus copied to clipboard

Shadows get clipped for large critters

Open DudeMcDude opened this issue 9 years ago • 9 comments

Example: Hezrou Guardian (proto 14360). Might have to play its attack animation to see it.

DudeMcDude avatar Mar 31 '16 19:03 DudeMcDude

In which shadow mode? Shadow maps?

shartte avatar Apr 03 '16 00:04 shartte

Yeah shadow maps.

DudeMcDude avatar Apr 03 '16 04:04 DudeMcDude

Have you checked whether this bug is present in vanilla?

shartte avatar Apr 03 '16 10:04 shartte

A bit of background info: The positioning of the shadowmap texture on the ground is based on the object radius and object render height. Both are calculated "inaccurately" by taking the current animation frame and calculating the height of that. That is only done once however, for the idle animation. So if a model has an extremely high attack animation, it might exceed the calculated size for the shadow map buffer.

I wonder if this is already a problem with the vanilla approach. I'll try to reproduce this in vanilla.

shartte avatar Apr 03 '16 10:04 shartte

Checked against the Hezrou Guardian in Vanilla (co8): Radius = 45 Height = 152.79

I verified that TemplePlus is using the same values.

shartte avatar Apr 03 '16 11:04 shartte

Here's a screenshot of the issue on TemplePlus: 2016-04-03 13_12_35-temple of elemental evil temple

shartte avatar Apr 03 '16 11:04 shartte

This is how it looks in vanilla, which also doesn't seem to be correct: 2016-04-03 13_29_21-toeea exe

shartte avatar Apr 03 '16 11:04 shartte

I suggest we put this to lower priority since it seems to be present in vanilla too.

This is actually not that easy to fix with the strange shadow map algorithm that ToEE uses.

shartte avatar Apr 03 '16 11:04 shartte

Yeah, I guess I never noticed it now since I always played with blob shadows.

DudeMcDude avatar Apr 03 '16 11:04 DudeMcDude