RPTools / maptool

Virtual Tabletop for playing roleplaying games with remote players or face to face.
http://rptools.net
GNU Affero General Public License v3.0
800 stars 262 forks source link

Restrict each drawable light to its lumens level #4940

Closed kwvanderlinde closed 1 month ago

kwvanderlinde commented 1 month ago

Identify the Bug or Feature request

Addresses #4936

Description of the Change

When using the "overtop" lighting style, weak lights will no longer overlap with strong lights. This lighting style is more closely related to mechanics, and so it gets confusing when different lumens levels have overlapping colours.

When using the "environmental" lighting style, weak lights and strong lights can still overlap. This lighting style is meant to be more natural, so it's not desirable to have a hard cutoff where weak lights meet strong lights.

In either case, the interaction between darkness and light is the same: the weaker one will be cutoff by the stronger so there is no overlap.

Possible Drawbacks

Someone may have found a use for overlapping lights in the "overtop" style, and that is being removed here.

Documentation Notes

When using the "overtop" lighting style, each lumens level is like a separate layer for lights. Different lumens levels will not overlap with each. Instead, the strongest lumens level will "win" over weaker lumens levels. If darkness and light are tied, the darkness wins.

As an example, we can augment the default torch with lumens levels to represent bright and dim:

Torch - 20: circle 20+100 40#000000+50

If two tokens have torches, we can see that the bright areas are merged, and the dim areas are merged, but the dim areas do not overlap with the bright areas since the bright areas have a higher lumens value. image

Release Notes


This change is Reviewable

kwvanderlinde commented 1 month ago

@cwisniew Looks like the verification got confused with the recent mac changes, and also affected the merge queue. Looks like we'll need manual intervention to merge this one (or I can close this PR and open an identical one).

cwisniew commented 1 month ago

@cwisniew Looks like the verification got confused with the recent mac changes, and also affected the merge queue. Looks like we'll need manual intervention to merge this one (or I can close this PR and open an identical one).

I can push it through