Graphical nuisance when using layers

Hello all,

I have run into a graphical nuisance when counters with active layers are viewed at VASSAL map scale ratios other than at 1:1.

I am using actual 1:1 scans of the counters and maps to create the image files (I am using GIF format for counters, PNG for maps) that make up the VASSAL counters/map to give a “real” feel to the map and counters.

However I have found a minor peculiarity in the way the counters appear on the screen whenever both the map is ZOOM in or out from the standard 1:1 scale and the counters happen to have a Layer feature active.

eg.here is a shot of a Layered counter with the map zoom at 1:1. The border of the GIF associated with the active Layer on the counter appears seamless.

Here is a shot of it when zoomed in (mouse over) at 1:1.5. Layer seam is visible.

Here is a shot of it when zoomed out 1:0.5. Layerseam is again visible.

As you can see, the border of the GIF associated with the activated Layer becomes visible at zoom levels outside of 1:1.

NOTE: of course, zooming in/out when editing the counters in my graphics editor does not result in these seams.

Is there a way to prevent this from happening given I want to use the actual scans of the counters to give the mod a “real” look?

I understand that if I were to make the counters “clean” and of “solid” uniform color, this would not necessarily be happening, but is there a way to retain the “real” look of the counters (using the existing scanned images as a basis) but prevent the “visible Layer seam” annoyance from happening?

I believe it has something to do with the graphics file format and/or the colour depth being used and how VASSAL calculates the zoomed in/out views from the standard 1:1 resolution.

Cheers

Bull

I need a copy of your module in order to troubleshoot this.

Thank you. I have sent you an email.

Dang. Without really understanding how, I seemed to have avoided this problem for a while, but now it seems it has reoccured in some other counters/layers I have been making and I don’t understand why. :cry:

I am still looking for a definitive answer on why this is happeneing.

My hunch is that it has something to do with the way I am creating/manipulating my image files (all of which are now PNG). Something to do with resolution, scaling, colour depoth etc. I am trying to experiment with this to see what is causing the problem.

Any clues?

Bull

Thus spake “Bullman”:

I still plan to look at this, BTW, but I haven’t had time yet, as
we’re still working on releasing 3.1.0-beta1.


J.


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

Post generated using Mail2Forum (mail2forum.com)

Thanks uckelman

I have just now started experimenting with the graphics files I have to see if I can work out what is happening.

I have been able to take one layer that doesn’t cause these edges/seams and combined it with a layer that does into a new flattened layer graphics file. If I use this new garpics file as a Layer in VASSAL, the edge/seam persists in the part of the graphics which originally the problem, but NOT in the part of the graphics which is made of the layer that never did cause problems.

Still experimenting…

OK…I am getting somewhere…I think :stuck_out_tongue:

I have a plain graphics file for a base counter (it is made up of a single colour but with a noise effect added).
I have been changing the graphic file that is associated with a Layer I have created for that counter and observing if/when the edge/seam problem occurs.

  1. If I open up the original base counter graphics file and lasso a rectangular area, copy and paste it to a new layer, then create a graphics file out of that new layer (effectively a rectangle surrounded by transparency) and use it as a Layer image for my base counter, the seam is visible.

  2. If I edit this new rectangular image file I have used as the Layer image, and use the eraser tool with the Edge setting at 0 (basically a hard edge) to erase one edge of the rectangle, then use this new image as a Layer image, the seam is still there.

  3. If I instead use the Eraser tool but with a softer Edge setting (maximum of 100), and erase an edge, when viewed as a Layer, the erased edge now has NO seam/edge.

Conclusion: It seems that how the edge/boundary of the graphics file has been defined seems to determine if a seam will show. A hard edge with result in a seam, a soft edge will not. This applies to both erasing and brushing.

It is virtually impossible to tell by looking at a graphics file in an editor to see if it will result in a seam when used as a Layer image. I will just have to look at all Layer images I have in my mod in VASSAL, note the ones that result in the seam, then try to edit them in a grasphics editing program to try to soften up the edges.

I would like to hear of anyone else has experienced similar issues or if they have been able to edit their graphics files using hard edges when erasing/cutting/pasting/brushing their layer graphis image files and avoid ing the issues I am having.

Bull

OK, I think I have completely soved this problem, or at least worked out how to prevent it from happening.

When creating/editing the graphics files, all erassing/painting/lassoing/selecting must be done with tweaking to the Feathering or Hardness settings. How you do this (if you can do this) will depend on what program you are using of course.

Bull