armory3d / armory

3D Engine with Blender Integration
https://armory3d.org
zlib License
3.06k stars 315 forks source link

Low camera FOV messes with the shadows & Spitscreen messes with shadows #2321

Open Lykdraft opened 3 years ago

Lykdraft commented 3 years ago

Setting the Cameras FOV to something quite low to get an acceptable FP look basically disconnects the shadows on meshes in the distance.

Look here:

shadowFOV

Near: all ok Far: disconnected (In this example I set the FOV very low, so the disconnect starts very early to make the problem as clear as possible. The "stairs" meshes actually penetrate the wall through the other side, not that you think it's a position issue... ;) )

The wall texture on the wall in the back has other graphical issues as well, (Some black diagonal smear-lines across the whole mesh) Don't know why, but that's probably a different story, also hard to spot as there are grunge textures thrown in across everything as well...)

I also should note that we still have this problem as well: Split-screen using RenderPathCreator.drawMeshes with 2 cameras that do buildProjection. This is mEntents screenshot where he confirmed that problem: unknown

He wanted to take a look at this but never followed through it seems. His guess of the problem (That it worked in the basic suzanne example but not anywhere else) was this:

Can confirm, the (basic included suzanne) example seems to be just a very simple implementation that doesn't account for shading or maybe the render path might not allow it. Will take a look and hope is the former

StrandedAlien commented 2 years ago

Same here. Ugly one Screenshot_2022-01-14_03-27-06 t9spot.blend.zip .

MoritzBrueckner commented 2 years ago

Hi, please try to change some of the light's shadow properties such as the Bias (in the Armory Props panel in the light properties), with that I get a correct result:

Screenshot

Changing the FOV of the camera (in the debug console) does not change this. @Lykdraft do you have an example file for the original issue?