Notifications
Clear all

[Closed] SDK alpha not working

just adding this into the general cgtalk global consciousness so others don鈥檛 have to suffer the pain of the sdk documentation鈥?/p>

An image list may also include a monochrome bitmap that contains masks used to draw images
transparently (icon style).

     from ICustButton.
     
     this is of course utter tosh and under no circumstances waste your time following this advice. What they say is true but why anyone would want to 1 bit alpha now is beyond me (because if you specify a mask, reverse 1 bit alpha is all you will ever get regardless of the bit depth of the mask).
     
     Instead create a "traditional" 32bit image with a "typical" 8 bit alpha channel set the image list mode to ILC_COLOR32 and [b]do not use[/b] the  ILC_MASK mode illustrated in some functions in the samples. [b]Do not add a mask image[/b] it is not needed and will cause you a whole lot of grief.
     
     that is all and rest :hmm:
   
   and by monochrome they really mean black and white. :shrug:
 
 p.s. I've tried to use as many of the search terms I tried and that didn't give me the right result and would have saved 4 hrs of my life so if anyone thinks of anymore please post them.
7 Replies
 lo1

I wish there was a similar text for every page in the SDK

and there was me thinking 1 bit graphics died a death with my se30 20 yrs ago

 lo1

Btw, these are the same masks you鈥檇 use in the images of a MAXScript Button control.

no, not at all. And it was trying to get stuff that worked in mxs rollouts to work in the same way with the sdk that threw me. Something like

maxsdk/samples/objects/fov.bmp & fovmask.bmp

works as the mask is already 1 bit and reversed so won鈥檛 f**k up. I鈥檓 guessing it鈥檚 probably a hang over from windows 3.1. I worked on macs back then so it was something I鈥檝e never run into It would be nice if they kept the help up to date and relevent.

 lo1

Oh I see what you mean. Yucky

Just look into all the various Max dll鈥檚 with a resource browser. They still hold lots and lots of such 1 bit image strips for masks. I鈥檓 sure a good part of them aren鈥檛 even used any longer 鈥?br>
Same is true with various dialog resources 鈥?/p>

I鈥檒l think you鈥檒l find a lot of the ui still works on reversed 1 bit alpha. It always amuses me that iparamblock2 was introduced in (going by the docs) 98 yet most stuff is still iparamblock. They ported geosphere as an example then looked at the rest of the stuff and thought mmmmm shall we鈥?Nah! If it ain鈥檛 bust why fix it ! :wip: