Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Hexagonal Grid not perfectly equilateral?

1611245709

Edited 1611246877
Hey everyone, I encountered an odd problem when trying to align a map with the hexagonal grid. The map I am using is a selfmade one I created using the vector graphics program inkscape. It is subdived into heaxagons which have a thick black outline. After uploading the image file (a .png) it first shows at a fairly low size, so I put in the actual pixel dimensions using set dimensions. In this case 2,709 x 5,024 px. The image scales up. I then create the hex grid in page settings, trying of course to match the size of the roll 20 grid to that of the grid on the map. Now I encounter the problem that there is no one grid size that will match the hexagonal grid on my image both horizontally and vertically.I can set the roll 20 grid to a size at which the hexagons in my image match it perfectly in the horizontal direction, or I can set it to a slightly different size that matches the hexagons on the map vertically. That seems to indicate, under the assumption that my image does in fact have a perfectly equilateral, regular hex grid, that the roll 20 hex grid is not perfectly equilateral.  Did anyone make similar observations? Am I doing something wrong when upscaling my map, perhaps slightly distorting it? I'm adding the map for reference.Edit: Also adding a screenshot that will maybe make it clearer. I marked a red line where everything is lined up perfectly. As you look to the right or left of that line, you can see that the (faint) roll 20 grid begins to go out of alignment since the cells are horizontally smaller. Vertically, it's aligned everywhere.    
1611248104

Edited 1611248232
Resize the image horizontal until it fits close enough to be workable and then make the color of the roll20 grid transparent. 
1611252136
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
In the aggregate, you should be able to line things up. There will always be rows that look a little problematical, due to the difficulty of forcing "analog" hexes to "digital" hexes. (i.e., you don't have fractional pixels.) Martijn's advice is the best solution.
Thanks for your suggestion, Martijn, I think I will go with that solution. I am not sure if I understand your reply correctly, keithcurtis. Of course it is always a problem to display anything at all on a pixel grid, since the things we want to display (letters, shapes, photos, etc.) are not made up of pixels naturally. So I understand slight imperfections such as "stairs" on a diagonal line, etc. That being said, I don't think that the possible causes you described explain how the deviation of the roll20 grid from the grid in the map increases consistently and progressively with every row further away from the spot where they are aligned. The deviation adds up. This is not an issue of "rendering" a properly defined hex grid to an imperfect pixel grid such as my screen. It is a problem with the definition of the grid itself. That, or my map has imperfect hexes. But I doubt it.
1611267625
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Without concise measurement and testing, I can't answer with any authority. However, if the disagreement is progressive and consistent, you should be able to account for it with a slight manual resizing of the placed image. Again, as Martijn suggests.
1611320437
David M.
Pro
API Scripter
If you are using Hex (H), someone came up with something that worked for them. From  this thread : "If you are using Hex (H), and a square map, set the page height to to the number of hexes, vertically. Set the width to that number multiplied by 1.0082976746938481461036010506722. Set the cell height multiplier to 0.87841715270730512222684903731446."