caewok / fvtt-elevated-vision

Adjust Foundry VTT vision, lighting, and token elevations based on terrain, wall, or token elevation.
MIT License
12 stars 5 forks source link

Walls cast shadows towards the light #92

Closed rapus95 closed 6 months ago

rapus95 commented 9 months ago

Trying to design a point source which has shadows cast away from the center of the map. Doing that, I encountered the following situation which looks wrong: image

caewok commented 9 months ago

Can you right click on the scene in the scenes tab, click Export Data, and then upload that JSON here? Also, what are your light configuration settings?

rapus95 commented 9 months ago

fvtt-Scene-ruins-of-caradoon-GnbM07rna6pUdhiW.json image image do you need anything else?

btw, sadly, it doesn't yet seem to interact with the limits module as intended :/ (that green forest to the right has a limited darkvision and light perception range. Thus it should limit the light propagation aswell, though, not sure which side has to handle that)

caewok commented 9 months ago

A few thoughts:

  1. Yes, I would expect some trouble with the Limits module. Technically, Elevated Vision doesn't mess with lights per se, just shadows. But I am sure there are some interaction issues, because Elevated Vision has to meddle quite a bit with lighting and token vision.

  2. Does it look better in v0.5.10? I killed some bugs that might have made a difference. When I display your scene with just Elevated Vision, Wall Height, and libWrapper enabled, it looks pretty decent. (This is without any terrain elevation set, just using the limited-height walls for the shadows.) Screenshot 2023-10-22 at 4 27 05 PM

  3. You might also using a directional light instead of the 1000' light. Depends a lot on what you are going for, but directional lights were made for this sort of elongated shadow effect. The directional shadows will create parallel shadows (because the light is assumed to be infinitely far) and more closely mimics shadows from sunlight. Note the differences in this screenshot, where the sun is set to be overhead slightly southwest, causing all the shadows to go northeast. Screenshot 2023-10-22 at 4 20 06 PM

rapus95 commented 8 months ago

using Find the culprit! I found that having only elevated vision and libWrapper to be enough for this bug: image

it looks like some directional issue (normals, signs etc): source is bottom right of walls -> correct shadows image source is top left of the walls -> failing shadows image

rapus95 commented 8 months ago

but another player couldn't recreate the issue in their browser 🥲 We both run chrome but he has a nvidia gforce gtx 950m while I have an amd radeon rx 6800xt

so to sum it up this means that it's at the intersection of Elevated Vision, libwrapper and my hardware and has to do with the individual calculation of which way is "behind" the wall because for that it has the wrong sign in certain circumstances.

caewok commented 6 months ago

Closing as I cannot fix graphics driver bugs, which is what this sounds like.