dev7355608 / perfect-vision

Foundry VTT Module: Lighting Drawings and Vision Limitation.
https://foundryvtt.com/packages/perfect-vision
MIT License
53 stars 10 forks source link

Monochrome vision is affected by "Darkness Level" slider. #37

Closed beefor closed 3 years ago

beefor commented 3 years ago

PF2e. After updating today, monochrome vision for actors with darkvision in scenes without global illumination is fully there when Darkness Level = 1, completely non-existent when Darkness Level = 0, and smoothly increases or decreases the amount of color in the scene as the slider is moved.

dev7355608 commented 3 years ago

It's an intended change. If Darkness Level is 0, it's full daylight, and it doesn't make much sense that the vision would still be monochrome, I think. I'd like to hear feedback on this change though.

beefor commented 3 years ago

I greatly preferred the previous behaviour. I feel like it allowed more flexibility, and Darkness level feels like flavor, while light level is the more rules-functional setting. I see what's being done here, but I'd like for it to be a toggleable option somewhere.

si-lang commented 3 years ago

Same here. I also was quite confused when the monochrome vision was not available anymore in full intensity for < 1 darkness level. I second @beefor in thinking that darkness is more flavor and global illumination is the actual "light". I also would be glad to be able to toggle this behavior. Apart from that: Thank you for this great module and your support regarding the "column" vision problem! :D

dev7355608 commented 3 years ago

I don't think Darkness Level is just flavor: 0 is daylight, 1 is darkness, and in between dusk/dawn. It seems like you want to have brighter nights and therefore lower the Darkness Level, but maybe it would be better to change the darkness color/brightness instead, which is currently not exposed in the settings (see _configureChannels in Foundry's code).

si-lang commented 3 years ago

It is definitely possible to utilize the Darkness Level for this (and I think some to many people do so). Personally I prefer having the monochrome vision always fully active while having only about 0.25-0.5 darkness, because I do not want to have a very dark (explored) fog of war. If you want, you can use my Pull Request, which adds a setting for toggling this behavior, so that GMs can decide which setting they prefer most.

dev7355608 commented 3 years ago

Sure, it's possible, but not best way to do it, I think. If I exposed the darkness color/brightness, you could just set it to your preferred brightness and work wit the full 0 to 1 range. If you only ever use 0 to 0.5, the day-night transition buttons are useless, for example. There might also be modules out there assume that 0 is daylight and 1 is night for whatever reason, but these would not work properly for you either. So I think the right approach is to set the preferred darkness brightness. Then with Darkness Level 1 the monochrome vision would be fully active as well.

si-lang commented 3 years ago

This is true if Global Illumination is a thing. If Global Illumination is turned off, the Darkness Level is (at least for me) just flavor, because there is no global light source and therefore it is total darkness, no matter the Darkness Level (which Foundry also treats like this by reducing the token vision to 0 if there is no light or Bright Vision). In caves the day and night buttons are therefore useless anyways. Outside of caves they are very nice and I plan on using them frequently, don't get me wrong here. I agree that the brightness of the fow is no concern of this module and can be controlled using other modules. What I can definitively see in this module though, is the use-case to toggle between discrete and continuous increasing/decreasing monochrome vision. The reasoning for this would be to 1:1 implement rules: At least D&D 3.5 and Pathfinder 1e state, that Darkvision is monochrome. So per rules it is either on or off. For example, if a Pathfinder 1e dwarf has a torch he has a 20 ft radius of normal (in Foundry bright) light and another 20ft of dim light in total darkness. Since the dwarf has 60ft Darkvision, he can see the remaining 20ft monochrome in black and white. Now if I have a dungeon with, say 0.5 Darkness Level, the dwarf could see the last 20ft in 50% color, although the plain rules are not granting him this. If the whole group would be Darkvision creatures there would not be any (potential) problem. Although, it can be unfair because his accompanying elven buddy can not see anything in the last 20ft, regardless of the Darkness Level (if Global Illumination is off). For me as a DM I would either rule, that the dwarf can see black and white no matter the Foundry Darkness Level if Global Illumination is off (implementing plain rules), that the elf could also see 50% of its surroundings (maybe inverse scaling monochrome), since it is not too dark (implementing a compromise logic), or enabling Global Illumination (since it is not too dark) and not restraining anybodies vision, because there is light coming from somewhere (which would be the proper logic, but would not fulfill the original goal). I can see room for all of those rulings to be honest.

cs96and commented 3 years ago

I have to agree with the other comments. The darkness slider is just flavour when Global Illumination is off. I much preferred the old version where monochrome vision would display correctly if the darkness slider is at 0.

dev7355608 commented 3 years ago

Well, there is also Global Illumination Threshold, which also suggests that Darkness Level is not just flavor even with Global Illumination turned off.

In caves and dungeons however, I agree, there's no day/night cycles, so Darkness Level is just flavor. With the new setting I'm suggesting you would be able to achieve exactly the same results as before, you would just need to adjust a different slider and leave Darkness Level at 1.

I don't really want to solve this problem by adding an option to toggle it because it wouldn't really solve the problem for people that want old behavior like you but also want non-monochrome fog of war for world maps (see last comments of #18).

si-lang commented 3 years ago

You are right. In conjunction with Issue 18 the slider solution would be best.

dev7355608 commented 3 years ago

Check out the new Daylight and Darkness Color settings in v1.6.0, and let me know what you think.

si-lang commented 3 years ago

@dev7355608 I think that this addition is really great and better than just toggling on/off. Thank you! Am I right when I assume, that #ffffff is treated as transparency and the brighter a color gets, the more transparent it is? Maybe it is worth adding a separate alpha channel? Furthermore, it might be convenient to have user generated defaults in the module settings so that each scene can default on creation to those custom defaults (like Monochrome Vision Color has).

dev7355608 commented 3 years ago

It's not alpha blending, it's multiply blending. Somewhere on this line you should find the color that gives you the same result as lowering Darkness Level.

image

si-lang commented 3 years ago

I see! Thank you for the explanation! I tried some settings together with my players and all of us where convinced, that this is a very good solution, which also enables some freedom in terms of "ambient" (e.g. adding dark red for volcanic ashen areas or white blue for snowy mountains). đź‘Ť

Zamrod commented 3 years ago

This is a weird issue that I've kind of already discussed with Atropos because it is kind of an issue with the naming of Darkness to begin with. Ostensibly, the "Darkness" setting isn't darkness at all, it is more accurately "light intensity in this scene". So it is possible for a scene with no lights at all the be at "darkness" 0. But any lights you add to the scene will be at their biggest brightness. The Global Lighting feature is designed to say "Is there light everywhere in this scene?"

So, in theory with global lighting turned off and darkness set to 0, it just means for some reason all torches in that area are SUPER intense. There's not a lot of reason for that, but it is there as a feature.

Aeristoka commented 3 years ago

It's not alpha blending, it's multiply blending. Somewhere on this line you should find the color that gives you the same result as lowering Darkness Level.

image

This is what I have the issue with, because the change makes it essentially that instead of having the Monochrome work when Global Illumination is disabled, and changing the shading of the scene with Darkness, now you must set Darkness to 1, and very manually try to follow a slanted line up a spectrum of colors to reduce the effect applied by the Darkness slider. It has simply moved the configuration to what is arguably a more difficult to work with slider.

dev7355608 commented 3 years ago

Think about it like this: A light source emits always the same amount of light (regardless of Darkness Level). But the light mixes with the scene/background/daylight/moon/... light. That's why the final light intensity/color is different. Of course the calculation isn't physically accurate. With Darkness Level 0 we see a light source in full daylight, and that's why it seems so bright. With Global Illumination disabled we see only areas illuminated by light sources even if the scene/background light is the same as dim light (technically the background light is brighter than dim light if Darkness Level is below 0.6, so we don't even see the dim light anymore, link). So it still appears as if it's supposed to be darkness, but just because sight is restricted doesn't mean it's not daylight. I can see why many use Darkness Level simply as a brightness slider, because it's not quite clear at first glance if it's supposed to be more than that, and the daylight/darkness colors settings are not exposed normally.

Aeristoka commented 3 years ago

Think about it like this: A light source emits always the same amount of light (regardless of Darkness Level). But the light mixes with the scene/background/daylight/moon/... light. That's why the final light intensity/color is different. Of course the calculation isn't physically accurate. With Darkness Level 0 we see a light source in full daylight, and that's why it seems so bright. With Global Illumination disabled we see only areas illuminated by light sources even if the scene/background light is the same as dim light (technically the background light is brighter than dim light if Darkness Level is below 0.6, so we don't even see the dim light anymore, link). So it still appears as if it's supposed to be darkness, but just because sight is restricted doesn't mean it's not daylight. I can see why many use Darkness Level simply as a brightness slider, because it's not quite clear at first glance if it's supposed to be more than that, and the daylight/darkness colors settings are not exposed normally.

Right, but that further highlights my point. You tied the Monochrome vision to the Darkness slider, which caused undesired results, and resulted in you NEEDING to expose the daylight/darkness colors in order to make is usable again.

Further, consider something like a mixed outdoor/cave scene. Half the map is lit, as with Daylight (say, in example, some light sources to light it instead of Global Illumination, because the cave interior shouldn't be globally illuminated). So for the little light that gets inside, normal vision. But without going too far into the cave, now the Darkvision-havers should see Monochrome, and PURE monochrome, because the cave is dark.

In essence, I think there is a hang-up on the perception of what the Darkness slider should be. It worked so beautifully before, where there was no light + Darkvision (or Dim Sight rather I suppose) awesome Monochrome, no matter what the Darkness slider said. Now, perfect, beautiful Monochrome can't be achieved unless Darkness = 1 (which again, makes no sense for a mixed scene), and to achieve desired results, I've been forced to configure scenes like this: image

Also plays into what @Zamrod has discussed with Atropos, as right above my comments.

dev7355608 commented 3 years ago

Mixed scenes have its problems without Perfect Vision as well, no? First, we don't really have the right light type for localized global illumination. And second, the lights are way too bright if Darkness Level is 0: bright light is barely different from dim light, and we don't have a nice dark-bluish tint. So entering the cave wouldn't feel like it's dark necessarily. To make it work properly, we would need to be able to mark indoor/outdoor areas, and have a separate Darkness Levels for each, or something like that.

@Aeristoka Is the new behavior a problem for you only in mixed scenes or in non-mixed scenes as well?

Aeristoka commented 3 years ago

Mixed scenes have its problems without Perfect Vision as well, no? First, we don't really have the right light type for localized global illumination. And second, the lights are way too bright if Darkness Level is 0: bright light is barely different from dim light, and we don't have a nice dark-bluish tint. So entering the cave wouldn't feel like it's dark necessarily. To make it work properly, we would need to be able to mark indoor/outdoor areas, and have a separate Darkness Levels for each, or something like that.

@Aeristoka Is the new behavior a problem for you only in mixed scenes or in non-mixed scenes as well?

Definitely have the issue for both. This mostly comes down to the fact that the amazing maps the community makes are WILDLY varied in how "bright" the scene is natively. This is where the Monochrome "just on" is very helpful, because then I can shade dark scenes gently (to get a nice "lit by torches, it looks good"), or shade the much brighter maps much darker, so they also look good in some kind of light, with Monochrome on for those just using Darkvision.

DipsoNOR commented 3 years ago

Couldn't this behavior just be a checkbox in the settings screen or the scene settings?

"always use full monochrome regardless of darkness level" or something.

I know this probably means having two implementation running in the module but at least for users its the best of two worlds, letting you use what works best in any given scenario.

Zamrod commented 3 years ago

As said above, my issue is that when darkness is set to 1, some maps are so dark you can't see them well. The grid is sometimes impossible to see at that Darkness level. Sometimes important details are missing. I want the people with Darkvision to still be able to SEE them, just in monochrome. So, I'll increase the darkness to 0.6/0.7 to make things more readable. But then the color starts to come back to everything.

To me, the thing that makes the most sense in terms of global illumination is:

Bright Light - Everything is bright, everything is color.

Dim Light - Everything is dim, everything is in color, just slightly darker, but brighter for those with dim vision.

Scene Darkness - The Darkness Level determines the amount of light in the scene. If you set it to 1, it is pitch black. Vision is limited to only areas with light sources and everything is monochrome for those with dim vision. If it is set to 0, the sun is out fully, vision isn't limited anywhere and everything is fully color. The higher the darkness level, the more everything looks monochrome to those with dim vision without another light source around. For those without dim vision, it just gets darker and darker until they can't see. (This is the default right now)

Global Illumination Disabled entirely - Everything is in monochrome for those with dim vision. Those without cannot see at all. The Darkness slider determines the brightness of anything that is visible in the scene. Lights on tokens or in the scene light the area more the less darkness there is, The monochrome color is brighter the less darkness there is. (This is the way it used to work until recently)

Mattches77 commented 3 years ago

My problem is that some maps are already colored to represent darkness, so when you put an additional darkness overlay on top, it becomes unusable. The darkness slider in foundry is only useful for a daylight-colored map that you want to change to nighttime, in my opinion.

Aeristoka commented 3 years ago

My problem is that some maps are already colored to represent darkness, so when you put an additional darkness overlay on top, it becomes unusable. The darkness slider in foundry is only useful for a daylight-colored map that you want to change to nighttime, in my opinion.

Agreed, that's exactly my point.

Tarbarian commented 3 years ago

I'm just here to throw my 2 cents in to back what DipsoNOR, Mattches77, and Aeristoka said. While having this whole "monochrome when darkness slider is up" setup is fine for some situations, if the map is already created to be dark having to lower the lighting more to have the monochrome vision on is annoying. A toggle checkbox to revert to old functionality would be much appreciated.

Hanhula commented 3 years ago

I'm also seconding this. My party are often dealing with inside scenarios, and I create the maps in Dungeonfog with lighting and darkness already pre-arranged. I would prefer to have the old functionality back, so that my players are able to see - I already set up the maps to be dark enough by far!

dmrickey commented 3 years ago

I'd like to use map a map like this that is pre-darkened for an encounter. image

The only way for me to get "darkvision" (monochromatic scale) is to turn this map even darker in Foundry and make it not usable anymore. Narratively it makes sense to tie the monochromatic option to the darkness scale, but in implementation all it does is reduce its usability where it was working perfectly before.

Aeristoka commented 3 years ago

I'd like to use map a map like this that is pre-darkened for an encounter. image

The only way for me to get "darkvision" (monochromatic scale) is to turn this map even darker in Foundry and make it not usable anymore. Narratively it makes sense to tie the monochromatic option to the darkness scale, but in implementation all it does is reduce its usability where it was working perfectly before.

It's not alpha blending, it's multiply blending. Somewhere on this line you should find the color that gives you the same result as lowering Darkness Level. image

This is what I have the issue with, because the change makes it essentially that instead of having the Monochrome work when Global Illumination is disabled, and changing the shading of the scene with Darkness, now you must set Darkness to 1, and very manually try to follow a slanted line up a spectrum of colors to reduce the effect applied by the Darkness slider. It has simply moved the configuration to what is arguably a more difficult to work with slider.

Another strong argument like my one I linked above, all that tying the slider to the monochromatic scale has done is make use use a much harder to use "slider" on the color select.

dev7355608 commented 3 years ago

I plan to add a tool that allows to paint on the map to mark areas of the map that are effectively already at Darkness Level 1 so to speak (per-darkened). These areas wouldn't be darkened any further, and full monochrome vision would be in effect always; the Darkness Level slider wouldn't have an effect on those areas anymore. This would make it possible to have proper in- and outdoor areas in the same scene like the cave example mentioned above. But I fear that the tool could be very confusing to use if not implemented in the right way. It would probably look something like the paint tools of the simplefog module. Feedback is appreciated.

Tarbarian commented 3 years ago

For ease of use and understanding, I can't really help, I have no experience in UI/UX design. As for features, I would ask for the addition of a polygon tool alongside the paintbrush, for easier work with buildings rather than natural structures.

Hanhula commented 3 years ago

A painted area is well enough for pre-darkened areas, but what about maps entirely in darkness? Will there also be a setting to simply mark those as "Pre-darkened"?

dmrickey commented 3 years ago

I haven't been using Foundry for as long as others, but out of all of the repos I've looked into for the modules I've been using (~40 at this point). This is by far the largest conversation on any single feature. I can understand where you were coming from when you made the change to tie darkvision directly to the darkness slider, but I think your use case is too narrow versus what everyone here is expecting.

I think the sheer number of responses here should indicate what the people using this mod want and satisfy your "request to hear feedback" that you asked for in your initial response.

I think until you can have a fully featured implementation of your current vision, your current changes don't work for what everyone's use case is who simply want an option for black and white dark vision on whatever map they're already using without touching the darkness slider.

dev7355608 commented 3 years ago

Monochrome vision is unaffected by Darkness Level if you enable Force Monochrome Vision in v1.7.3.

Aeristoka commented 3 years ago

Monochrome vision is unaffected by Darkness Level if you enable Force Monochrome Vision in v1.7.3.

Thank you for this!

dev7355608 commented 3 years ago

I removed Force Monochrome Vision in PV 1.9.0 / FVTT 0.8.5+. This change comes in effect once you upgrade to FVTT 0.8.5+. The option is still present in FVTT 0.7.9.

Instead, I added the scene setting Saturation Level that gives you full control over the strength of the monochrome effect. Check the box and set it to 0 to achieve the same results as with Force Monochrome Vision.

image

Zamrod commented 3 years ago

I removed Force Monochrome Vision in PV 1.9.0 / FVTT 0.8.5+. This change comes in effect once you upgrade to FVTT 0.8.5+. The option is still present in FVTT 0.7.9.

Instead, I added the scene setting Saturation Level that gives you full control over the strength of the monochrome effect. Check the box and set it to 0 to achieve the same results as with Force Monochrome Vision.

With “Force Monochrome Vision” it only was monochrome while “Global Illumination” was turned off. It appears with this new Saturation Level check mark that it applies even if “Unrestricted Vision Range” is turned on.

Before, I used “Global Illumination/Unrestricted Vision Range” to simulate daylight across the whole map. So, it should be colour when that is turned on. Also, I used the “dim light” global illumination in my Rime of the Frostmaiden campaign where it should only be dim light even in the middle of the day. I changed the darkness based on the time of the day and “global illumination” would turn on when the brightness gets high enough and off when it got low enough.

Is there still a way to do this in the newest version? It works almost the same except I can’t specify that the global illumination is dim and colour doesn’t happen with Unrestricted Vision Range

dev7355608 commented 3 years ago

Create a new light source with a very large dim radius so that the entire scene is covered. Set the light type to Local Light (Unrestricted). This gives you the same effect as the old global illumination setting. And you can set the Darkness Activation Range if you like to turn this light off at a certain threshold.

Since I added this new light type, you don't really need Unrestricted Vision Range (Global Illumination) anymore, I think, if you just want to have dim/bright global light. You can achieve with just with this light type. I think it also makes more sense to just work with light sources.

Since Global Illumination didn't actually illuminate anything, it was renamed to Unrestricted Vision Range, I assume, which makes much more sense. So Unrestricted Vision Range doesn't actually illuminate anything, and therefore I don't turn off the monochrome effect.

dev7355608 commented 3 years ago

Because it was discussed in this issue, I thought I let you all know: Perfect Vision 2.8.0 offers a new feature that makes it possible to properly configure lighting and vision in maps with indoor and outdoor areas properly. And more.

image