Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClockwiseSweepPolygon can be self-intersecting #9953

Open
dev7355608 opened this issue Aug 24, 2023 · 2 comments
Open

ClockwiseSweepPolygon can be self-intersecting #9953

dev7355608 opened this issue Aug 24, 2023 · 2 comments
Labels
bug Functionality which is not working as intended vision Issues related to Token vision and vision modes

Comments

@dev7355608
Copy link

dev7355608 commented Aug 24, 2023

Related Issues

The rounding of internal edge collision points in ClockwiseSweep._getInternalEdgeCollision can produce self-intersections, which can break the triangulation and Weiler-Atherton clipping.

image

fvtt-Scene-clockwisesweeppolygon-bug-ILliaF3KAqYFKdBh.zip

Related Issue

CONFIG.Canvas.polygonBackends.sight.create({x: 3516, y: 4277}, { type: "sight" }).visualize()

fvtt-Scene-clockwisesweeppolygon-bug-AVISfGBXmLexULqs.zip

image

@dev7355608 dev7355608 added bug Functionality which is not working as intended vision Issues related to Token vision and vision modes labels Aug 24, 2023
@dev7355608 dev7355608 added this to the V12 - Prototype 2 milestone Nov 22, 2023
@dev7355608 dev7355608 self-assigned this Nov 22, 2023
@aaclayton aaclayton assigned aaclayton and unassigned dev7355608 Feb 5, 2024
@aaclayton aaclayton removed their assignment Mar 18, 2024
@aaclayton aaclayton removed this from the V12 - API Development 2 milestone Mar 26, 2024
@aaclayton aaclayton added this to the V12 User Testing 1 milestone Apr 19, 2024
@aaclayton aaclayton self-assigned this Apr 19, 2024
@aaclayton
Copy link
Contributor

Going to have to defer this to V13. We are running out of time before stable and this should ideally be done earlier in a cycle so we have ample time to test it.

@aaclayton aaclayton removed their assignment May 7, 2024
@aaclayton aaclayton removed this from the V12 User Testing 3 milestone May 7, 2024
@dev7355608
Copy link
Author

Originally reported by zemoloch: https://discord.com/channels/170995199584108546/1184176415139184731/1255152698903494780

ALL MODULES DISABLED? true
OS, Hosting, Browser (if applicable): V12.237
Short Description of bug: Terrain walls cause seemingly random spots near the Terrain Walls to break. The vision of a token that enters this spot penetrates all walls for a brief moment, causing a flicker and revealing the entire map within the token vision range, even through walls. The problem does not occur when terrain walls are removed.
Simple steps to reproduce the bug: Place Terrain Walls surrounded by Basic Walls.
Screenshots and/or console errors:
Screenshot 1: Token vision ends at walls as expected.
Screenshot 2: The token moves to the left and the vision flickers through all walls. It reveals the entire Fog of War within vision range, even across walls and rooms, in a circle.
Screenshot 3: Walls.
Scene json includes token on the right of a problematic spot.

image

image

image

fvtt-Scene-crypt-Rcsln2t4KKOw6tgh.json


Additional comment by crovaxon: https://discord.com/channels/170995199584108546/1184176415139184731/1255161672331690059

Addendum to this bug report since I was interacting with Moloch and managed to confirm it.
I suggest setting a white background color on the scene config shared by Moloch to make the fog of war and vision of that token easy to see (and funnily enough will turn the white mystery man SVG invisible :P).

I created a vid demonstrating the flicker and I can identify one key terrain wall group that while it is there, will almost always trigger that flicker. But even removing the marked terrain walls will still very rarely produce a flicker if I keep spamming left and right fairly quickly on that token in the position that Moloch has in the screenshots, likely an interaction with other terrain walls.

Another discovery: this happens while the token has a vision of 60 ft set. If you remove that vision and instead give it a light source of 60 ft, this flicker does not occur.

2024-06-25_15-35-55.webm

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Functionality which is not working as intended vision Issues related to Token vision and vision modes
Projects
None yet
Development

No branches or pull requests

2 participants