Jump to content

Helped needed with masks-alpha channels


Recommended Posts

Can any modders out there help me out. I have putzed around for several years with Paint Shop Pro, and really haven't needed to use masks much. But I've de-saturated the bocage bmps (even more than sdp's or Aristotle's terrain mods) and now I need a mask, apparently, since simply de-saturating the bmps altered them so that the non-foliage background shows:

bocage-fail1.jpg

(The green clumps are the stock "bocage2.bmp" which I didn't touch.)

I have made the mask using the RGB split channel method and adjusting contrast as needed. The foliage and stems are all white and the blank area is all black I promoted the base "background" image to a layer, made the mask from the appropriate rgb image, and it in fact works fine on just a regular picture, but in game it is a no go. I have swapped layer positions, eliminated the background layer, tried just the mask layer itself, swapped the white and black mask image...and nothing works. I must be missing a step or something..maybe the layering is wrong or I'm saving it wrong (24 bit bmp image). I have followed four different youtube tutorials, and the PSP guide, and they all get me to the finished mask to put over a pretty picture, but nothing that works in this game. Does this have anything to do with the mdr files by chance? I'm lost!

Aristotle? sdp? Rambler? Stoppel? Anyone?

promotedlayer-switchposition.jpg

Link to comment
Share on other sites

Earl Grey, thanks. That's probably the problem. None of the tutorials specifically mentioned saving as an alpha channel. I figured that was automatic once the maks layer was generated and the image saved. Guess not!

Btw, this is going to be for the Italian Campaign...for making vineyards.

Link to comment
Share on other sites

Thanks Pinetree. I tried a quick A-channel save before I left for work this morning, and althiough it did save (the option wasn't greyed-out), it didn't work in game. The manual (for PSP 7) listed several formats that would work for A-channel saves, but not .bmp. I may just upgrade to a newer PSP because I can see a long career ahead of me modding this game, if only for my own benefit, but I do have Paint...I'll give it a shot.

Link to comment
Share on other sites

RockinHarry, I have spent the better part of two days trying to figure this out. My head is spinning. I read that 24 bit bmp's don't support alpha channels, but 32 bit does, and the CMSF discussion confirms that. But I thought CMBN bmp's were 24 bit??? Anyway, I'm still pretty lost--I need to figure how to do masks and alpha channels in Gimp...quite a bit different than PSP.

If Aristotle or sdp read this, can one of you jump in and tell me how you modded all the foliage and bocage files?

Thanks a million to everyone who has chimed in. I'm determined to figure this out because there is a lot more modding to be done over the life of the CMBN franchise.

Link to comment
Share on other sites

I use PSP9.

You can do pretty much everything in PSP first, and then convert the files in Gimp.

PSP:

1) make your picture with transparent bits. Easiest way to do this, duplicate base layer (and hide it) then work with eraser on layer 1.

2) save as .png

Gimp:

1) open .png

2) you need to make sure the transparency is all-or-nothing or it won't work in the game.

Layer / Transparency / Threshold Alpha / 254 (out of 255)

3) Unless you want black outlines, you need to set the background colour for the edges. If carefully chosen this can really enhance the look.

Click the Background colour box / click the eyedropper / select the correct BG colour.

4) File / Save As / .png

When the dialogue box for png options comes up, UNTICK "Save colour values from transparent pixels", then save.

5) File / Close ( close file.)

6) File / open recent / the file . ( We need to close and reopen it to reset the BG colour.)

7) File / Save As / .bmp

select 32 bit bmp (A8R8G8B8)

Open in game and check results. Remember that you need to back out at least as far as the title page for the game to pick up the changes, and if you change the transparency ( ie add it, or remove it) you'll need to restart the game before it takes notice.

I work with Gimp and PSP both open, tweak in PSP, open the pngs in Gimp-reset BG-save, test. Repeat. Lots.

If you adjust the picture in Gimp, it is essential to remember to do the threshold Alpha thing, and also to make sure the eraser is set to 100% opacity and hard edge. (Textures with partial transparency just disappear entirely.)

Link to comment
Share on other sites

Thanks Marco. Now why didn't I think of that?

Jeez, could they make it any more complicated? The more I read, the more I'm wondering why they picked the bmp format for transparencies. Anyway, I'll give this a go and let you know how it turns out.

Thanks so much, Marco.

Link to comment
Share on other sites

  • 2 weeks later...

If you set it to 255, everything will disappear. It's the threshold at which the setting flips. so 0=everything except 100% transparent solid, 1=everything except 99.7%+ transparent solid, 254=nothing except 0% transparent solid, 255=nothing solid.

I use 254 because it forces me to ensure I don't draw with feathered edges. But you can use anything from 0-254. Just not 255.

Link to comment
Share on other sites

I use PSP9.

You can do pretty much everything in PSP first, and then convert the files in Gimp.

PSP:

1) make your picture with transparent bits. Easiest way to do this, duplicate base layer (and hide it) then work with eraser on layer 1.

2) save as .png

Gimp:

1) open .png

2) you need to make sure the transparency is all-or-nothing or it won't work in the game.

Layer / Transparency / Threshold Alpha / 254 (out of 255)

3) Unless you want black outlines, you need to set the background colour for the edges. If carefully chosen this can really enhance the look.

Click the Background colour box / click the eyedropper / select the correct BG colour.

4) File / Save As / .png

When the dialogue box for png options comes up, UNTICK "Save colour values from transparent pixels", then save.

5) File / Close ( close file.)

6) File / open recent / the file . ( We need to close and reopen it to reset the BG colour.)

7) File / Save As / .bmp

select 32 bit bmp (A8R8G8B8)

Open in game and check results. Remember that you need to back out at least as far as the title page for the game to pick up the changes, and if you change the transparency ( ie add it, or remove it) you'll need to restart the game before it takes notice.

I work with Gimp and PSP both open, tweak in PSP, open the pngs in Gimp-reset BG-save, test. Repeat. Lots.

If you adjust the picture in Gimp, it is essential to remember to do the threshold Alpha thing, and also to make sure the eraser is set to 100% opacity and hard edge. (Textures with partial transparency just disappear entirely.)

I found something last night called AlphaConv that you can just drag a png file onto it and it will convert it into a 32-bit bmp.A blog post here explains it better than i could and gives a download link. It works really well

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...