graphics issues

OK, it didnt take me long to hit another problem.

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…

thanks,

Tom

Mad,

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)

Regards,
Brent.

*********** REPLY SEPARATOR ***********

On 7/03/2008 at 9:28 PM MadDog wrote:


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Thus spake “MadDog”:

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:

  1. 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.

  2. 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?


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

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.

thanks,

Mad Dog

Thus spake “MadDog”:

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.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

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).

thanks,

Tom

Thus spake “MadDog”:

Have a look here:

scantips.com/no72dpi.html

Please let me know what the error message was and send me the SVG image
and the module so I can try it.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

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 ?

thanks,

Tom

Thus spake “MadDog”:

uckelman@nomic.net. It’s strange when people ask me that—I forget
that not everyone reads the forum as mail.

IIRC, that’s under the limit on my mail server. Try sending it,
and if that doesn’t work we can try something else.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

OK, I sent one email with the svg and errorlog. A second email has the mod, but I have my doubts it will make it.

thanks,

Tom

Thus spake “MadDog”:

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.

Fixed in trunk@3246.

Current 3.1.0 pre-beta builds here:

nomic.net/~uckelman/tmp/vassal/

Many thanks for pointing me to this bug.

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.)


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Do the beta executables go in the VASSAL folder , or somewhere separately ?

thanks,

Mad Dog

Thus spake “MadDog”:

Sorry, I’m not sure what you’re asking. We haven’t released any betas yet.
If you’re asking about the builds I provided a link to:

Which build did you download?

What OS are you using?


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

I downloaded 3.1.0-svn3247-macosx.dmg.

before I get to work, and start using it, I need to know if I should make a duplicate directory or just use my old VASSAL directory.

thanks,

Tom

Thus spake “MadDog”:

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.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

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.

thanks,

Tom

Thus spake “MadDog”:

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?

Check the errorLog. Do you see anything there?


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

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.

thanks,

Tom

Thus spake “MadDog”:

  1. 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.

  2. 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.

  3. Try uploading your module to mediafire.com and send me the link
    for it so I can have a look at it.

  4. 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.)

nomic.net/~uckelman/tmp/vassal/


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Joel Uckelman wrote:

svn3268 and svn3269 both choke while loading the module (before the
enter username / password, select new / load / online, etc):

java.lang.NoClassDefFoundError: org/w3c/dom/svg/SVGDocument

10.4.11, PPC (PowerBook G4)

Cheers,
Tim.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)