Light problems (bugs?)

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: dorpond, trevor, Azhrei

Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)
Icarean
Kobold
Posts: 8
Joined: Mon Apr 10, 2017 10:42 pm
Location: New Zealand

Light problems (bugs?)

Post by Icarean »

I've identified two problems (likely bugs). Both occur using maptool 1.4.0.5 on up-to-date Ubuntu 16.10.

1. When you move a light source which has bright and dim light radii, the light is sometimes (apparently randomly) displayed correctly or at other times the bright light extends to the radius that the dim light was supposed to. This problem didn't occur using maptool 1.4.0.0 on the same OS, so seems to have crept into the code recently.

Code: Select all

e.g.  Lamp: circle 15 45#000000
2. When you create a light source with a bright light radius of 0, the bright light extends to the map vision limit. This problem also occurs using maptool 1.4.0.0 on the same OS. Possibly relates to this bug: http://forums.rptools.net/viewtopic.php?f=21&t=17859

Code: Select all

e.g.  Spell - Dancing lights: circle 0 10#000000
If others can confirm, I'll post in the Bug Reports forum.

Icarean
Kobold
Posts: 8
Joined: Mon Apr 10, 2017 10:42 pm
Location: New Zealand

Re: Light problems (bugs?)

Post by Icarean »

First of all, I want to say that MapTool is amazing and I really appreciate what must be a huge amount of work that's been put into it.

I have some follow-up on the light errors I previously noted. This post relates to MapTool 1.4.1.8 on Ubuntu 17.04 with Java 8 package 8u131-b11-2ubuntu1.17.04.3 (all the latest versions available at the time of writing this post).

I made a demonstration video: https://youtu.be/TjqHYRrmD3o
This video is of a single instance of Maptool running (no server/client), but I get the same behaviour if I run a server and client on the LAN with 'players can reveal vision' and 'use individual views' checked.

1. Problem #1 in the above post (light source dim radius sometimes showing as a bright radius) seems to have been fixed. Thanks for your fine work!

2. Problem #2 in the above post (light source bright radius 0 is actually infinite) is still present. A work-around is to make a bright radius of 1, but it would be nice if zeroes behaved like zeroes. An example of '0 radius is infinite radius' is at [0:55] in the video (although I was using vision blocking layers, so this doesn't actually show infinite, but does still show vision a lot further than it should. An example of using 1 radius as a workaround is prior to [0:55].

3. A new problem seems to have crept in which I didn't notice in MapTool 1.4.0.5. Areas exposed due to light sources, when exposing a player's visible area, seem to remain visible even if that light source moves. Examples are at [0:30] and [0:40] in the video. Note that in the video when I'm clicking on the player token I'm then pressing CTRL-I to expose visible area.

4. There was also a UI bug (a dialog box didn't display properly) at [1:18] in the video, which I can make a separate post about if you'd like.

User avatar
aliasmask
RPTools Team
Posts: 9023
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Light problems (bugs?)

Post by aliasmask »

Moving light sources do not update FOW unless it's set as PC and you have the server setting to reveal on move.

Icarean
Kobold
Posts: 8
Joined: Mon Apr 10, 2017 10:42 pm
Location: New Zealand

Re: Light problems (bugs?)

Post by Icarean »

Moving light sources do not update FOW unless it's set as PC and you have the server setting to reveal on move.
Thanks for the reply. I understand that's why I needed to CTRL-I, which is fine. But the problem at [0:30] seems like a bright-light copy of the light source got left behind, leaving a bright circle where the 'dancing light' used to be. This is weird because a) the original light source was dim not bright light; and b) copies of the light source shouldn't get left behind. Hopefully the image below (screenshot from the video) makes this clear.
Light bug.jpg
Light bug.jpg (116.76 KiB) Viewed 2907 times

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: Light problems (bugs?)

Post by Full Bleed »

Icarean wrote:
Moving light sources do not update FOW unless it's set as PC and you have the server setting to reveal on move.
Thanks for the reply. I understand that's why I needed to CTRL-I, which is fine. But the problem at [0:30] seems like a bright-light copy of the light source got left behind, leaving a bright circle where the 'dancing light' used to be. This is weird because a) the original light source was dim not bright light; and b) copies of the light source shouldn't get left behind. Hopefully the image below (screenshot from the video) makes this clear.
Light bug.jpg
You should share the campaign file so people can see what all of your settings are.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

Icarean
Kobold
Posts: 8
Joined: Mon Apr 10, 2017 10:42 pm
Location: New Zealand

Re: Light problems (bugs?)

Post by Icarean »

You should share the campaign file so people can see what all of your settings are.
Unfortunately I didn't save the campaign that's in the video, so I recreated it this morning with the same settings (I have a "my default settings" file which I loaded for the video campaign and for the attached campaign). I can't recreate the exact behaviour this morning (!). MapTool seems to occasionally leave a bright light behind when I move the 'dancing light', but corrects this on a CTRL-I (whereas in the video from yesterday's test, you can clearly see CTRL-I not fixing the leftmost bright light circle left by the 'dancing light').

Interestingly today a couple of times the light circle around the 'Mando' (player) token has become totally bright in the manner I described originally for problem #1, which it wasn't doing yesterday when I made the video.
Attachments
Light bug campaign.cmpgn
(131.8 KiB) Downloaded 86 times

dorpond
RPTools Team
Posts: 5534
Joined: Thu Jun 01, 2006 2:05 pm
Location: Buffalo, NY

Re: Light problems (bugs?)

Post by dorpond »

I will try to recreate this and work with the dev's since I am already currently testing lighting/vision issues.
(found another one where lighting changes don't update on the client side unless a token is selected first).

Thanks for the heads up!
How to use my bundled artwork (MT1.3B60+): http://forums.rptools.net/viewtopic.php?f=8&t=11759

dorpond
RPTools Team
Posts: 5534
Joined: Thu Jun 01, 2006 2:05 pm
Location: Buffalo, NY

Re: Light problems (bugs?)

Post by dorpond »

I confirmed that there are some serious odd things going on here with lighting and exposing. I am not even sure where to start testing with this because everything about it is just odd!

For those who are interested, load up that file and test it for yourself. Once you load it, move around that little light - make note that it is an NPC token, so maybe that has some variable in this. Move stuff around and expose this and that - when you are done being humored by that, start a server and see how the FOW resets. Even then, it has some oddities about it.

I don't even know where to start with this really. I will have to try to recreate this from scratch and see if it is anything specific causing this bug. I should also try to recreate the bug in previous editions to see where the bug introduced itself.
How to use my bundled artwork (MT1.3B60+): http://forums.rptools.net/viewtopic.php?f=8&t=11759

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: Light problems (bugs?)

Post by Full Bleed »

dorpond wrote:I confirmed that there are some serious odd things going on here with lighting and exposing. I am not even sure where to start testing with this because everything about it is just odd!

For those who are interested, load up that file and test it for yourself. Once you load it, move around that little light - make note that it is an NPC token, so maybe that has some variable in this. Move stuff around and expose this and that - when you are done being humored by that, start a server and see how the FOW resets. Even then, it has some oddities about it.

I don't even know where to start with this really. I will have to try to recreate this from scratch and see if it is anything specific causing this bug. I should also try to recreate the bug in previous editions to see where the bug introduced itself.
I'm still on 1.4.0.2 and this file isn't compatible with that, so I can't really test it.

But I wonder if a lot of this trouble is the fact that when you're not running a server it assumes that you're using individual FoW. Which means that exposures will be based on selected tokens, etc. I've lobbied against that being the default method multiple times for many reasons (i.e. Why would an *optional* setting--"individual FoW*--ever be a default? It's confusing to new users. Individual FoW causes performance problems. Etc.)

Are you being really careful with what you have selected when exposing and when checking for what you think should be exposed?

EDIT: Ok, I went ahead and installed 1.4.1.8. And for sure the sight/light/FoW system is broken. For starters I think I'd look at how vision is rendering outside a light source's established parameters.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

Icarean
Kobold
Posts: 8
Joined: Mon Apr 10, 2017 10:42 pm
Location: New Zealand

Re: Light problems (bugs?)

Post by Icarean »

dorpond wrote:I confirmed that there are some serious odd things going on here with lighting and exposing. I am not even sure where to start testing with this because everything about it is just odd!
Full Bleed wrote:EDIT: Ok, I went ahead and installed 1.4.1.8. And for sure the sight/light/FoW system is broken. For starters I think I'd look at how vision is rendering outside a light source's established parameters.
I'm absolutely happy to test lighting set ups for you all if I can be of any more help.

dorpond
RPTools Team
Posts: 5534
Joined: Thu Jun 01, 2006 2:05 pm
Location: Buffalo, NY

Re: Light problems (bugs?)

Post by dorpond »

Much appreciated, Guys! I am working closely with Jamz on this stuff. He is aware, has our videos (I made one also) and has solved some of the issues already.
How to use my bundled artwork (MT1.3B60+): http://forums.rptools.net/viewtopic.php?f=8&t=11759

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: Light problems (bugs?)

Post by JamzTheMan »

OK, I've logged this into my issue list: https://github.com/JamzTheMan/maptool/issues/21

I'll see if I can get it fixed with my next release.
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

Icarean
Kobold
Posts: 8
Joined: Mon Apr 10, 2017 10:42 pm
Location: New Zealand

Re: Light problems (bugs?)

Post by Icarean »

I'd just like to say that you're all awesome for all of your work on MapTool and commitment to improving the software! Thank you!

Since light/vision is being looked at, please can I also request some changes to the default campaign properties as well as the way that light is handled? These aren't bugs per se, but are confusing oddities.

The 5th edition D&D Player's Handbook (p.23) reads: "Darkvision. Accustomed to twilit forests and the night sky, you have superior vision in dark and dim conditions. You can see in dim light within 60 feet of you as if it were bright light, and in darkness as if it were dim light. You can't discern colour in darkness, only shades of gray."

I realise that MapTool isn't written specifically for D&D, but then again it is likely used by a lot of D&D players. The default Darkvision campaign Sight definition is: Darkvision: circle distance=62.5 r60

My three feature requests are:
  • (easy change, for the next MapTool release) That the default darkvision definition be changed to [just b]Darkvision: circle r60[/b] (i.e. remove the 'distance=62.5' part), so that darkvision doesn't limit player sight during the daytime. The default definition means that a player with darkvision (e.g. an elf) can't see very far when Map->Vision is set to 'Day', which is counter intuitive.
  • (easyish change, I think, for the next MapTool release) That the default darkvision allow player vision as dim light rather than bright light, simulating the (presumably) usual situation of a player exploring a dungeon in darkness. (the current setting illuminates the r60 as bright light, which isn't how D&D players would expect darkvision to work).
  • (more difficult change, to be further discussed amongst the developers) That there be some further development of 'dim light' versus 'bright light' and it's affect on normal and dark vision. I wonder if another Map->Vision setting ('Low light') would suffice, to simulate dusk, dawn, or a smoke-filled battlefield? Perhaps this is beyond the scope of current development.

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: Light problems (bugs?)

Post by JamzTheMan »

Thanks for the comments!

Re the first change, that seems reasonable to me. Although it's an easy change, I haven't seen a system yet where "Darkvision" limited ones sight in 'daylight'. I put an issue to track here: https://github.com/JamzTheMan/maptool/issues/22
If someone has a specific system that feels would warrant the original setting we can rename/add both. Let me know.

Right now, MT doesn't "know" dim light vs bright light, You can 'color' the lights but there's no additive lights (ie dim lights don't become bright). Re "personal lights" ie darkvision. in Pathfinder, it's neither dim nor bright light, it's black & white vision (which I thought about adding) so that varies from game system to game system.

I haven't thought of a way to represent Dim lights vs Bright lights in MapTool (or I would do it!). It's a tough nut to crack.
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

Icarean
Kobold
Posts: 8
Joined: Mon Apr 10, 2017 10:42 pm
Location: New Zealand

Re: Light problems (bugs?)

Post by Icarean »

I have no idea how the code determines lighting, so I apologise if any suggestions are nonsense or unimplementable.

Personal light sources can have a bright and dim light radius, such as the default D20 lamp:
Lamp - 15: circle 15 30#000000

In the following image, Vision is set to "Night", Fog of War is enabled, and the character on the left is a human with the default D20 Lamp.
Light and sight example.png
Light and sight example.png (105.94 KiB) Viewed 2638 times
The character on the right is an elf with the default darkvision:
Darkvision: circle r60

The Elf's can "see" like the "bright" part of the light cast by the lamp, rather than the "dim" outer edges of the lamp's radius. I imagine since there is already code to cast bright and dim light with light sources this could be implemented without significant changes for the "personal light" associated with sight? Having the ability to define sight bright and dim radii (as for light sources) would help to overcome any D&D/Pathfinder/etc specific problems).


Just to see if it would work (in case this had already been implemented but was undocumented), I tried changing the Campaign Properties->Sight setting to
Darkvision: circle r30 60
(this caused Java error popups)

or to
Darkvision: circle r30 r60
(MapTool automagically removed the "r30" when I closed the Campaign Properties window).


I certainly get that implementing black and white vision, and dawn/twilight modes would be a significant extra piece of work so am certainly not pushing you for those! :)

Thanks again.

Post Reply

Return to “MapTool”