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

Optional alpha compositing for lighting #3918

Merged

Conversation

kwvanderlinde
Copy link
Collaborator

@kwvanderlinde kwvanderlinde commented Apr 12, 2023

Identify the Bug or Feature request

Refines #3817

Description of the Change

Based on testing feedback, there were several improvements that could be made to the new environmental lighting and lumens overlay.

  1. Lights weren't showing by default, leading to confusion as users were required to find a new menu option just to be able to see them again. This has now been inverted so that lights are shown by default.
  2. The help text for sights and lights in the Campaign Properties dialog was out-of-date. This has been updated to match the new syntax, and has been reformatted into a description list to make it more legible.
  3. Lights easily brighten too much. In the future, a radial falloff with help more with this, but for now the adjustable boosting parameter has been reduced to give a little more headroom for lights to overlap.
  4. Darkness was not being rendered in colour for GMs. This has been fixed
  5. Sometimes the zone vision is refered to as "Vision" (e.g., in the Map menu) and sometimes as "Lights" (e.g., in the Map Properties dialog). This is not new, but it annoyed me and could cause some confusion going forward, so it has been fixed to consistently use the term "Vision".
  6. Some maps are not full-colour artwork and would not benefit from environmental lighting. In fact, the classic style of a white background with black pen strokes had no ability to dispaly light colours as white is already considered fully illuminated, and black is black no matter how much light shines on it. A new option has been added to use alpha compositing for such maps.

Possible Drawbacks

Point-by-point:

  1. Lighting performance is still not fantastic, so users may have a degraded experience upon upgrading, especially with many lights.
  2. None
  3. Someone will disagree over exactly how much lights should brighten the map. This is always going to be a matter of taste.
  4. None
  5. None (at least no more than already exists 🙂)
  6. The Preferences dialog continues to be bloated, and the new lighting style option is just one more thing to check when creating a map.

Documentation Notes

Maps have a lighting style that can be configured when creating or editing a map.

The "Overlay" lighting style is useful for black & white or other simplified maps, as the lights will be drawn overtop of the map.
image
If we had instead used "Environmental" for this map, none of the light colours would show, because white is already completely illuminated:
image

The purpose of "Environmental" lighting style is for full-colour artwork maps, as it renders lights as though they are illuminating the map:
image
If we had instead used "Overlay", the map would look more washed out as the map is obscured by the lights instead of illuminated by them:
image

Release Notes

  • Renamed "Lights" to "Vision" in the Map Properties dialog, to match the Map menu. Likewise renamed "New Map Lights" to "New Map Vision" in the Preferences dialog.
  • Added a "Lighting style" option to the Map Properties dialog so lights can be environmental (useful for colour maps) or alpha-composited (useful for black & white maps).

This change is Reviewable

This is exactly the opposite of before. Users should no longer be surprised to find that their colourful lights don't
show up, and they won't be expected to find the new menu options before being able to play a campaign as usual.
The new syntax for per-range lumens no longer matched the existing help text. So the help text for has no been updated to
match the new syntax for defining sights and lights. The special cone option `offset=` was also missing from the help
text and has now been added.

The options for both sight and light are now in a description list to make them more readable and more consistent with
one another.
The blender has an adjustable boosting parameter to controls by how much dark colours can be brightened. Higher values
also have the effect of making bright colours brighter on average, which was leading to some unnecessary
over-brightening. This parameter has now been reduced so more lights can overlap before washing out the colours.
Now that darkness and light exist in a single overlay, we ought not clip the rendering to only visible areas when
viewing as a GM. This was causing darkness to not actually be rendered, but only soft FoW was shown for GMs. Now that
clipping is only enabled for player views, GMs are once again shown the full nature of the darkness.
Both these options refer to the same thing but have different labels. They also don't affect lights in any way, so the
label "Vision" was used.

The "New Map Light" option in the Preferences dialog was likewise changed to "New Map Vision".
Lights will still be blending with each other using the screen blend mode, but how the results are blended with the map
is now configurable. The new map option "Lighting Style" can be set to "Overlay" to render the results via alpha
compositing over that map, or "Environment" to render the results as an illumination of the map.

To support the "Overlay" style, the light overlay opacity was reintroduced to the Preferences dialog. The tooltip
mentions that this preferences only affect the "Overlay" style.
@cwisniew cwisniew merged commit 349517b into RPTools:develop Apr 13, 2023
@kwvanderlinde kwvanderlinde deleted the feature/3817-optional-alpha-compositing branch April 13, 2023 04:49
@cwisniew cwisniew added the feature Adding functionality that adds value label Apr 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adding functionality that adds value
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants