Registrations are now open. Join us today!
There is still a lot of work to do on the wiki yet! More information about editing can be found here.
Already have an account?

Microsoft KB Archive/171756

From BetaArchive Wiki

Microsoft Knowledge Base

INFO: Assigning an Alpha Channel

Last reviewed: July 30, 1997
Article ID: Q171756

The information in this article applies to:

  • Softimage 3D for IRIX, versions 3.51, 3.7
  • Softimage 3D for Windows NT, versions 3.51, 3.7

SUMMARY

This article is provided to show you how to determine if a picture has an alpha channel and what it looks like and how to proceed if you need one.

A Softimage .pic file rendered from Softimage 3D will always have an alpha channel. A picture that was converted from another format (for example, YUV) sometimes will not have an alpha channel.

How to Determine If There Is An Alpha Channel

Use one of the following two methods to determine if your picture has an alpha channel:

  • Using the showpic utility, with the cursor in the showpic window, press

       'r', 'g', or 'b' on the keyboard to show the red/green/blue channels,
       and 'a' to see what the alpha channel looks like. If this does not show
       a black, white, or graytone image then the image does not have an alpha
       channel.
    
  • Use the infopic utility which will indicate just { RED GREEN BLUE } and also { ALPHA } when there is one.

Assigning an Alpha Channel

If you have a picture file that does not have an alpha channel, the following two examples shows you how to assign one:

If you only want a two-tone alpha channel, you can use the "alpha" standalone. One value will be black, the other will have the intensity you specify. For example, if you want the alpha channel to be black and white do the following:

   alpha input output 1 0 .5 0 .5 0 .5

   Any pixel that has red, green, or blue intensity between 0 and .5 will
   have an alpha value of 0, otherwise it will have an alpha value of 1.

   alpha input output .9 0 .3 0 .4 0 .5

   With this example, any pixel that has a red intensity between 0 and .3,
   or a green intensity between 0 and .4, or a blue intensity between 0 and
   .5, will have an alpha value of 0, otherwise it will have an alpha value
   of .9.

If you want the alpha channel to be a gray-scale image, you can use the "gray_scale" standalone in combination with "soft2raw", "raw2soft" and "infopic".

For example, if your original image is named clouds.pic do the following:

  • To obtain the width and height, type: infopic clouds
  • To obtain the gray-scale image, type: gray_scale clouds G
  • To obtain "R.r", "R.g", and "R.b", type: soft2raw clouds R
  • To obtain "GR.r", "GR.b", and "GR.g", type: soft2raw G GR
  • Now type: mv GR.r R.r (You are using the gray scale picture as the alpha channel - Note, GR.r, GR.g, and GR.b are exactly the same.)
  • Finally, to combine the channels into the final picture, type: raw2soft R cloudsAlpha

REFERENCES

If you have any questions concerning the information contained in this article, contact support@softimage.com by e-mail.


Additional query words: 3.51 3.7 si si3d si3ds-a

Keywords : kbgraphic
Version : 3.51 3.7
Platform : IRIX NT WINDOWS
Issue type : kbinfo


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 30, 1997
©1997 Microsoft Corporation. All rights reserved. Legal Notices.