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

Calculate DPI of assets

Hi, Ive been having some graphics lag on my game for my big dungeon map. I read a forum post:&nbsp; <a href="https://app.roll20.net/forum/post/221873/proble-with-huge-lag-after-a-while" rel="nofollow">https://app.roll20.net/forum/post/221873/proble-with-huge-lag-after-a-while</a> It's pretty much what I'm experiencing from time to time. In the post one of the people helping the OP asks what the DPI of their map image is. My question is how do I calculate that? I thought DPI was only for printing images. On a screen isn't it more about resolution? If its about screen space then doesn't that depend on the zoom? Since roll20 uses 70px per 5ft for DnD 5e my map has to be so big or else all the lighting settings would be wrong. Finally is there a way to quickly rescale everything in a page down to a more suitable size including lighting settings? My dungeon image is 59x55 squares large at 75px per square. I made it in Dungeon Painter Studio and exported to jpeg for roll20. Thanks for any help!
1592154432

Edited 1592154563
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Technically, Roll20 uses 70 pixels per unit to display. I.e. at 100% view and programatically, each cell of a grid is 70 pixels across. That is what you should use as a base guide. Most often, assets art built with 140ppu as their default, so that the asset will still look sharp at 200% magnification. Tokens are often built at 280ppu for even greater magnification clarity. Other artists work at different resolutions entirely. The Marketplace does not enforce an exact resolution.* You are absolutely right that dpi is a print resolution. However, that measurement can be useful for making calculations in an image editing app. You can set a "dpi" to calculate how many cells an image will be, pretending that 1 cell = 1 inch. Cells or units is the guide for the size of an asset, then. There has been a long, slow process to move marketplace assets to use a pre-defined "HxW units" tag, so that the dropped asset can be immediately sized properly. This has not yet been finished. Your dungeon image above is a simple solution, since you know the number of squares (assuming there is no borer to throw off the calculations). Place the map. Right click on it, there is an option under "Advanced" to set the dimensions. Make sure to chose "units" from the drop down and put in 59 x 55. Yes, you have an image that is slightly oversampled at 100%. But unless you are playing with "8bit pixel art" style graphics, it should be invisible to the eye. Don't worry about making 1 map pixel = 1 screen pixel. This is virtually never true due to the reasons listed in the previous paragraph, and few people continuously play at exactly 100% magnification. *Nor should it, there are sometimes valid technical reasons for other resolutions. Only Custom Token Markers have a specific resolution enforced.
Thanks for the advice! I only just had time to try it out and I think it worked. Also, I found out that if I reload the page when experiencing lag it "resets". To me, this suggests its a memory issue. I'm, not sure how Roll20 loads the map and other gfx assets and when they get released when not being used. Either way thanks for clearing that up for me!