Jump to content
The Dark Mod Forums

How do I make an icon with a transparent surround?


Fidcal

Recommended Posts

I have an icon in tga format with an alpha channel for the the border. I have made a material file thus but what do I put in for the question marks?.......

 

// makes alpha channel transparent

scepter_icon

{

{

??????

map guis\assets\hud\inventory_icons\scepter_icon

}

}

 

I've looked at different ones and tried blend, blend blend, blend something else, alpha something or other but I'm just guessing. Nothing on the materials file wiki that I can see. Somebody must know.

Link to comment
Share on other sites

Thanks. Just been searching the net and found alphamask. The alphatest I think tests for degrees of transparency so might work as well but possibly less efficient in this case (just guessing) but the mask is just a total mask for the entire alpha selected area. Finally just this second got it to work with this.......

 

// makes alpha channel transparent
scepter_icon_a
{
{
			maskalpha
			blend filter
	map guis\assets\hud\inventory_icons\scepter_icon
}
}

 

YES! :)

Link to comment
Share on other sites

Can't you just use the same material template as the other inventory icons? Blend filter is a little like multiply in photoshop--you'll only see it clearly if the background is lighter than the image itself.

Link to comment
Share on other sites

You should just be able to copy one, rename it and paste your file into it. No point in having one inventory icon different from all the others.

Link to comment
Share on other sites

That is the first thing I did! And I couldn't get it to work. The one I made myself is simple and works. The ones I looked at, for example the lantern:

 

blend blend

map textures/darkmod/inventory/hooded_lantern

colored

 

did not make the alpha channel transparent on my icon. The compass one is immensely complicated. The health potions are as the lantern. I could not find the lockpicks. I don't think there are too many inventory icons made. I think all the loot doesn't have icons do they? Not many things go in the inventory except readables.

Link to comment
Share on other sites

Did you save your .tga as a 32-bit tga? The alpha won't work without it. I have a feeling the alpha isn't actually working on your image, but you just can't see it because it's white (and therefore won't show up on top of anything darker).

Link to comment
Share on other sites

Now I look closer the scepter itself is transparent. The border is invisible but the scepter is transparent.

 

It's 8-bit. Paintshop Pro would not let me increase it above 16 bit - the options only go up to there - and when I did so and tried to save it then it said it would have to reduce it to 8 bit because of the tga file format. If I look at the save options for tga it has 8, 16, and 24 and it is set to default to 24 but for reasons I do not know it tells me it must reduce it to 8.

 

I'll have another search for the lockpicks to see how they are done. Why is it so complicated? It only needs transparency of the selected area. The alpha channel defines that area.

Link to comment
Share on other sites

OK, the reason I could not find the lockpick icon defs is because there aren't any. The spawnargs directly reference the tga which is an 8-bit image with alpha channel. This is how I started - with an 8-bit image directly referenced. Then I became convinced that was the problem and tried to set up a mtr file for it.

 

I'll go back to what I was first doing but it didn't work then for sure. Maybe it will magically start working now. :)

Link to comment
Share on other sites

Yes, I will. I might make some loot icons too. Well, they will go on my todo list. When do you want the keys? Now I know how to do I can probably make them real quick actually.

 

OK, got it working now. The only reason it never worked in the first place was because to me alpha means transparency and that you therefore define the area you want to be transparent. That's what I have done for years in T2. But in Doom you don't. You define the area that you DON'T want to be transparent. Groan!

Link to comment
Share on other sites

OK, I've done one gold key in three versions for you to choose before I do the rest HERE.

 

Drop the pk4 in darkmod and enter map inv_icons Scroll through the inventory and see a big icon, a small, and a big128 that is 128 x 128 (the other two are both 256 x 256) There is a big saving in disk space and I don't think I can tell the difference in quality. I like the big key because I like things nice and clear but probably many like small discrete icons.

Link to comment
Share on other sites

Ah it's easy to confuse those terms;

 

The image total bit depth is not the same as the 8-bit / 16-bit editing mode in photoshop.

 

When you're saving an 8-bit / 16-bit / 32-bit image, you're talking about the total bit depth. Eg. an 8 bit image only has 256 total colours.

 

When you choose 8-bit / 16-bit editing mode in photoshop, you're talking about the bit depth per channel. Eg. an 8-bit per channel image has 256 values per channel.

 

16-bit editing mode is only a fairly new feature introduced to let you work at twice the quality of a normal image to avoid losing colours when performing certain operations; 8-bit editing mode is actually the "normal" mode.

 

http://www.photoshopessentials.com/essenti...-bit/page-3.php

Link to comment
Share on other sites

Well, there were there three versions of the same one for you to choose but if they are all OK then maybe any will do. You really need to see them in the demo. Big icon or small? Two minutes to run the demo and scroll the inventory.......... :)

 

[EDIT] What I mean is, I don't want to do a dozen then I'm told they are too big!

Link to comment
Share on other sites

I think bc_key02_small_icon.tga is the best. The other two are rather big. The small one is also pretty big, but it's ok.

 

If you can do two additional ones, one less fancy and brass, and the other rusty, it would be great. Maybe the usty one could also come in two varieties, one fancy and the other plain. Or while we are at it, maybe all of them can be done one fancy and the other plain. As default key icons this should cover all types. Of course there can be different colours, but having six different ones, should be a good start.

Gerhard

Link to comment
Share on other sites

Uh! That should have read "gold" not "old". ;) gold_key_fancy

 

BTW: If you want to know how to setup keys, you can look at my lockpick map. This already worked for years, because it was one of the first things that I implemented when we started on the mod, so I only had to look into the code on how to set it up as I forgot it. The code itself was never changed since then. :)

 

There are some bugs I have to fix though, so the keys work a bit strange at the moment, which is due to the lockpicking code.

Gerhard

Link to comment
Share on other sites

OK, new key icons uploaded HERE. All ten current models now have icons plus a plain key in rusty, brass, iron, and black. The rusty might look more like bronze - sorry - best I could do. Also unsure about brass - hard to distinguish between brass and gold for me. All icons slightly reduced in size from last time. The first ten have existing game models but these new icons without a game model are of limited use surely? They can only be used if in the player's inventory at start?

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

  • Recent Status Updates

    • OrbWeaver

      Finally got round to publishing a tutorial on baking normal maps in Blender, since most of the ones we have are inaccessible or years out of date.
      · 0 replies
    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 3 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 7 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
×
×
  • Create New...