[Closed] Masks with icons not working for me?
Simple problem here (for you guys):
I’m addin icons, but the alpha isn’t working. It seems to be inverted and 1 bit instead of 8bit.
So what is masked is actually the outside parts, this happens even with max standard pictures.
I’m using a checkbox and add images to it.
They are named name_16i and name_16a like mentioned in the help.
I tried to invert it, and it works except that it’s then 1 bit so you see strong aliasing at the edges.
Does anyone know why this happens?
/Andreas
the help says this:
“You can also specify a black-and-white mask image used to mask the image display into the buttons. It is given in the same imagelist form and the mask image indexes must be the same as the images they correspond to. Black pixels in the mask let the corresponding image pixel show; white pixels hide corresponding image pixels and show the default background color for the button. “
Strange thing is that all icons that I can find for max does NOT let black show, instead they use white as opaque and black as transparent
/Andreas
Andreas,
Are we talking ICONS for MacroScripts or Imagebuttons here?
The icons MAX ships with are always using 8bit ALPHA which is White to reveal and Black to mask out, with all other shades of grey semi-transparent. The MASK on the other hand is the opposite and without the anti-aliasing.
If you are trying to create Icons for MacroScripts, please take a look at Scripts/Utilities/MakeIcon_4_55.ms
It is a MAXScript Utility (appears in Utilities tab>MAXScript>drop-down list).
You can press the Mask checkbutton in the MakeIcon utility (called originally Custom Icon Maker), create some geometry in the viewport and hit the RENDER ICONS button – you will notice the difference in the previews.
To create your own icons, you can create a new LIBRARY and add icons to it.
KNOWN BUG AND WORKAROUND: You should uncheck the Dither True Color under Customize>Preferences>Renderer dialog as it can cause color shifts when manipulating icon libraries. Not my bug really
Discreet has been using the script since Max 4 to create additional icons.
Hiya Bobo (getting married yet?, hihi)
I’m creating the icons for having inside checkbuttons, imagebuttons etc. I still don’t understand, can these checkbuttons etc have 8bit alpha for their icons?
Do you have any general tip when it comes to doing icons. I do’nt really like the standard sized for icons in max. Some of my buttons are rectangular, so they are broader. I found that it worked ok to have 16 sized bitmaps but have the button actually somewhat bigger. The good thing about this is that I can resize the button later and make it smaller if I like, if the original image was the exact size as the button, it would suck if i changed it and had to redo the icons.
Thanks for the tip for the script. Wow! cool program for creating icons. Arg, more programs to learn
/Andreas
Ok, I haven’t found any way to have alpha 8 with image buttons. So I take it’s not possible then?
/Andreas
Of course not, the MAXScript Reference clearly states an image button requires a MASK, not alpha. This was designed in pre-Max 2.0 times when there were no 8-bit alpha images for the UI, all main toolbar icons were hard-coded, 16×15 size, 16 colors.
The customizable 24×24 and 16×15 truecolor toolbar icons with alpha support were introduced in Max 3, the MAXScript rollout items have not been changed though.
Ok, thanks bobo, that’s what I needed to know. Yes, it seems pretty clear in the manual that it doesn’t support 8bit alpha, that is what it says. It’s just strange since most other icons in max supports 8bit alpha, and I also have an icon creator guy that tells me that I must be wrong, so excuse my ignorance. Even though it’s not possible to have 8bit alphas with say checkbuttons, there are often ways around problems like this. Who knows, perhaps there was some other super button that could have 8bit masks. You have to remember that many of use have not used maxScript since release 2.0, so tracking the history is not easy for us outsiders.
Thanks alot for the help Bobo, your time is much appreciated.
/Andreas