MapScaleTool v1.01
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.
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.
MapScaleTool v1.01
After reading through the tuts on how to scale a scanned map that has pre-existing grid lines to match MapTools grid lines Decius and I decided that a tool was in order to make this an easier process.
Voila! MapScaleTool v1.01 enters. It's an excel spread sheet (nothing too fancy) that give directions on how to measure in an image editing program and will then do the calculations as described in the MapTool manual (v1.1)
It's available here:
http://www.beauvais1.com/mapscaletool
It's free and we hope it's useful. If you have any questions or comments please put them in this thread.
Thanx,
Kizan and Decius - Authors
Voila! MapScaleTool v1.01 enters. It's an excel spread sheet (nothing too fancy) that give directions on how to measure in an image editing program and will then do the calculations as described in the MapTool manual (v1.1)
It's available here:
http://www.beauvais1.com/mapscaletool
It's free and we hope it's useful. If you have any questions or comments please put them in this thread.
Thanx,
Kizan and Decius - Authors
Thanks! It's nice to know OpenOffice opens it. (Though it's a really simple spreadsheet, so I would have been very surprised if it didn't work.)Phergus wrote:Nicely done and it does work with OpenOffice.
You still have to do a lot of the grunt work yourself in the image editing app, but the spreadsheet helps to take the guesswork out of the scary math part. Ultimately I would love to see someone make a utility -- or have the functionality integrated into MapTool -- to load an image, let you do the measuring right there, and resize the image in one or two relatively simple steps.
It's all math so that being said it is totally doable. All we would need is the method of how we would do it. Any ideas how we could make it function for the user in Maptool?Decius wrote: Ultimately I would love to see someone make a utility -- or have the functionality integrated into MapTool -- to load an image, let you do the measuring right there, and resize the image in one or two relatively simple steps.
Postulate: I am non-programmer.
Postulate: I am a technical Network Admin person
Problem: scaling/rescaling maps to fit the printed grid.
First solution: Somehow allowing precise (floating point precision) manual rescaling of the map in real time.
Second solution: provide the measuring tools and helpful instructions for the user to get the needed numbers for a rescale.
Second solution Optional: provide a in MT function to rescale the image in non-real time.
Thanx,
Kizan
Postulate: I am a technical Network Admin person
Problem: scaling/rescaling maps to fit the printed grid.
First solution: Somehow allowing precise (floating point precision) manual rescaling of the map in real time.
Second solution: provide the measuring tools and helpful instructions for the user to get the needed numbers for a rescale.
Second solution Optional: provide a in MT function to rescale the image in non-real time.
Thanx,
Kizan
Code: Select all
|----------------- 640 pixels --------------------|
_ _________________________________________________
| | |
| | Map scenery and stuff outside |
| | the dungeon walls. |
| | _________C_________ | _
| | | | | |
4 | | | | | |
8 | | | | |
0 | _________|_________|_________|_________| 3
| | | | | | 0
p | A | | Dungeon room | |B 0
i | | | and hallways | |
x | |_________|_________|_________|_________| p
| | | | i
| | | | | x
| | | | Scenery | |
|_ |___________________|_________|___________________| _|
D
|------------- 520 pixels --------------|
- The map image file is 640 pixels wide by 480 pixels tall
- There are 520 pixels horizontally between points A and B
- There are 300 pixels vertically between points C and D
- There are 4 map squares horizontally between points A and B
- There are 3 map squares vertically between points C and D
(640*80)/(520/4) = 393.846
(480*80)/(300/3) = 384
Your final image would be resized down to 394 pixels wide by 384 pixels tall in order to give you a grid in the image that lines up with MapTools's 80 pixel grid. Obviously in a real-world scenario you'd be working with a much larger image which would result in more realistic dimensions, but this should illustrate the process.
What MapTool would require is a way for the user to load a map, define points A, B, C, and D, as well as the size of a single square on the map image. With that knowledge, MapTool could calculate the number of horizontal pixels between points A and B, the number of vertical pixels between points C and D, and the number of squares that could fit within those distances. MapTool could then dynamically rescale the image in the display window so its grid aligns properly with the scanned image. Whether it actually resizes and saves the image file or just shrinks it down when displaying it is a topic for discussion.dorpond wrote:It's all math so that being said it is totally doable. All we would need is the method of how we would do it. Any ideas how we could make it function for the user in Maptool?
What I don't know is how this math applies to hexagonal maps. When counting hexagons between points, do you count in a straight line or zig-zag across since the hexagons are arranged in a brick-like alternating pattern?
Code: Select all
__2__ __4__
/ \ / \
__1__/ \__3__/ \__5__
/ \ / \ / \
/ \_____/ \_____/ \
\ / \ / \ /
\_____/ \_____/ \_____/
Code: Select all
_____ _____
/ \ / \
__1__/ \__2__/ \__3__
/ \ / \ / \
/ \_____/ \_____/ \
\ / \ / \ /
\_____/ \_____/ \_____/
Hexes become problematic as any way you size them either the face-to-face dimension or the vertex-to-vertex distance must be a fractional value.
For gaming purposes most measures are done face-to-face. A tactical hex would be 5' face-to-face or I believe Hero uses 1 meter face-to-face.
Face-to-face (minor diameter) would be 40 pixels with the default MT settings. The vertex-to-vertex (major diameter) distance however is (2 * minor)/sqr(3). So you end up with an ugly 46.188021535170061160731902440157 pixels for the vertex-to-vertex distance.
To correct a map across X axis, with the hex layout as you drew them, it is best if you work in pairs of columns as the distance across from the leftmost vertex of a hex in column 1 to the leftmost vertex of column 2 (using your bottom illustration) is 1.5 times the major diameter.
The vertical is done just like the square grid maps.
For gaming purposes most measures are done face-to-face. A tactical hex would be 5' face-to-face or I believe Hero uses 1 meter face-to-face.
Face-to-face (minor diameter) would be 40 pixels with the default MT settings. The vertex-to-vertex (major diameter) distance however is (2 * minor)/sqr(3). So you end up with an ugly 46.188021535170061160731902440157 pixels for the vertex-to-vertex distance.
To correct a map across X axis, with the hex layout as you drew them, it is best if you work in pairs of columns as the distance across from the leftmost vertex of a hex in column 1 to the leftmost vertex of column 2 (using your bottom illustration) is 1.5 times the major diameter.
The vertical is done just like the square grid maps.
-
- Kobold
- Posts: 2
- Joined: Mon Mar 05, 2007 2:16 pm
He just described it wrong. A hex is composed of 6 equilateral triangles radiating from a central point. So the distance from vertex to opposite vertex is equal to twice the length of a side. The distance from edge to edge is equal to twice the height of a triangle. The height of an equilateral triangle is sqrt(3) times the edge length.Decius wrote:Anyway, does anyone know how the math works for hexagons?
[head explodes]
No, I described it correctly.
You are just coming at it from a known length of a side which isn't anywhere near as helpful for purposes of resizing a map image or for determining how many pixels across a hex is or should be.
You need the face-to-face distance to be an even number of pixels for MT to match a hex grid to it. (Until MT supports fractional pixel dimensions for hex sizes.)
If the face-to-face distance is a whole number of pixels, the vertex-to-vertex distance is not going to be. Period. But that is okay as it is the face-to-face distance that is important. When someone says the map is 40 pixels = 5' and that it is using 5' hexes, the distance between the center points of two adjacent hexes is 40 pixels which is the same as the face-to-face distance.
Your math is correct however and simple algebra takes you to the formulas I gave.
You are just coming at it from a known length of a side which isn't anywhere near as helpful for purposes of resizing a map image or for determining how many pixels across a hex is or should be.
You need the face-to-face distance to be an even number of pixels for MT to match a hex grid to it. (Until MT supports fractional pixel dimensions for hex sizes.)
If the face-to-face distance is a whole number of pixels, the vertex-to-vertex distance is not going to be. Period. But that is okay as it is the face-to-face distance that is important. When someone says the map is 40 pixels = 5' and that it is using 5' hexes, the distance between the center points of two adjacent hexes is 40 pixels which is the same as the face-to-face distance.
Your math is correct however and simple algebra takes you to the formulas I gave.
I've been petitioning for an easy way to resize maps so they exactly fit to the grid since I've discovered maptool.
As it is now, it is a pain, especially with the WotC maps. I have to open up photoshop, I cut a 20 square wide 1 square high rectangle, measure it, do the calculation, resize the map, load it into maptool, discover that it is not exact (and a small difference gets visible after about 20 squres), go back to photoshop, change things a little bit, load the map again in maptool...
The one thing kloogewerk does better is that: you determine point A, point B, the distance between them et voilà !
I ain't no programmer but it wouldn't seem to be that difficult to implement.
As it is now, it is a pain, especially with the WotC maps. I have to open up photoshop, I cut a 20 square wide 1 square high rectangle, measure it, do the calculation, resize the map, load it into maptool, discover that it is not exact (and a small difference gets visible after about 20 squres), go back to photoshop, change things a little bit, load the map again in maptool...
The one thing kloogewerk does better is that: you determine point A, point B, the distance between them et voilà !
I ain't no programmer but it wouldn't seem to be that difficult to implement.