Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Alpha Channel

    Scheduled Pinned Locked Moved SDK Help
    5 Posts 0 Posters 464 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 01/04/2007 at 14:33, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R9.6 + 
      Platform:   Windows  ; Mac  ;  Mac OSX  ; 
      Language(s) :     C++  ;

      ---------
      Hi All,

      how i can sample the alpha channel of a BaseChannel?
      Really i don't find it 🙂

      Cheers
      Renato

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 04/04/2007 at 00:57, xxxxxxxx wrote:

        You have to set the TEX_ALPHA flag. For a PluginShader it looks like this:

          
        Vector BitmapData::Output(PluginShader *chn, ChannelData *cd)  
        {  
             if (!shader) return 1.0;  
          
             LONG flags = cd->texflag;  
             cd->texflag |= TEX_ALPHA;  
          
             Vector res=shader->Sample(cd);  
             cd->texflag = flags;  
          
             return res;  
        }  
        

        cheers,
        Matthias

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 04/04/2007 at 01:26, xxxxxxxx wrote:

          Hi Matthias,

          So, to sample the alpha channel from a basechannel i just need to set TEX_ALPHA then sample it?

          I'll make some my test

          Thanks for now.
          Renato

          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 04/04/2007 at 01:31, xxxxxxxx wrote:

            Quote: _So, to sample the alpha channel from a basechannel i just need to set TEX_ALPHA then sample it?
            >
            > * * *
            _


            yes, exactly

            cheers,
            Matthias

            1 Reply Last reply Reply Quote 0
            • H Offline
              Helper
              last edited by

              THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

              On 04/04/2007 at 01:42, xxxxxxxx wrote:

              Thanks 🙂
              Renato

              1 Reply Last reply Reply Quote 0
              • First post
                Last post