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
This post has been closed. You can still view previous posts, but you can't post any new replies.

Proposed solution for Map grids

Last night I spent about 40 minutes trying to get my uploaded map to align to the grid. Problem I just wanted the apps grid to align to the grid on the JPG. This was exceptionally hard to do. First I had to guess at what size to make the new map. Then I uploaded the JPG. Then I adjusted my the app's map size to be big enough. Then I had to scale up the JPG and then tweak it with the mouse to try and get it to align. Making this worse - whenever I moved the JPG, after I let go it would shift over several pixels. I could never get it to align. Solution I suggest that the grid be adjustable on the fly, with controls for positioning and size. This would allow for greater fidelity without adding much complexity. Instead of adjusting the base map, you adjust the grid. Ideally this would be a toolbar that appears when the DM is adjusting objects on the map layer. Options would include: * Grid size - the size of each square * X Offset * Y Offset * Map Width * Map Height The controls could be editable numbers with scrubbable inputs (drag up or down for large number changes. click up or down for precise control). Changes should be reflected in real time. I'm happy to mock this up for you if my text doesn't make sense.
Sounds like a good idea. We'll be looking into it. And we love mock-ups. Love 'em.
Maybe a simple solution would be to add Shift+Alt+Drag to offset the image in relation to it's origin (snap point). So you would first Shift+Alt+Drag to align the top-left image grid corner to the grid, then Alt-Drag the bottom-right corner to align the grids. Done.
Great idea...
A really easy way to do it (easy for users) would be to have a tool that lets you pick out two spots on the image tile corresponding to the corners of a grid cell in that image, and it automatically scales the image and positions it so that both of those points sit on the corners of a grid cell in Roll20. That way no fiddling with number inputs. Even better if you could associate this information with the tile in your art library, so it automatically does it in the future when reusing the tile (i.e. if you want to have a bunch of geomorphs that you reuse a lot).
1336069744
Deightine
KS Backer
Sheet Author
Nich's idea for setting the corners on the grid would work pretty well for the idea I suggested early on for measuring the map to dictate square sizes. Only this would allow for a better line-up as well. A great way to do it.
Nicholas - I like that idea. Potentially harder for them to implement but likely easier for the user. The only draw back is it relies on the user's input to be precise.
The alt/option key command to move without snapping from another thread is handy, and I like the original suggestion. Let me 'edit' and image and enter a new size (in full or partial squares). And maybe a checkbox for the page settings to ignore "snap to grid".
Love the "pick to points" idea, that would probably be my top rated feature request right now.
I *think* this would be the pseudo code needed for the pick-the-points math (I haven't actually tested it, maybe if I have free time this weekend I'll try it out) gridSize = 100 image(x = 100, y = 100, w = 300, h = 300) //Top left corner and width/height of the image clickA(x = 132, y = 110) //Top Left corner of image grid square clickB(x = 142, y = 120) //Bottom Right corner of image grid square //TODO a little logic to calculate topleft/bottomright based on any click order and corner set imageGridSizeWidth = clickB.x - clickA.x //width of image grid imageGridSizeHeight = clickB.y - clickA.y //height of image grid widthScale = gridSize / imageGridSizeWidth heightScale = gridSize / imageGridSizeHeight xMargin = remainder((clickA.x - image.x) / imageGridSizeWidth) * imageGridSizeWidth yMargin = remainder((clickA.y - image.y) / imageGridSizeHeight) * imageGridSizeHeight scaledImage( w = image.w * widthScale, h = image.h * heightScale, x = xMargin * widthScale * -1; y = yMargin * heightScale * -1; )
Eric: Thanks for that. Always helpful to see how others would approach the problem. I think the main thing that worries me right now about that feature (and someone else already mentioned this) was it's hard to tell how accurate people would have to be. I have an idea or two to help with that, but if you're not pixel-perfect with your clicking it may be in vain.
If you wanted to go fancy, you could allow for several references to be placed, and then do a least squares fit to minimize the inconsistency. A very fancy method would be a piecewise linear scaling to actually stretch the image to make it locally fit the grid (basically what tablets/etc do with calibration points).
Yeah, I realize it could be a finicky process but after spending a few days getting a campaign setup I think I've spent most of my time aligning map grids to the roll20 grid so it's a sore spot for me :) Nick's suggestion is event better, though I fully realize the wishes for features weigh heavily against available developer time!
Yeah, I realize it could be a finicky process but after spending a few days getting a campaign setup I think I've spent most of my time aligning map grids to the roll20 grid so it's a sore spot for me Why not switch off the Roll20 grid and use the map grids instead?
I had tried that as well and it just moves the problem. -The measuring tool isn't really useful without the map grid matching the game grid. -Sizing tokens becomes a pain -Aligning token size to map size becomes a pain especially with lots of pages and copying/pasting PC tokens between each page as we advance, every time we go to a new page I have to resize all the PC tokens to match the map on that page. So no more pain sizing the map but related pain sizing/placing the tokens.
Perhaps I could suggest that there is a right click option that for background layers: Use Full Zize (which would make the image be as large as it should be) Size Grid To (which sets the grid size to the size of the image
Why not switch off the Roll20 grid? Because tokens would not snap to the grid if I'm just using the original imported map image. The Roll20 Grid has its obvious advantages, so I'd rather be able to quickly adjust the grid size to match the image than to abandon it altogether. Why not switch off the Roll20 grid and use the map grids instead?
All excellent points. I think this is of critical importance! When I use maptool I can do this quickly and easily. I import a map, click on "adjust grid" and visually match the Maptool grid to that of the background image (assuming that image is a standard battlematt). It makes it much easier if the image has a square scale that matches the program's grid default, but it does not matter much. This is much better than increasing the size of the image to match the program grid, because the image may be low rez, and enlarged it looks like crap. I'm not saying Maptool is better (it's got a much steeper learning curve)...just that the feature spoken of here is well represented in that program. I had tried that as well and it just moves the problem. -The measuring tool isn't really useful without the map grid matching the game grid. -Sizing tokens becomes a pain -Aligning token size to map size becomes a pain especially with lots of pages and copying/pasting PC tokens between each page as we advance, every time we go to a new page I have to resize all the PC tokens to match the map on that page. So no more pain sizing the map but related pain sizing/placing the tokens.
This is the first problem i encountered also. I uploaded a map that i purchased from a 3rd party that has the grids on it already, trying to line it up manually is very time consuming. I hope this is a feature you guys put high on your development plan.
I don't see this mentioned here... but I will say a quick fix is to TURN OFF the grid and play free form on your gridded map. Used this with several third party maps, and it works well with token movement.
Consider this: when you play at an actual table, with miniatures or tokens on a printed or sketched map, you get along fine without snap-to-grid.
It will work fine that way, it just precludes a lot of other features that are great, like the auras and the measure tool. Moving forward there will probably be more features that precludes, such as blast/cones/spell templates etc.
Here's my version of this idea: You pull an image file from a source and it drops onto your map. Your grid does not match what it should for this map (or this map does not have ideal scaling). Let's say it's an inn. Imagine a tool that you can activate, then draw a box (for example, from the top corner of the fireplace on inn's west wall up to the bottom edge of the double door on the east wall), and then the tool asks you how many units that should be, and you answer 6w x 3h. Now Roll20 rescales that whole image on the basis of the identified rectangle section being 6 units wide by 3 units high. It's must math, really, but playing with the corner to resize an image can be tedious.
The problem with this kind of resizing is that you must be very precise. If you miss your selection by a few pixels, the error is multiplied by the size of the map. You could easily be off by a square or an half square on the borders of your map.
I don't see this mentioned here... but I will say a quick fix is to TURN OFF the grid and play free form on your gridded map. Used this with several third party maps, and it works well with token movement. It would work... if it was possible to make maps and tokens appear at full size within Roll20. But if you turn off the grid, resizing graphic assets becomes anyone's guess. A fix to this seems to be on the devs program.
Necro'ing an older discussion... but I favor being able to change the grid size from 70px to something else. All my battlemap/dungeon tiles are 100 px per square and I would have to re-size them every time I import them or go through and batch re-size them in gimp, reducing detail. All my tokens I create are generally sized at 100px by 100px as well.
I agree with Jonathan's suggestion of being able to change the default grid unit size of 70 pixels. For what is worth, I'm using tokens of 200x200 and 400x400 pixels.
This has been fixed (sort of) since this discussion was started. It is now possible to resize precisely within Roll20 by setting yourself the size in pixels (right-click, advanced, set dimensions). What I still find missing is the possibility to set the size to "native". Having to enter 76x85 pixels for a token that is 76x85 pixels (and doing it for all the graphic stuff I use) can quickly become quite depressing. I always make my maps and tokens at the size they are going to be displayed, so having the possibility to have the program behave in what should be the simplest way: one pixel is one pixel, should be welcome. Being able to set a different grid size would be nice too. You can already do it now by entering a factor for the squares sizes (1.42857 for 100 px squares), but it mess up the distance tool.
Best solution ever... have the in actual grid off, so you do not see it, then have grid snapping off so the tokens can be placed where ever. You now have only the files grid to use... Just saying. xD That's normally what I've seen DMs do.
Maybe a simple solution would be to add Shift+Alt+Drag to offset the image in relation to it's origin (snap point). So you would first Shift+Alt+Drag to align the top-left image grid corner to the grid, then Alt-Drag the bottom-right corner to align the grids. Done. I want to second this idea. I uploaded my first few maps yesterday, and I found myself wishing several times that this functionality was available.
This is a really old thread, and several of these suggestions have already been put in place. For example, there is a tool now to quickly align maps to the grid: <a href="http://help.roll20.net/tabletop-aligning-maps/" rel="nofollow">http://help.roll20.net/tabletop-aligning-maps/</a> And you can also change the size of the grid under the Page Settings dialog. (Screenshot attached). As it says at the top, 1 un = 70 pixels. It works best if you stil to multiples of 70 pixels, though. So to make the grid size 210 pixels, set it to 3 units.
It works best if you stil to multiples of 70 pixels, though. So to make the grid size 210 pixels, set it to 3 units. I thought it worked for any size, if you calculate the number to enter in the units field (as I said, you have 100 pixels grid if you enter 1.42857). Am I overlooking a difficulty here? The only problem I see, is that the measuring tool doesn't follow the same change and still count 70 pixels as one unit.
Well for me to get my map made and into Roll20 last night, I had to make it in MapTool using my dungeon tiles and then export it as an image. After that, I opened it in GIMP and resized it down 30% to get it from 100px per inch to 70px per inch. It took quite a bit of time and going back and forth between GIMP and Roll20 to get the dimensions just right to line up at 70px.
If your map is made at 70px per square (I wouldn't call them inches, it tends to produce confusion between the graphic scale and the Roll20 map scale), it would be easier to just set the size in pixels of the map in Roll20. The size would be perfect at once and the squares would snap also at once.
I left ppi at 72 and adjusted the image until it was 70 px per square. I guess I could have done that in Roll20 as well, but I don't want to have to edit every image every time I drop one on the map. I have hundreds and hundreds of map tiles that were all created at 100px per square. I can't use those map tiles now as is without having to edit each one every time I drop one on the map. If I could change the unit size to 100 px per unit, I wouldn't have to edit anything. It would be drag, drop, and play.
Indeed, there are two solutions: -either you edit them all outside of Roll20 (I suppose it should be possible to make a script in GIMP as in Photoshop to resize them all at 70% size); then, when you open them in Roll20, you just have to enter their size so they line up perfectly with the 70 px grid, without using the (admittedly user-unfriendly) Roll20 resize/aligning tool. -or, if you don't want to edit your maps, you can use a 100 px grid in Roll20 by entering 1.42857 in the size field (look at the screenshot shown by Riley above) in the page setting dialog. And you can then use all your 100px scale ressources. None of those solutions is perfect, but they are workarounds until there is a change in the way Roll20 handle maps (which is no more in the works, I think). I don't really understand what you mean by adjusting until the map is 70px per square. You just have to set the size in GIMP or Photoshop. If the map is, for exemple, 20x35 squares, you just resize at 1400x2450 pixels and that's it; there is no fiddling around. It is even easier if all your maps are at 100px per square, a simple resize at 70% should work for all of them at once.
I would rather not be forced to re-size all the hundreds and hundreds of dungeon tiles I already have though and maintain them in two separate file locations, taking up further space on my hard drive. I would also rather not be forced to create two versions of every dungeon tile I create after this point. The workaround with 1.42857 messes up the measuring tool and we used that quite a bit yesterday in a four hour combat session.
The workaround with 1.42857 messes up the measuring tool and we used that quite a bit yesterday in a four hour combat session. That's a bug, I'll look into it.
Riley D. said, several of these suggestions have already been put in place. I just rechecked these options more thoroughly. Glad to see that there has been an update for the Page Settings allowing fractional numbers in the Scale field and in the Size of the Units field. This solves the issue that I was having for setting 1 meter hexagons made of 2 grid units in the first post of The updated Ruler Tool thread (<a href="http://community.roll20.net/discussion/2136/the-updated-ruler-tool#Item_1" rel="nofollow">http://community.roll20.net/discussion/2136/the-updated-ruler-tool#Item_1</a>). Thanks!