Jump to content
Sign in to follow this  
Baltika

Sea tile alpha channel tga trouble

Recommended Posts

Hi there,

 

I know this topic has been covered before, and I have scoured various threads and soaked up the advice from Deuces, Brain32 and others. In particular, the method is spelled out for Photoshop by Brain32 right here:-

 

http://forum.combatace.com/index.php?showt...902&hl=tile

 

The problem I am having is to make a working coastal tile alpha channel using PAINT.NET or Gimp. At the moment, the alpha seems to be an all-or-nothing deal - when I mask the alpha channel, my coastal terrain doesn't show up at all.

 

I have also trawled through the Gimp docs, and it seems that Layer Masks are the way to get it to do what I want, but so far no joy.

 

Anyone round here know how I can control the alpha selectively in these two free apps?

 

Here's the issue:-

 

The alpha channel works fine for the sea part. (OK, I need to tidy it up, but this is a WIP :wink: ) Using alpha mask tool plug-in in PAINT.NET, I grey out the buildings near the coast. They still show up, but you can see in close up that the sea extends over them. It's more noticeable in motion, but it's there. When I try to completely mask the alpha channel, as I have done further away from the coast, whoosh, the underlying pixels disappear completely and I get a big black hole. Not nice. Using Layer Mask in GIMP, all I get is the black hole when I blank out the alpha channel. Like I said, I'm stuck with all-or-nothing.

 

 

Long shot:-

post-16914-1211366627_thumb.jpg

 

 

 

Close up. You can just see the waves on the streets:-

post-16914-1211366660_thumb.jpg

 

 

 

Here's some eye candy, new city tiles made using GE imagery of Reykjavik. In summertime, obviously. Still working on those transition tiles, oh yes :blink:

post-16914-1211366707_thumb.jpg

 

 

Thanks for any suggestions - other than "Go and buy Photoshop" :wink:

 

Cheers,

 

Baltika

Edited by Baltika

Share this post


Link to post
Share on other sites

Baltika-Take a screen shot of your program(Gimp or whatever) showing what your alpha channel looks.

Share this post


Link to post
Share on other sites

I'll check it up in GIMP and see how it goes although from the looks of it it seems like wrong alpha channel orientation, maybe a simple "Flip layer horizontally" would fix that.

Share this post


Link to post
Share on other sites

Did you make sure the transparent part of the tga is 100%transparent? easyest way I find is to just use the erase tool to erase all the parts I want transparent

Share this post


Link to post
Share on other sites

Thanks to all who replied.

 

Having spent some more time on this, I think I have it sussed.

 

Here's the drill for Gimp:

 

1. Open up your newly created coastal tile .bmp file.

2. On the main toolbar, under "Dialogues," open up the "Layers" and "Channels" windows as this makes it easier to keep track of what's going on.

3. From the main toolbar, click on Layer/Transparency/Add Alpha Channel. You will see your alpha channel appear on the Channels dialogue box.

4. By left clicking in the channels dialogue, highlight your new alpha channel and deselect the RGB channels, although leave them visible for now.

5. From the main toolbar, click on Layer/Mask/Add Layer Mask. A new dialogue box will pop up with a number of options. Select "Initialise Layer Mask" to "Layer's Alpha Channel," and click "Add." A completely

white box should appear next to your .bmp image on the "Layers" dialogue. That's the layer mask.

6. From the main toolbar, under the Layer/Mask options menu, ensure "Edit Layer Mask" is ticked, and that "Show layer mask" and "Disable Layer Mask" are unticked. Now, when you use any paint tool, you are editing the layer mask and not your image.

7. Select a paintbrush, colour black, and draw on the main screen to blank out the parts of the image which you do not wish water to appear on. The main image will go to grayscale, but in the "Layers" dialogue, you should see that your .bmp image is untouched, while what you are drawing appears on the white box next to your image. You can toggle the "show layer mask" setting to check this, but when it is visible you can't see your image so it's hard to know where to draw.

8. Once you have blacked out the areas you don't want to show up as alpha channel, toggle "show layer mask" to on. You should have an image which is partially black, where you have painted out the alpha channel, and partially white. The white part is your alpha channel. Using bucket fill, change the white to a shade of grey, with white being most reflective and dark grey being least reflective, depending on how much reflection you want from your sea.

9. Once you're happy, on the main toolbar, click on Layer/Mask/Apply layer mask. This is slightly disconcerting as the blacked out part of the image will turn to grayscale on all dialogues, but don't worry.

10. Select "save as," and save the edited image as a .tga file. Make sure you uncheck "RLE Compression" before saving. I don't know if "Origian bottom left makes a difference or not.

 

 

That's it. Next stage is to check your new sea tile in game, voila:-

 

Waves lapping along the shoreline

post-16914-1211438278_thumb.jpg

Share this post


Link to post
Share on other sites

Thanks for the tip :good:

 

I'm just figuring this stuff out as I go along, so all advice greatly appreciated.

 

Cheers :biggrin:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use, Privacy Policy, and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..