Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Looking for technical help regarding sprite issues
#1
[Image: 2ec2jh5.jpg]
  Topic and image says it all, I have been working on a comprehensive overhaul of Mech sprites for a while now and have recently noticed some incorrect transparent pixels on sprites in MegaMek. They render correctly in MekHQ but will have non-random pixels fail to draw correctly in MM. I assume something in the recent swap to .png is causing it as I still have not swapped over from .gif. Basically wondering what are the correct .png options so I can correctly batch redo all of my previous hard work. I have skimmed around, but not really seen a definitive file format guide for the various graphical assets that MM uses. I use Graphics Gale, a sprite graphic editor if that is at all relevant. I will be using Photoshop or Irfanview to batch process all my .gifs

  TLDR: My indexed .gifs need to be resaved as .png, what are the correct options to avoid incorrect transparency.
Reply
#2
[Image: mekhqsnip.jpg]
works fine in MekHQ for example. Same Dragon .gif as in OP.
Reply
#3
Most of our sprites have been designed in GIMP.  Last fall we added the ability to color the sprites and developed an automated shading script.  The scripts are in the DATA-IMAGES-WIDGETS-UNIT SHADING SCRIPTS.

There are sample of the original unedited files are in the data/images/units/unused/units_original

I would also suggest visiting our forums on the CGL site.  Deadborder has largely remade every mech sprite in the game in the last three years.
Reply
#4
Thank you for the reply Hammer, but fails to address the issue. I was just wondering why previously functioning sprites were no longer correct. I never really noticed the swap to .png as I move all my previous assets from version to version. But readying for release and the above mentioned graphical errors is forcing me to upgrade assets to the correct/current file format.
I am aware of your script but all of my sprites are hand shaded and will remain so, also, I disagree with the decision to add a large ambient occlusion style drop shadow/halo around the Mechs as it ruins whatever crispness and anti aliasing that I have worked to achieve. Why didn't you guys use whatever code the water hexes use to generate a shadow? Too much computation? I will just try batching to 8 bit RGB .png in PS and checking the sprites manually in MM. Thanks again for your reply.
Reply
#5
Could you perhaps upload a few of the files you are having issues with?  I can't really give you a definitive answer because I don't really know what the problem is.  I don't know of any special PNG settings you need to use.  The issue may be with how the camo gets applied.  I think that all three channels should have the same value.  If you attach an example sprite or two that has the issue, it would probably be easier for me to figure out what's going on.  You could PM it to me if you prefer.

The shading is baked into the sprite, so if you don't like it you don't need to use the shaded sprites.  The original unshaded sprites still exist.
Reply
#6
Thank you Arlith, but switching to rgb.png has dealt with the incorrect transparent pixels as in my opening image. I kinda figured it might have something to do with how camo is applied now in Megamek as some surprising results have been had checking for errors in newer work. Thanks for the time.
Reply
#7
Around the time that we switched to pngs there was also a change in how camo was applied.  Now, we try now to alter any "color" pixels, so that the sprites can have colors that don't have camo applied to them (like for shading a cockpit, or coloring a weapon, etc).  "Color" pixels are defined as any pixel that doesn't have all three channels the same intensity.
Reply
#8
Super helpful info Arlith, much appreciated.
The fix in the end was dropping any color data from my sprites -indexed .gif->convert to greyscale->convert to RGB->save as .png, as apparently I was getting corrupted color data in some step of my workflow.  If anyone ever runs into this same problem in the future (doubtful). I will just add it to the pre-color pipeline if I ever go that route.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Custom Vehicle Sprite Requests Zellbringen 4 1,850 03-04-2015, 03:58 PM
Last Post: Zellbringen

Forum Jump:


Users browsing this thread: 1 Guest(s)