Announcement

Collapse
No announcement yet.

Check for alpha channel with maxscript

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Check for alpha channel with maxscript

    Any one who can help me with this.
    I want to check for an existing alpha channel in a bitmap within a texturemap.
    This should be possible just cant find it anywhere in the docs.

    Thanks

    dennis

  • #2
    take it into photoshop. take a look at the channels tab. if theres an alpha channel your good.
    ____________________________________

    "Sometimes life leaves a hundred dollar bill on your dresser, and you don't realize until later that it's because it fu**ed you."

    Comment


    • #3
      thanks for your input, but i really would like it to be scripted, i should have said so in the message body and not just in the title.

      Comment


      • #4
        oops sorry missed your thread title.
        ____________________________________

        "Sometimes life leaves a hundred dollar bill on your dresser, and you don't realize until later that it's because it fu**ed you."

        Comment


        • #5
          Probably the easiest way to do it would be with the AVGuard extension by Larry Minton...

          AVG 7.06 for max 7, http://www.scriptspot.com/extensions...vg_dlx70_6.zip

          AVG for max 6.08, http://www.scriptspot.com/extensions...vg_dlx60_8.zip

          It has a function "getBitmapInfo" that does this and more very easy...

          getBitmapInfo {<filename> | <bitmap>}
          Returns information on the specified bitmap file as an 13 element array. Array elements
          are:
          1. Expanded bitmap file name as String
          2. Device name as String
          3. Bitmap width as Integer
          4. Bitmap height as Integer
          5. Number of bits for each RGB component value as Integer
          6. Number of bits for alpha component as Integer.
          7. The aspect ratio of the bitmap as Float
          8. The gamma of the bitmap as Float
          9. Whether the bitmap has alpha as a Boolean
          10. First frame as Integer
          11. Last frame as Integer
          12. The bitmap type (from BitmapInfo::Type()) as Integer. See topic "Bitmap Types" in the SDK help file
          for more info on the bitmap types.
          13. The bitmap flags (from BitmapInfo::Flags()) as Integer. See topic "Bitmap Flags" in the SDK help file for
          more info on the meaning of each bit.
          Christopher Grant
          Director of Visualization, HMC Architects
          Portfolio, ChristopherGrant.com

          Comment


          • #6
            cheers mate. Will try it.

            Cant belive its not possible with a single property or method, should be easy.
            At the moment i read pixels and check for alpha values below 255, in worst case scenarios this is dreadfull slow. So thanks

            Comment

            Working...
            X