I admit I am a hack when it comes to graphic design.
Here is my new problem: I have a set of counters I make in Adobe Illustrator CS3. Each of the counters is precisely 5/8" square (I used Snap to Grid).
When I import a counter into VASSAL, I take a screenshot (takes as a PNG), open in Photoshop CS3, crop out the counter and paste into a new file. The file is re-sized to 5/8" square (94 pixels at 150 pixels/inch). I save as PNG.
Edit my module, add the counter as a basic piece, and
ITS TOO FREAKING BIG ! its well more than 5/8" square, even though my image size and canvas size for the PNG file are 5/8".
What the heck is going on here ? This is probably a stupid question, but at 12:30 in the morning, I am scratching my head…
Vassal does not and has never respected image resolutions. You will get no where thinking in inches. Think of everything in pixels instead.
Work out what size in pixels you want your counter and make them that big in Illustrator. In this case, your image is 94 pixels square, so in Vassal, on a map at 1:1 zoom, it will take up 94 pixels (somewhere around 1 inch square on most modern monitors)
A bitmap image (like PNGs, JPEGs, and GIFs) is a big array of pixels.
Pixels are dimensionless—their real, physical size depends entirely
on how large the pixels on your screen are.
When you say that your counters are 5/8" square, there is implicitly
some DPI at which they are 5/8 square. Saying they are 5/8" square
full stop is meaningless. You’re having a problem with the difference
in DPI at which you’re working in Photoshop vs the true DPI of your
screen, it sounds like.
I have two suggestions:
Don’t work in inches at all. Ever. If you work in pixels during the
whole process, you won’t have any surprises, because 1 pixel is 1 pixel
everywhere.
If you’re creating your counters in Illustrator, then you have them
as vector art, yes? Why are you ruining them by changing them to bitmaps
when you could be saving them as SVG and using them that way?
Now I am little edified, and a little more confused.
If my screen resolution is 72 dpi and I save a file @72 dpi, the size of the counter should be fixed at where I want it, right ?
When I print something from Adobe Illustrator, the size is exactly as I want it. VASSAL doesnt seem to be fixing things at 72 DPI though, as I resized to 72 DPI x 5/8", and it was too small. While I know how in PS to select DPI, I dont see the same thing in AI (screen resolution should be meaningless in a vector program, right ?).
At the moment, I seem to have to do things by trial and error. So, through trial and error, I got the counter size right. Now, I have to scale other art (holding boxes to the correct size, and I am unsure how to achieve this without more trial and error. There must be a logical way to do this…
As for SVG, I thought VASSAL only understood jpeg, bmp and png. I just tried putting an a SVG file, and VASSAL is crapping itself. Not good.
I can’t speak about AI’s native format, but in standard SVG you have
a choice of units. Some are absolute—inches, centimeters, points.
If you make a rectangle 1" wide, it will render 1" wide everywhere. That
means the number of pixels across it is will vary, depending on the DPI
of your output device. On your 72dpi screen (really? that seems very low
to me) it will be 72 pixels across, while on a 600dpi laser printer, it
will be 600 “pixels” across.
However, you also have relative units—pixels and percent. The way
in which these are relative are not the same. Percent is relative to
the size of the enclosing object (a 100%-long line would run the entire
length of your document, however long that is). Pixels are absolute
units in one sense—that is, an image which is 100px wide on your screen
will be 100px wide on every screen—and relative in another, in that
a 100px-wide image will be 1" across on a 100dpi screen, but 1/6" across
on a 600dpi screen.
To summarize: SVG lets you fix sizes either to physical units or to
pixels. You choose which you want to be invariant.
The key here is either (a) to pick pixels as your units from the start,
(b) specify the output size in pixels when you rasterize (i.e., when
you save your images as bitmaps), or (c) leave the images as vector
images.
If you can’t specify pixels as your units instead of absolute physical
units like inches or cm in Illustrator, I don’t see how artists can
use it for anything which will be displayed on-screen. (For comparison,
it’s trivial to set your default units to be pixels in Inkscape.)
Which verion of VASSAL? 3.0+ should be able to handle SVG. If you have SVG
which isn’t working, I want to see it in order to find out what’s wrong
and fix it.
I can’t speak about AI’s native format, but in standard SVG you have
a choice of units. Some are absolute—inches, centimeters, points.
If you make a rectangle 1" wide, it will render 1" wide everywhere. That
means the number of pixels across it is will vary, depending on the DPI
of your output device. On your 72dpi screen (really? that seems very low
to me) it will be 72 pixels across, while on a 600dpi laser printer, it
will be 600 “pixels” across.
I vaguely recall CRT monitors are supposed to be 72 DPI, although I heard this a while back.
To summarize: SVG lets you fix sizes either to physical units or to
pixels. You choose which you want to be invariant.
The key here is either (a) to pick pixels as your units from the start,
(b) specify the output size in pixels when you rasterize (i.e., when
you save your images as bitmaps), or (c) leave the images as vector
images.
Using vector would be a lot easier, although my one try didnt work.
Which verion of VASSAL? 3.0+ should be able to handle SVG. If you have SVG which isn’t working, I want to see it in order to find out what’s wrong and fix it.
I am using 3.0.15. I got an error message (which I forget what it said), and while I could dismiss it, it caused lethal problems (had to delete a section of the module entirely).
OK, when I select the .svg file (counter graphic), I get the following error dialog:
An untrapped error has occurred.
NumberFormatException
For Input String: “45.75px”
Please send a report to support@vassalnengine.org and attach the log file.
/Users/tom/VASSAL/errorLog
(dont show this dialog again) (OK)
Whats your email address ? I can send the log and and SVG file, but the mod is 8 MB. Do you ave an iDisk or ftp site ?
The problem was that the code which was fetching the height and width
of SVG images wasn’t stripping off the “px” unit before trying to parse
the number. I’d never encountered this problem myself—none of the SVG
I’ve produces has the “px” because unitless dimensions default to pixels
anyway.
Nice artwork, BTW. One piece of advice: The counter is 45.75 x 46.255
pixels. Because those aren’t integers, you’re going to have some
scaling occuring even at full size because your screen has no fractional
pixels. Since most of what appears on a counter is rectilinear, you’ll
have less blurring if you can get this to be 46x46 instead. There should
be some option in Illustrator called something like ‘snap to pixel grid’
or somesuch. (There is one like this in Inkscape.)
Are you asking where you should install it? Definitely in it’s own
directory, if that’s what you’re asking. Dumping two installs together
is asking for trouble.
OK, I copied my entire VASSAL directory and put the new build in it. Using the build, I can load a SVG file into the module, but there is no graphic showing up when I try and play it. The name of the SVG file does show up in the scrollable list though.
What you’re saying leads me to think you’re not installing this they
way it was intended to be installed. What was in the directory you
copied? What does it look like now?
I took my current VASSAL directory, and copied it entirely, renaming the new folder “VASSAL beta”. I copied the new executable into this new folder, and launched it. I dont get any error messages when starting the new executable, so it seemed to work ok.
I think we’re having a problem with terminology. What I need to see
is what’s in the directory where you put the disk image you downloaded.
Could you try the module for The Longest Day and tell me if you
can see the pieces? All of the pieces it it are SVG.
Try uploading your module to mediafire.com and send me the link
for it so I can have a look at it.
Could one of the Mac guys verify for me whether svn3268 or svn3269
will load SVG on a Mac? (If so, then the problem is most likely an
installation one, rather than a bug.)