nipkownix / re4_tweaks

Fixes and tweaks for the "UHD" port of Resident Evil 4
zlib License
341 stars 32 forks source link

[Feature request] Dynamic Shadows during gameplay #112

Open RiasatSalminSami opened 2 years ago

RiasatSalminSami commented 2 years ago

The cutscenes seems to be able to render shadows that represent the actual figure of the humans whereas in gameplay, its a mix of 2-3 soft shadow that stretches sometimes [which is a hell lot better than a completely static circular shadow].

However, I noticed in the Dumpster area where you can use the Crane to pick and drop the enemies in the dumpster, the enemies are casting shadows that look like those dynamic shadows. Even if they aren't exactly dynamic, they do represent the human figure.

I wonder if the engine is actually able to render shadows like this for all enemies in all areas?

Here's screenshot of that area: Shadows

Or maybe it was possible only because of the fixed camera? Either way, it might be worth checking.

laymonage commented 2 years ago

I remember seeing a screenshot of Leon using the knife and the shadow was cast on the ground. I think I saw it somewhere in the HD project Steam discussion. That was a long time ago, though. If I recall correctly, someone (maybe Albert?) was saying that the engine is actually capable for dynamic shadows, but they had to disable it during gameplay due to GC hardware limitations.

Pentacoro commented 2 years ago

I remember reading Albert say real-time shadows, although possible, become really taxing on the game at a certain point. Apparently the engine has a really suboptimal way to render them.

RiasatSalminSami commented 2 years ago

I remember reading Albert say real-time shadows, although possible, become really taxing on the game at a certain point. Apparently the engine has a really suboptimal way to render them.

Hmm I see, is worth testing just in case it does work on stronger pcs by sheer means of brute forcing.

However if it is too performance taxing, then this feature should be optional definitely.

Mister-Curious commented 2 years ago

I was able to make real time shadows with Albert's help in a custom room but there are simply too many restrictions to make it a reality for all the rooms in the game. First off, the game will crash if too many enemies are present when real time shadows are used. Second, a detailed 3d model needs to be constructed for where the shadow is allowed to be cast, which in the case of most rooms would be a tremendously laborious endeavor. Just editing the existing shadows for the crane in r30b took me several days to get right, and that was with VERY simple geometry.

I told Albert that I would ask my engineer friend to investigate the root of the crashes with enemies, and we made some headway, but when I told Albert my thoughts about making this a reality, he reiterated to me the vast amount of work it would take, citing it would not be in his interest to start such a huge undertaking.

RiasatSalminSami commented 2 years ago

I was able to make real time shadows with Albert's help in a custom room but there are simply too many restrictions to make it a reality for all the rooms in the game. First off, the game will crash if too many enemies are present when real time shadows are used. Second, a detailed 3d model needs to be constructed for where the shadow is allowed to be cast, which in the case of most rooms would be a tremendously laborious endeavor. Just editing the existing shadows for the crane in r30b took me several days to get right, and that was with VERY simple geometry.

I told Albert that I would ask my engineer friend to investigate the root of the crashes with enemies, and we made some headway, but when I told Albert my thoughts about making this a reality, he reiterated to me the vast amount of work it would take, citing it would not be in his interest to start such a huge undertaking.

I understand. Thanks for checking it.