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
791 stars 258 forks source link

[Feature]: Additional options for displaying grid lines #3840

Open bubblobill opened 1 year ago

bubblobill commented 1 year ago

Feature Request

The current implementation for displaying grid lines is (at best) naff. Zooming out can eventually leave you with more grid lines on screen than map image

Equally frustrating can be finding a single colour that doesn't disappear on sections of a map image

The minimum grid line width can be too wide, and when you increase the grid line width the ugly gets multiplied.

The Solution you'd like

I want to see additional grid rendering options. These examples are built by varying the rendering stroke, the colour opacity, and the number of times the grid is drawn. Implementing different blend modes like burn, dodge, darken, difference, exclusion, hard_light, lighten, multiply, overlay, screen, soft_light, etc. would be additional awesome but that seems a bit harder without JavaFX.

High contrast semi-transparent skinnier grid lines are nicer Width = 1 image Width = 5 image

Dashed gridlines are more subtle image

As are dotted grid lines image

Just marking grid intersections is my favourite image

Alternatives that you've considered.

No response

Additional Context

No response

Phergus commented 1 year ago

Any changes will have to support all 3 grid types (square, hex, iso) and will need to be checked for performance issues.

Also MT stops rendering grids at 10% zoom I believe.

bubblobill commented 1 year ago

Any changes will have to support all 3 grid types (square, hex, iso) and will need to be checked for performance issues. I plan on getting it working well before I measure performance (doubt it will be much of an impact).

Also MT stops rendering grids at 10% zoom I believe. Correct

FullBleed commented 1 year ago

They look like nice options. Will be interested in seeing if there is a performance impact. The slight increase in image scaling quality that Craig added had significantly more impact than expected.

I want to see additional grid rendering options. These examples are built by varying the rendering stroke, the colour opacity, and the number of times the grid is drawn. Implementing different blend modes like burn, dodge, darken, difference, exclusion, hard_light, lighten, multiply, overlay, screen, soft_light, etc. would be additional awesome but that seems a bit harder without JavaFX.

It seems like we're not going to get any good blending methods until we get libGDX.

goblin-3 commented 1 year ago

hi i would like to try and add the additional dash and intersection grid type.(partially for a school project). any tips for where to start?

bubblobill commented 1 year ago

hi i would like to try and add the additional dash and intersection grid type.(partially for a school project). any tips for where to start? For each grid type you need to change the rendered shape to be something that uses BasicStroke, basically a Path. Then you need to set the dash array so the dashes line up nicely. I doubt this will make any sense to you but this is what I was playing with. https://github.com/bubblobill/maptool/blob/playGrid/src/main/java/net/rptools/maptool/client/ui/zone/GridRenderer.java